Skip to content

Commit

Permalink
Merge pull request #182 from sandydoo/upgrade-ember
Browse files Browse the repository at this point in the history
  • Loading branch information
sandydoo authored Dec 26, 2023
2 parents dc636c3 + 468e38c commit ad970b2
Show file tree
Hide file tree
Showing 41 changed files with 2,838 additions and 1,566 deletions.
8 changes: 0 additions & 8 deletions .ember-cli
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,6 @@
"ember-cli-deploy": {
"verbose": true
},
/**
Ember CLI sends analytics information by default. The data is completely
anonymous, but there are times when you might want to disable this behavior.

Setting `disableAnalytics` to true will prevent any data from being sent.
*/
"disableAnalytics": false,

/**
Setting `isTypeScriptProject` to true will force the blueprint generators to generate TypeScript
rather than JavaScript by default, when a TypeScript version of a given blueprint is available.
Expand Down
16 changes: 3 additions & 13 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,30 +1,20 @@
# unconventional js
/blueprints/*/files/
/vendor/
/build-tests/app-template/

# compiled output
/dist/
/tmp/

# dependencies
/bower_components/
/node_modules/

# misc
/coverage/
/DEBUG/
!.*
.*/
.eslintcache

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/npm-shrinkwrap.json.ember-try
/package.json.ember-try
/package-lock.json.ember-try
/yarn.lock.ember-try

# the doc app uses a separate eslint config
/docs/

# build tests
/build-tests/app-template/
4 changes: 4 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ module.exports = {
// test files
files: ['tests/**/*-test.{js,ts}'],
extends: ['plugin:qunit/recommended'],
rules: {
// Disable assert.expect errors
'qunit/require-expect': 'off',
},
},
],
};
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ on:
- cron: '0 3 * * 1' # Mondays at 3am

env:
node-version: '14.x'
node-version: '18'
CI: true
GOOGLE_MAPS_API_KEY: ${{ secrets.GOOGLE_MAPS_API_KEY }}

Expand Down Expand Up @@ -99,8 +99,9 @@ jobs:
fail-fast: false
matrix:
try-scenario:
- ember-lts-3.28
- ember-lts-4.4
- ember-lts-4.8
- ember-lts-4.12
- ember-release
- ember-beta
- ember-classic
Expand Down
9 changes: 1 addition & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,28 +1,21 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist/
/tmp/
/declarations/

# dependencies
/bower_components/
/node_modules/

# misc
/.env*
/.pnp*
/.sass-cache
/.eslintcache
/connect.lock
/coverage/
/libpeerconnection.log
/npm-debug.log*
/testem.log
/yarn-error.log

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/npm-shrinkwrap.json.ember-try
/package.json.ember-try
/package-lock.json.ember-try
Expand Down
18 changes: 6 additions & 12 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,7 @@
/dist/
/tmp/

# dependencies
/bower_components/

# docs
/docs/

# dev
/lib/ast-transforms/debug-canvas-enforcer.js

# misc
/.bowerrc
/.editorconfig
/.ember-cli
/.env*
Expand All @@ -28,7 +18,6 @@
/.stylelintrc.js
/.template-lintrc.js
/.watchmanconfig
/bower.json
/CONTRIBUTING.md
/ember-cli-build.js
/testem.js
Expand All @@ -40,8 +29,13 @@

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/npm-shrinkwrap.json.ember-try
/package.json.ember-try
/package-lock.json.ember-try
/yarn.lock.ember-try

# docs
/docs/

# dev
/lib/ast-transforms/debug-canvas-enforcer.js
14 changes: 1 addition & 13 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,25 +1,13 @@
# unconventional js
/blueprints/*/files/
/vendor/

# compiled output
/dist/
/tmp/

# dependencies
/bower_components/
/node_modules/

# misc
/coverage/
!.*
.eslintcache
.lint-todo/
.*/

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/npm-shrinkwrap.json.ember-try
/package.json.ember-try
/package-lock.json.ember-try
/yarn.lock.ember-try
2 changes: 1 addition & 1 deletion .watchmanconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"ignore_dirs": ["tmp", "dist"]
"ignore_dirs": ["dist"]
}
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ Assign this key to the `GOOGLE_MAPS_API_KEY` variable in `.env` or just run thes

## Running tests

* `ember test` – Runs the test suite on the current Ember version
* `ember test --server` – Runs the test suite in "watch mode"
* `ember try:each` – Runs the test suite against multiple Ember versions
* `yarn test` – Runs the test suite on the current Ember version
* `yarn test:ember --server` – Runs the test suite in "watch mode"
* `yarn test:ember-compatibility` – Runs the test suite against multiple Ember versions

## Running the dummy application

* `ember serve`
* `yarn start`
* Visit the dummy application at [http://localhost:4200](http://localhost:4200).

For more information on using ember-cli, visit [https://cli.emberjs.com/release/](https://cli.emberjs.com/release/).
Expand Down
2 changes: 1 addition & 1 deletion addon/component-managers/map-component-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export class MapComponentManager {
setupMapComponent(component) {
assert(
'Each map component needs to have a `setup` method.',
component.setup
component.setup,
);

let token = testWaiter.beginAsync();
Expand Down
6 changes: 3 additions & 3 deletions addon/components/g-map/autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ Did you mean to use the block form? You can also do the following:
<map.autocomplete id="my-custom-id" class="my-custom-class" />
`,
this.inputElement
this.inputElement,
);

let autocomplete = new google.maps.places.Autocomplete(
this.inputElement,
options
options,
);

this.addEventsToMapComponent(autocomplete, events, this.publicAPI);
Expand All @@ -41,7 +41,7 @@ Did you mean to use the block form? You can also do the following:
this.addEventsToMapComponent(
autocomplete,
{ onPlaceChanged: onSearch },
this.publicAPI
this.publicAPI,
);
}

Expand Down
2 changes: 1 addition & 1 deletion addon/components/g-map/overlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export default class OverlayView extends MapComponent {
this.addEventsToMapComponent(
this.overlayElement,
this.events,
this.publicAPI
this.publicAPI,
);
}

Expand Down
2 changes: 1 addition & 1 deletion addon/modifiers/g-map/did-insert.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { assert } from '@ember/debug';
function gMapDidInsert(element, [callback, ...positional], named) {
assert(
'`g-map/did-insert` expects a function as its first positional argument.',
typeof callback === 'function'
typeof callback === 'function',
);

callback(element, positional, named);
Expand Down
2 changes: 1 addition & 1 deletion addon/services/google-maps-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export default class GoogleMapsApiService extends Service {
ember-google-maps: You tried to load the Google Maps API, but the source URL was empty. \
Perhaps you forgot to specify the API key? \
Learn more: https://ember-google-maps.sandydoo.me/docs/getting-started`,
src
src,
);

return new Promise((resolve, reject) => {
Expand Down
4 changes: 2 additions & 2 deletions addon/utils/options-and-events.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ class ArgsProxyHandler {

ownKeys() {
return Array.from(
new Set([...this.setCache.keys(), ...this.cache.values()])
new Set([...this.setCache.keys(), ...this.cache.values()]),
);
}

Expand Down Expand Up @@ -198,7 +198,7 @@ export function addEventListener(
target,
originalEventName,
action,
payload = {}
payload = {},
) {
let isDom = target instanceof Element;
let isOnce = isOnceEvent(originalEventName);
Expand Down
6 changes: 3 additions & 3 deletions docs/app/controllers/examples/sweet-rentals.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ export default class SweetRentalsController extends Controller {
newNorthEast = google.maps.geometry.spherical.computeOffset(
northEast,
distance,
45
45,
),
newSouthWest = google.maps.geometry.spherical.computeOffset(
southWest,
distance,
-135
-135,
),
extendedBounds = mapBounds.extend(newNorthEast).extend(newSouthWest);

Expand All @@ -78,7 +78,7 @@ export default class SweetRentalsController extends Controller {
getRentals() {
return this.google.then(() => {
return this.mapData.londonLocations.map(
(location) => new Rental({ ...location, active: false })
(location) => new Rental({ ...location, active: false }),
);
});
}
Expand Down
2 changes: 1 addition & 1 deletion docs/app/services/map-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default class MapDataService extends Service {
n = this.google.maps.geometry.spherical.computeOffset(
origin,
distance,
heading
heading,
),
type = randomInt(1, 5);

Expand Down
2 changes: 1 addition & 1 deletion docs/ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

const EmberApp = require('ember-cli/lib/broccoli/ember-app');

module.exports = function(defaults) {
module.exports = function (defaults) {
const app = new EmberApp(defaults, {
snippetPaths: ['code-snippets'],

Expand Down
3 changes: 2 additions & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,5 +106,6 @@
},
"ember": {
"edition": "octane"
}
},
"dependencies": {}
}
7 changes: 1 addition & 6 deletions docs/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5201,12 +5201,7 @@ caniuse-api@^3.0.0:
lodash.memoize "^4.1.2"
lodash.uniq "^4.5.0"

caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000844, caniuse-lite@^1.0.30001449:
version "1.0.30001566"
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001566.tgz"
integrity sha512-ggIhCsTxmITBAMmK8yZjEhCO5/47jKXPu6Dha/wuCS4JePVL+3uiDEBuhu2aIoT+bqTOR8L76Ip1ARL9xYsEJA==

caniuse-lite@^1.0.30001565:
caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000844, caniuse-lite@^1.0.30001449, caniuse-lite@^1.0.30001565:
version "1.0.30001571"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001571.tgz#4182e93d696ff42930f4af7eba515ddeb57917ac"
integrity sha512-tYq/6MoXhdezDLFZuCO/TKboTzuQ/xR5cFdgXPfDtM7/kchBO3b4VWghE/OAi/DV7tTdhmLjZiZBZi1fA/GheQ==
Expand Down
10 changes: 5 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ module.exports = {
init() {
this._super.init.apply(this, arguments);
this.debugTree = BroccoliDebug.buildDebugCallback(
`ember-google-maps:${this.name}`
`ember-google-maps:${this.name}`,
);
},

Expand Down Expand Up @@ -123,7 +123,7 @@ module.exports = {
'canvas',
'mapComponent',
'typicalMapComponent',
'customComponentTemplate'
'customComponentTemplate',
);

if (this.isDevelopment) {
Expand Down Expand Up @@ -309,7 +309,7 @@ module.exports = {
return Object.assign(
{},
componentsFromAddons,
this.customComponents.merge()
this.customComponents.merge(),
);
},

Expand Down Expand Up @@ -345,13 +345,13 @@ module.exports = {

if (key && client) {
this.warn(
'You must specify either a Google Maps API key or a Google Maps Premium Plan Client ID, but not both. Learn more: https://ember-google-maps.sandydoo.me/docs/getting-started'
'You must specify either a Google Maps API key or a Google Maps Premium Plan Client ID, but not both. Learn more: https://ember-google-maps.sandydoo.me/docs/getting-started',
);
}

if (channel && !client) {
this.warn(
'The Google Maps API channel parameter is only available when using a client ID, not when using an API key. Learn more: https://ember-google-maps.sandydoo.me/docs/getting-started'
'The Google Maps API channel parameter is only available when using a client ID, not when using an API key. Learn more: https://ember-google-maps.sandydoo.me/docs/getting-started',
);
}

Expand Down
Loading

0 comments on commit ad970b2

Please sign in to comment.