Skip to content

Commit

Permalink
Merge pull request #169 from sandydoo/upgrade/ember-4
Browse files Browse the repository at this point in the history
  • Loading branch information
sandydoo authored Apr 8, 2022
2 parents 0f1b649 + 5a89663 commit 9a245f9
Show file tree
Hide file tree
Showing 29 changed files with 3,515 additions and 4,494 deletions.
8 changes: 7 additions & 1 deletion .ember-cli
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,11 @@

Setting `disableAnalytics` to true will prevent any data from being sent.
*/
"disableAnalytics": false
"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.
*/
"isTypeScriptProject": false
}
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@
# 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/
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ module.exports = {
extends: ['plugin:node/recommended'],
},
{
// Test files:
// test files
files: ['tests/**/*-test.{js,ts}'],
extends: ['plugin:qunit/recommended'],
},
Expand Down
19 changes: 11 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ env:
CI: true
GOOGLE_MAPS_API_KEY: ${{ secrets.GOOGLE_MAPS_API_KEY }}

concurrency:
group: ci-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
test:
name: Tests
Expand All @@ -37,7 +41,7 @@ jobs:
- name: Prepare
run: ./.github/scripts/setup-ci.sh
- name: Install dependencies
run: yarn install --frozen-lockfile --non-interactive
run: yarn install --frozen-lockfile
- name: Lint
run: yarn lint
- name: Test
Expand All @@ -63,7 +67,7 @@ jobs:
- name: Test
run: yarn test:build

test-no-lock:
test-floating:
name: Floating Dependencies
runs-on: ubuntu-latest
timeout-minutes: 10
Expand All @@ -76,14 +80,14 @@ jobs:
- name: Prepare
run: ./.github/scripts/setup-ci.sh
- name: Install dependencies
run: yarn install --no-lockfile --non-interactive
run: yarn install --no-lockfile
- name: Test
run: yarn test:ember

test-compatibility:
name: "Scenario Tests: ${{ matrix.scenario }} | optional: ${{ matrix.allow-failure }}"
name: "Scenario: ${{ matrix.scenario }} | optional: ${{ matrix.allow-failure }}"
runs-on: ubuntu-latest
needs: [test, test-build, test-no-lock]
needs: [test, test-build, test-floating]
continue-on-error: ${{ matrix.allow-failure }}
strategy:
fail-fast: false
Expand All @@ -95,7 +99,6 @@ jobs:
- ember-lts-3.28
- ember-release
- ember-beta
- ember-default-with-jquery
- ember-classic
allow-failure: [false]
include:
Expand All @@ -114,7 +117,7 @@ jobs:
- name: Prepare
run: ./.github/scripts/setup-ci.sh
- name: Install dependencies
run: yarn install --frozen-lockfile --non-interactive
run: yarn install --frozen-lockfile
- name: Test
timeout-minutes: 10
run: yarn ember try:one ${{ matrix.scenario }} --- ${{ matrix.command }}
run: ./node_modules/.bin/ember try:one ${{ matrix.scenario }}
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
/.eslintcache
/connect.lock
/coverage/
/DEBUG/
/libpeerconnection.log
/npm-debug.log*
/testem.log
Expand All @@ -25,3 +24,6 @@
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try

# broccoli-debug
/DEBUG/
4 changes: 4 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
/.eslintignore
/.eslintrc.js
/.git/
/.github/
/.gitignore
/.prettierignore
/.prettierrc.js
Expand All @@ -41,4 +42,7 @@
# 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
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@
/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 CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Assign this key to the `GOOGLE_MAPS_API_KEY` variable in `.env` or just run thes
* `ember serve`
* Visit the dummy application at [http://localhost:4200](http://localhost:4200).

For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/).
For more information on using ember-cli, visit [https://cli.emberjs.com/release/](https://cli.emberjs.com/release/).


## Debugging the build process
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,6 @@ Contributing

See the [Contributing](CONTRIBUTING.md) guide for details.

For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/).


License
--------------------------------------------------------------------------------
Expand Down
10 changes: 4 additions & 6 deletions addon/modifiers/g-map/did-insert.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import { modifier } from 'ember-modifier';
import { assert } from '@ember/debug';

export default modifier(function gMapDidInsert(
element,
[callback, ...positional],
named
) {
function gMapDidInsert(element, [callback, ...positional], named) {
assert(
'`g-map/did-insert` expects a function as its first positional argument.',
typeof callback === 'function'
);

callback(element, positional, named);
});
}

export default modifier(gMapDidInsert, { eager: false });
13 changes: 0 additions & 13 deletions config/ember-try.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,6 @@ module.exports = async function () {
},
},
},
{
name: 'ember-default-with-jquery',
env: {
EMBER_OPTIONAL_FEATURES: JSON.stringify({
'jquery-integration': true,
}),
},
npm: {
devDependencies: {
'@ember/jquery': '^1.1.0',
},
},
},
{
name: 'ember-classic',
env: {
Expand Down
8 changes: 7 additions & 1 deletion docs/.ember-cli
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,11 @@

Setting `disableAnalytics` to true will prevent any data from being sent.
*/
"disableAnalytics": false
"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.
*/
"isTypeScriptProject": false
}
3 changes: 3 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,6 @@
/package.json.ember-try
/package-lock.json.ember-try
/yarn.lock.ember-try

# broccoli-debug
/DEBUG/
4 changes: 2 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ You will need the following things properly installed on your computer.
* [Git](https://git-scm.com/)
* [Node.js](https://nodejs.org/)
* [Yarn](https://yarnpkg.com/)
* [Ember CLI](https://ember-cli.com/)
* [Ember CLI](https://cli.emberjs.com/release/)
* [Google Chrome](https://google.com/chrome/)

## Installation
Expand Down Expand Up @@ -52,7 +52,7 @@ Specify what it takes to deploy your app.
## Further Reading / Useful Links

* [ember.js](https://emberjs.com/)
* [ember-cli](https://ember-cli.com/)
* [ember-cli](https://cli.emberjs.com/release/)
* Development Browser Extensions
* [ember inspector for chrome](https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi)
* [ember inspector for firefox](https://addons.mozilla.org/en-US/firefox/addon/ember-inspector/)
2 changes: 1 addition & 1 deletion docs/app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>EmberGoogleMaps</title>
<meta name="description" content="A friendly Ember addon for working with Google Maps.">
<meta name="viewport" content="width=device-width, initial-scale=1">

Expand Down
2 changes: 1 addition & 1 deletion docs/config/ember-cli-update.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"packages": [
{
"name": "ember-cli",
"version": "4.1.0",
"version": "4.3.0",
"blueprints": [
{
"name": "app",
Expand Down
28 changes: 14 additions & 14 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,18 @@
"@babel/plugin-proposal-optional-chaining": "^7.16.7",
"@ember/optional-features": "^2.0.0",
"@ember/test-helpers": "^2.6.0",
"@embroider/compat": "~0.50.0",
"@embroider/core": "~0.50.0",
"@embroider/webpack": "~0.50.0",
"@embroider/compat": "~1.6.0",
"@embroider/core": "~1.6.0",
"@embroider/webpack": "~1.6.0",
"@glimmer/component": "^1.0.4",
"@glimmer/tracking": "^1.0.4",
"@sandydoo/tracked-maps-and-sets": "^2.2.2",
"babel-eslint": "^10.1.0",
"bootstrap": "^4.4.1",
"broccoli-asset-rev": "^3.0.0",
"dotenv": "^10.0.0",
"ember-auto-import": "^2.2.4",
"ember-cli": "~4.1.0",
"dotenv": "^16.0.0",
"ember-auto-import": "^2.4.1",
"ember-cli": "~4.3.0",
"ember-cli-app-version": "^5.0.0",
"ember-cli-babel": "^7.26.11",
"ember-cli-dependency-checker": "^3.2.0",
Expand All @@ -49,7 +49,7 @@
"ember-cli-deploy-display-revisions": "^2.1.1",
"ember-cli-deploy-gzip": "^2.0.0",
"ember-cli-deploy-manifest": "^2.0.0",
"ember-cli-deploy-revision-data": "^1.0.0",
"ember-cli-deploy-revision-data": "^2.0.0",
"ember-cli-deploy-s3": "^3.0.0",
"ember-cli-deploy-s3-index": "^1.3.1",
"ember-cli-dotenv": "^3.1.0",
Expand All @@ -70,11 +70,11 @@
"ember-page-title": "^7.0.0",
"ember-qunit": "^5.1.5",
"ember-resolver": "^8.0.3",
"ember-source": "~4.1.0",
"ember-template-lint": "^4.0.0",
"ember-source": "~4.3.0",
"ember-template-lint": "^4.3.0",
"eslint": "^8.6.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-ember": "^10.5.8",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-ember": "^10.5.9",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-qunit": "^7.2.0",
Expand All @@ -83,12 +83,12 @@
"prember": "^1.1.0",
"prember-middleware": "^0.1.0",
"prember-sitemap-generator": "0.1.1",
"prettier": "^2.5.1",
"prettier": "^2.6.1",
"prismjs": "^1.26.0",
"qunit": "^2.17.2",
"qunit": "^2.18.0",
"qunit-dom": "^2.0.0",
"sass": "^1.47.0",
"webpack": "^5.65.0"
"webpack": "^5.70.0"
},
"engines": {
"node": "12.* || 14.* || >= 16"
Expand Down
Empty file removed docs/tests/helpers/.gitkeep
Empty file.
42 changes: 42 additions & 0 deletions docs/tests/helpers/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import {
setupApplicationTest as upstreamSetupApplicationTest,
setupRenderingTest as upstreamSetupRenderingTest,
setupTest as upstreamSetupTest,
} from 'ember-qunit';

// This file exists to provide wrappers around ember-qunit's / ember-mocha's
// test setup functions. This way, you can easily extend the setup that is
// needed per test type.

function setupApplicationTest(hooks, options) {
upstreamSetupApplicationTest(hooks, options);

// Additional setup for application tests can be done here.
//
// For example, if you need an authenticated session for each
// application test, you could do:
//
// hooks.beforeEach(async function () {
// await authenticateSession(); // ember-simple-auth
// });
//
// This is also a good place to call test setup functions coming
// from other addons:
//
// setupIntl(hooks); // ember-intl
// setupMirage(hooks); // ember-cli-mirage
}

function setupRenderingTest(hooks, options) {
upstreamSetupRenderingTest(hooks, options);

// Additional setup for rendering tests can be done here.
}

function setupTest(hooks, options) {
upstreamSetupTest(hooks, options);

// Additional setup for unit tests can be done here.
}

export { setupApplicationTest, setupRenderingTest, setupTest };
1 change: 0 additions & 1 deletion docs/tests/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>EmberGoogleMapsDocs Tests</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
Expand Down
Loading

0 comments on commit 9a245f9

Please sign in to comment.