upgrade to Ember 3.20 (#447)
This commit is contained in:
parent
87d7b5d36d
commit
fee222e995
12 changed files with 996 additions and 748 deletions
|
@ -4,7 +4,6 @@
|
||||||
|
|
||||||
root = true
|
root = true
|
||||||
|
|
||||||
|
|
||||||
[*]
|
[*]
|
||||||
end_of_line = lf
|
end_of_line = lf
|
||||||
charset = utf-8
|
charset = utf-8
|
||||||
|
|
18
.eslintrc.js
18
.eslintrc.js
|
@ -1,3 +1,5 @@
|
||||||
|
'use strict';
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
root: true,
|
root: true,
|
||||||
parser: 'babel-eslint',
|
parser: 'babel-eslint',
|
||||||
|
@ -19,8 +21,15 @@ module.exports = {
|
||||||
browser: true,
|
browser: true,
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
|
// Croodle is not compliant with some of the recommended rules yet.
|
||||||
|
// We should refactor the code step by step and enable them as soon
|
||||||
|
// as the code is compliant.
|
||||||
|
'ember/no-get': 'warn',
|
||||||
'ember/no-observers': 'warn',
|
'ember/no-observers': 'warn',
|
||||||
'ember/no-jquery': 'error',
|
'ember/require-computed-property-dependencies': 'warn',
|
||||||
|
'no-prototype-builtins': 'warn',
|
||||||
|
'no-setter-return': 'warn',
|
||||||
|
'no-useless-catch': 'warn',
|
||||||
},
|
},
|
||||||
overrides: [
|
overrides: [
|
||||||
// node files
|
// node files
|
||||||
|
@ -43,13 +52,12 @@ module.exports = {
|
||||||
node: true
|
node: true
|
||||||
},
|
},
|
||||||
plugins: ['node'],
|
plugins: ['node'],
|
||||||
rules: Object.assign({}, require('eslint-plugin-node').configs.recommended.rules, {
|
extends: ['plugin:node/recommended'],
|
||||||
// add your custom rules and overrides for node files here
|
rules: {
|
||||||
|
|
||||||
// this can be removed once the following is fixed
|
// this can be removed once the following is fixed
|
||||||
// https://github.com/mysticatea/eslint-plugin-node/issues/77
|
// https://github.com/mysticatea/eslint-plugin-node/issues/77
|
||||||
'node/no-unpublished-require': 'off'
|
'node/no-unpublished-require': 'off'
|
||||||
})
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
4
.github/workflows/test-workflow.yml
vendored
4
.github/workflows/test-workflow.yml
vendored
|
@ -79,7 +79,7 @@ jobs:
|
||||||
CI: true
|
CI: true
|
||||||
run: yarn build --environment test
|
run: yarn build --environment test
|
||||||
- name: run tests in chrome
|
- name: run tests in chrome
|
||||||
run: yarn test --launch Chrome --path dist
|
run: yarn test:ember --launch Chrome --path dist
|
||||||
test-firefox:
|
test-firefox:
|
||||||
name: test in firefox
|
name: test in firefox
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -97,7 +97,7 @@ jobs:
|
||||||
CI: true
|
CI: true
|
||||||
run: yarn build --environment test
|
run: yarn build --environment test
|
||||||
- name: run tests in firefox
|
- name: run tests in firefox
|
||||||
run: yarn test --launch Firefox --path dist
|
run: yarn test:ember --launch Firefox --path dist
|
||||||
test-backend:
|
test-backend:
|
||||||
name: Test php backend
|
name: Test php backend
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
|
@ -35,7 +35,7 @@ before_script:
|
||||||
|
|
||||||
script:
|
script:
|
||||||
# run tests on BrowserStack
|
# run tests on BrowserStack
|
||||||
- yarn test --config-file testem.browserstack.js
|
- yarn test:ember --config-file testem.browserstack.js
|
||||||
|
|
||||||
after_script:
|
after_script:
|
||||||
# destroy the sauce tunnel
|
# destroy the sauce tunnel
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
import RESTAdapter from '@ember-data/adapter/rest';
|
import RESTAdapter from '@ember-data/adapter/rest';
|
||||||
import { inject as service } from '@ember/service';
|
import { inject as service } from '@ember/service';
|
||||||
import AdapterFetch from 'ember-fetch/mixins/adapter-fetch';
|
|
||||||
|
|
||||||
export default class ApplicationAdapter extends RESTAdapter.extend(AdapterFetch) {
|
export default class ApplicationAdapter extends RESTAdapter {
|
||||||
@service
|
@service
|
||||||
encryption;
|
encryption;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import Application from '@ember/application';
|
import Application from '@ember/application';
|
||||||
import Resolver from 'ember-resolver';
|
import Resolver from 'ember-resolver';
|
||||||
import loadInitializers from 'ember-load-initializers';
|
import loadInitializers from 'ember-load-initializers';
|
||||||
import config from './config/environment';
|
import config from 'croodle/config/environment';
|
||||||
|
|
||||||
export default class App extends Application {
|
export default class App extends Application {
|
||||||
modulePrefix = config.modulePrefix;
|
modulePrefix = config.modulePrefix;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import EmberRouter from '@ember/routing/router';
|
import EmberRouter from '@ember/routing/router';
|
||||||
import config from './config/environment';
|
import config from 'croodle/config/environment';
|
||||||
|
|
||||||
export default class Router extends EmberRouter {
|
export default class Router extends EmberRouter {
|
||||||
location = config.locationType;
|
location = config.locationType;
|
||||||
|
|
21
config/ember-cli-update.json
Normal file
21
config/ember-cli-update.json
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
"schemaVersion": "1.0.0",
|
||||||
|
"packages": [
|
||||||
|
{
|
||||||
|
"name": "ember-cli",
|
||||||
|
"version": "3.20.2",
|
||||||
|
"blueprints": [
|
||||||
|
{
|
||||||
|
"name": "app",
|
||||||
|
"outputRepo": "https://github.com/ember-cli/ember-new-output",
|
||||||
|
"codemodsSource": "ember-app-codemods-manifest@1",
|
||||||
|
"isBaseBlueprint": true,
|
||||||
|
"options": [
|
||||||
|
"--yarn",
|
||||||
|
"--no-welcome"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
42
package.json
42
package.json
|
@ -10,31 +10,34 @@
|
||||||
"test": "tests"
|
"test": "tests"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "ember build",
|
"build": "ember build --environment=production",
|
||||||
|
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*",
|
||||||
"lint:hbs": "ember-template-lint .",
|
"lint:hbs": "ember-template-lint .",
|
||||||
"lint:js": "eslint .",
|
"lint:js": "eslint .",
|
||||||
"release": "release-it",
|
"release": "release-it",
|
||||||
"start": "ember serve",
|
"start": "ember serve",
|
||||||
"test": "ember test",
|
"test": "npm-run-all lint:* test:*",
|
||||||
|
"test:ember": "ember test",
|
||||||
"test:bundlesize": "ember bundlesize:test",
|
"test:bundlesize": "ember bundlesize:test",
|
||||||
"test:csp-header": "grep \"`ember csp-headers --environment production --silent 2>&1 | sed 's/ $//'`\" public/.htaccess || (echo \"CSP headers in public/.htaccess does not match configuration\" && exit 1)"
|
"test:csp-header": "grep \"`ember csp-headers --environment production --silent 2>&1 | sed 's/ $//'`\" public/.htaccess || (echo \"CSP headers in public/.htaccess does not match configuration\" && exit 1)"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@ember-intl/cp-validations": "^4.0.1",
|
"@ember-intl/cp-validations": "^4.0.1",
|
||||||
"@ember/optional-features": "^1.1.0",
|
"@ember/optional-features": "^1.3.0",
|
||||||
"@glimmer/component": "^1.0.0",
|
"@glimmer/component": "^1.0.1",
|
||||||
"babel-eslint": "^10.0.0",
|
"@glimmer/tracking": "^1.0.0",
|
||||||
|
"babel-eslint": "^10.1.0",
|
||||||
"bootstrap": "^4.3.1",
|
"bootstrap": "^4.3.1",
|
||||||
"broccoli-asset-rev": "^3.0.0",
|
"broccoli-asset-rev": "^3.0.0",
|
||||||
"ember-auto-import": "^1.5.3",
|
"ember-auto-import": "^1.6.0",
|
||||||
"ember-awesome-macros": "^6.0.0",
|
"ember-awesome-macros": "^6.0.0",
|
||||||
"ember-bootstrap": "^3.0.0",
|
"ember-bootstrap": "^3.0.0",
|
||||||
"ember-bootstrap-cp-validations": "^2.0.0",
|
"ember-bootstrap-cp-validations": "^2.0.0",
|
||||||
"ember-classic-decorator": "^2.0.0",
|
"ember-classic-decorator": "^2.0.0",
|
||||||
"ember-cli": "~3.15.1",
|
"ember-cli": "~3.20.2",
|
||||||
"ember-cli-acceptance-test-helpers": "^1.0.0",
|
"ember-cli-acceptance-test-helpers": "^1.0.0",
|
||||||
"ember-cli-app-version": "^3.2.0",
|
"ember-cli-app-version": "^3.2.0",
|
||||||
"ember-cli-babel": "^7.13.0",
|
"ember-cli-babel": "^7.21.0",
|
||||||
"ember-cli-browser-navigation-button-test-helper": "^0.2.0",
|
"ember-cli-browser-navigation-button-test-helper": "^0.2.0",
|
||||||
"ember-cli-browserstack": "^1.0.0",
|
"ember-cli-browserstack": "^1.0.0",
|
||||||
"ember-cli-bundlesize": "^0.3.0",
|
"ember-cli-bundlesize": "^0.3.0",
|
||||||
|
@ -43,16 +46,14 @@
|
||||||
"ember-cli-content-security-policy": "^1.0.0",
|
"ember-cli-content-security-policy": "^1.0.0",
|
||||||
"ember-cli-dependency-checker": "^3.2.0",
|
"ember-cli-dependency-checker": "^3.2.0",
|
||||||
"ember-cli-deprecation-workflow": "^1.0.1",
|
"ember-cli-deprecation-workflow": "^1.0.1",
|
||||||
"ember-cli-eslint": "^5.1.0",
|
|
||||||
"ember-cli-flash": "^2.0.0",
|
"ember-cli-flash": "^2.0.0",
|
||||||
"ember-cli-htmlbars": "^4.2.0",
|
"ember-cli-htmlbars": "^5.2.0",
|
||||||
"ember-cli-inject-live-reload": "^2.0.1",
|
"ember-cli-inject-live-reload": "^2.0.2",
|
||||||
"ember-cli-mirage": "^1.0.0-beta.1",
|
"ember-cli-mirage": "^1.0.0-beta.1",
|
||||||
"ember-cli-moment-shim": "^3.7.1",
|
"ember-cli-moment-shim": "^3.7.1",
|
||||||
"ember-cli-page-object": "^1.11.0",
|
"ember-cli-page-object": "^1.11.0",
|
||||||
"ember-cli-sass": "^10.0.0",
|
"ember-cli-sass": "^10.0.0",
|
||||||
"ember-cli-sri": "^2.1.1",
|
"ember-cli-sri": "^2.1.1",
|
||||||
"ember-cli-template-lint": "^1.0.0-beta.3",
|
|
||||||
"ember-cli-uglify": "^3.0.0",
|
"ember-cli-uglify": "^3.0.0",
|
||||||
"ember-composable-helpers": "^4.0.0",
|
"ember-composable-helpers": "^4.0.0",
|
||||||
"ember-cp-validations": "^4.0.0-beta.8",
|
"ember-cp-validations": "^4.0.0-beta.8",
|
||||||
|
@ -60,7 +61,7 @@
|
||||||
"ember-data-model-fragments": "^4.0.0",
|
"ember-data-model-fragments": "^4.0.0",
|
||||||
"ember-decorators": "^6.1.1",
|
"ember-decorators": "^6.1.1",
|
||||||
"ember-export-application-global": "^2.0.1",
|
"ember-export-application-global": "^2.0.1",
|
||||||
"ember-fetch": "^7.0.0",
|
"ember-fetch": "^8.0.1",
|
||||||
"ember-intl": "^4.2.2",
|
"ember-intl": "^4.2.2",
|
||||||
"ember-load-initializers": "^2.1.1",
|
"ember-load-initializers": "^2.1.1",
|
||||||
"ember-math-helpers": "^2.8.1",
|
"ember-math-helpers": "^2.8.1",
|
||||||
|
@ -70,25 +71,28 @@
|
||||||
"ember-power-calendar": "^0.16.0",
|
"ember-power-calendar": "^0.16.0",
|
||||||
"ember-power-calendar-moment": "^0.1.4",
|
"ember-power-calendar-moment": "^0.1.4",
|
||||||
"ember-qunit": "^4.6.0",
|
"ember-qunit": "^4.6.0",
|
||||||
"ember-resolver": "^7.0.0",
|
"ember-resolver": "^8.0.0",
|
||||||
"ember-source": "~3.15.0",
|
"ember-source": "~3.20.2",
|
||||||
|
"ember-template-lint": "^2.9.1",
|
||||||
"ember-test-selectors": "^5.0.0",
|
"ember-test-selectors": "^5.0.0",
|
||||||
"ember-transition-helper": "^1.0.0",
|
"ember-transition-helper": "^1.0.0",
|
||||||
"ember-truth-helpers": "^3.0.0",
|
"ember-truth-helpers": "^3.0.0",
|
||||||
"eslint-plugin-ember": "^7.7.1",
|
"eslint": "^7.5.0",
|
||||||
"eslint-plugin-node": "^11.0.0",
|
"eslint-plugin-ember": "^8.9.1",
|
||||||
|
"eslint-plugin-node": "^11.1.0",
|
||||||
"fs-extra": "^9.0.0",
|
"fs-extra": "^9.0.0",
|
||||||
"lerna-changelog": "^1.0.0",
|
"lerna-changelog": "^1.0.0",
|
||||||
"loader.js": "^4.7.0",
|
"loader.js": "^4.7.0",
|
||||||
|
"npm-run-all": "^4.1.5",
|
||||||
"open-iconic": "^1.1.1",
|
"open-iconic": "^1.1.1",
|
||||||
"qunit-dom": "^0.9.2",
|
"qunit-dom": "^1.2.0",
|
||||||
"release-it": "^14.0.0",
|
"release-it": "^14.0.0",
|
||||||
"release-it-lerna-changelog": "^2.0.0",
|
"release-it-lerna-changelog": "^2.0.0",
|
||||||
"sass": "^1.19.0",
|
"sass": "^1.19.0",
|
||||||
"sjcl": "^1.0.8"
|
"sjcl": "^1.0.8"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "8.* || >= 10.*"
|
"node": "10.* || >= 12"
|
||||||
},
|
},
|
||||||
"ember": {
|
"ember": {
|
||||||
"edition": "octane"
|
"edition": "octane"
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
'use strict';
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
test_page: 'tests/index.html?hidepassed',
|
test_page: 'tests/index.html?hidepassed',
|
||||||
disable_watching: true,
|
disable_watching: true,
|
||||||
|
@ -8,6 +10,7 @@ module.exports = {
|
||||||
launch_in_dev: [
|
launch_in_dev: [
|
||||||
'Chrome'
|
'Chrome'
|
||||||
],
|
],
|
||||||
|
browser_start_timeout: 120,
|
||||||
browser_args: {
|
browser_args: {
|
||||||
Chrome: {
|
Chrome: {
|
||||||
ci: [
|
ci: [
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import Application from '../app';
|
import Application from 'croodle/app';
|
||||||
import config from '../config/environment';
|
import config from 'croodle/config/environment';
|
||||||
import { setApplication } from '@ember/test-helpers';
|
import { setApplication } from '@ember/test-helpers';
|
||||||
import { start } from 'ember-qunit';
|
import { start } from 'ember-qunit';
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue