Skip to content

Commit

Permalink
chore: update to Ember v3.28
Browse files Browse the repository at this point in the history
  • Loading branch information
bertdeblock committed Sep 30, 2021
1 parent 041572e commit 62f595b
Show file tree
Hide file tree
Showing 12 changed files with 833 additions and 317 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# misc
/coverage/
!.*
.*/
.eslintcache

# ember-try
Expand Down
61 changes: 15 additions & 46 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,38 +20,23 @@ module.exports = {
browser: true,
},
rules: {
'arrow-parens': ['error', 'always'],
'arrow-spacing': ['error', { before: true, after: true }],
'newline-after-var': 'off',
'newline-before-return': 'off',
'ember/no-classic-components': 'off',
'ember/no-classic-classes': 'off',
'no-magic-numbers': ['off', { ignore: [-1, 0, 1] }],
'object-curly-spacing': ['error', 'always'],
'prefer-const': 'off',
'prefer-rest-params': 'off',
'space-before-blocks': ['error', 'always'],
'ember/no-classic-components': 'off',
},
overrides: [
// node files
{
files: [
'.eslintrc.js',
'.prettierrc.js',
'.template-lintrc.js',
'ember-cli-build.js',
'index.js',
'testem.js',
'blueprints/*/index.js',
'config/**/*.js',
'tests/dummy/config/**/*.js',
'lib/**',
],
excludedFiles: [
'addon/**',
'addon-test-support/**',
'app/**',
'tests/dummy/app/**',
'./.eslintrc.js',
'./.prettierrc.js',
'./.template-lintrc.js',
'./ember-cli-build.js',
'./index.js',
'./testem.js',
'./blueprints/*/index.js',
'./config/**/*.js',
'./lib/**/*.js',
'./tests/dummy/config/**/*.js',
],
parserOptions: {
sourceType: 'script',
Expand All @@ -61,28 +46,12 @@ module.exports = {
node: true,
},
plugins: ['node'],
rules: Object.assign(
{},
require('eslint-plugin-node').configs.recommended.rules,
{
// add your custom rules and overrides for node files here
}
),
extends: ['plugin:node/recommended'],
},

// test files
{
files: ['tests/**/*.js'],
excludedFiles: ['tests/dummy/**/*.js'],
env: {
embertest: true,
},
plugins: ['ember'],
extends: [
'eslint:recommended',
'plugin:ember/recommended',
'plugin:prettier/recommended',
],
// Test files:
files: ['tests/**/*-test.{js,ts}'],
extends: ['plugin:qunit/recommended'],
},
],
};
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
/script
/testem.js
/tests/
/yarn-error.log
/yarn.lock
.gitkeep

Expand Down
2 changes: 1 addition & 1 deletion .template-lintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';

module.exports = {
extends: 'octane',
extends: 'recommended',
};
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ To see Ember Freestyle in action, visit [https://chrislopresto.github.io/ember-f
### Compatibility

* Ember.js v3.16 or above
* Ember CLI v2.13 or above
* Ember CLI v3.16 or above
* Node.js v10 or above

### Support
Expand Down
11 changes: 11 additions & 0 deletions config/ember-try.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict';

const getChannelURL = require('ember-source-channel-url');
const { embroiderSafe, embroiderOptimized } = require('@embroider/test-setup');

module.exports = async function () {
return {
Expand All @@ -22,6 +23,14 @@ module.exports = async function () {
},
},
},
{
name: 'ember-lts-3.24',
npm: {
devDependencies: {
'ember-source': '~3.24.3',
},
},
},
{
name: 'ember-release',
npm: {
Expand Down Expand Up @@ -74,6 +83,8 @@ module.exports = async function () {
},
},
},
embroiderSafe(),
embroiderOptimized(),
],
};
};
9 changes: 8 additions & 1 deletion ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,12 @@ module.exports = function (defaults) {
behave. You most likely want to be modifying `./index.js` or app's build file
*/

return app.toTree();
const { maybeEmbroider } = require('@embroider/test-setup');
return maybeEmbroider(app, {
skipBabel: [
{
package: 'qunit',
},
],
});
};
44 changes: 23 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
"scripts": {
"build": "ember build --environment=production",
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel 'lint:!(fix)'",
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel \"lint:!(fix)\"",
"lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*:fix",
"lint:hbs": "ember-template-lint .",
"lint:hbs:fix": "ember-template-lint . --fix",
Expand All @@ -36,11 +36,11 @@
},
"dependencies": {
"@ember/render-modifiers": "^1.0.2",
"@glimmer/component": "^1.0.3",
"@glimmer/tracking": "^1.0.3",
"ember-auto-import": "^1.10.1",
"ember-cli-babel": "^7.23.0",
"ember-cli-htmlbars": "^5.3.1",
"@glimmer/component": "^1.0.4",
"@glimmer/tracking": "^1.0.4",
"ember-auto-import": "^1.11.3",
"ember-cli-babel": "^7.26.6",
"ember-cli-htmlbars": "^5.7.1",
"ember-cli-sass": "^10.0.0",
"ember-json-viewer": "^0.6.0",
"ember-modifier": "^2.1.0",
Expand All @@ -52,49 +52,51 @@
},
"devDependencies": {
"@ember/optional-features": "^2.0.0",
"@ember/test-helpers": "^2.1.4",
"@ember/test-helpers": "^2.4.2",
"@embroider/test-setup": "^0.43.5",
"all-contributors-cli": "^6.14.1",
"babel-eslint": "^10.1.0",
"broccoli-asset-rev": "^3.0.0",
"ember-cli": "~3.24.0",
"ember-cli": "~3.28.0",
"ember-cli-autoprefixer": "^0.8.1",
"ember-cli-dependency-checker": "^3.2.0",
"ember-cli-deploy": "^1.0.2",
"ember-cli-deploy-build": "^2.0.0",
"ember-cli-deploy-git": "^1.3.4",
"ember-cli-inject-live-reload": "^2.0.2",
"ember-cli-inject-live-reload": "^2.1.0",
"ember-cli-page-object": "^1.17.4",
"ember-cli-sass-lint": "^1.0.3",
"ember-cli-showdown": "^4.1.0",
"ember-cli-sri": "^2.1.0",
"ember-cli-terser": "^4.0.1",
"ember-cli-terser": "^4.0.2",
"ember-code-snippet": "^3.0.0",
"ember-export-application-global": "^2.0.1",
"ember-load-initializers": "^2.1.2",
"ember-maybe-import-regenerator": "^0.1.6",
"ember-page-title": "^6.0.3",
"ember-qunit": "^5.1.2",
"ember-page-title": "^6.2.2",
"ember-qunit": "^5.1.4",
"ember-resolver": "^8.0.2",
"ember-source": "~3.24.0",
"ember-source": "~3.28.0",
"ember-source-channel-url": "^3.0.0",
"ember-template-lint": "^2.15.0",
"ember-template-lint": "^3.6.0",
"ember-try": "^1.4.0",
"eslint": "^7.17.0",
"eslint": "^7.32.0",
"eslint-config-ember": "0.3.0",
"eslint-config-prettier": "^8.1.0",
"eslint-plugin-ember": "^10.1.1",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-ember": "^10.5.4",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-prettier": "^3.4.1",
"eslint-plugin-qunit": "^6.2.0",
"loader.js": "^4.7.0",
"npm-run-all": "^4.1.5",
"prettier": "^2.2.1",
"qunit": "^2.14.0",
"prettier": "^2.3.2",
"qunit": "^2.16.0",
"qunit-dom": "^1.6.0",
"remarkable": "^2.0.0",
"standard-version": "^9.1.0"
},
"engines": {
"node": "10.* || >= 12"
"node": "10.* || 12.* || 14.* || >= 16"
},
"ember": {
"edition": "octane"
Expand Down
2 changes: 1 addition & 1 deletion tests/dummy/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": "3.24.0",
"version": "3.28.0",
"blueprints": [
{
"name": "addon",
Expand Down
20 changes: 14 additions & 6 deletions tests/dummy/config/targets.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,20 @@ const browsers = [
'last 1 Safari versions',
];

const isCI = Boolean(process.env.CI);
const isProduction = process.env.EMBER_ENV === 'production';

if (isCI || isProduction) {
browsers.push('ie 11');
}
// Ember's browser support policy is changing, and IE11 support will end in
// v4.0 onwards.
//
// See https://deprecations.emberjs.com/v3.x#toc_3-0-browser-support-policy
//
// If you need IE11 support on a version of Ember that still offers support
// for it, uncomment the code block below.
//
// const isCI = Boolean(process.env.CI);
// const isProduction = process.env.EMBER_ENV === 'production';
//
// if (isCI || isProduction) {
// browsers.push('ie 11');
// }

module.exports = {
browsers,
Expand Down
2 changes: 1 addition & 1 deletion tests/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
</div>
</div>

<script src="/testem.js" integrity=""></script>
<script src="/testem.js" integrity="" data-embroider-ignore></script>
<script src="{{rootURL}}assets/vendor.js"></script>
<script src="{{rootURL}}assets/test-support.js"></script>
<script src="{{rootURL}}assets/dummy.js"></script>
Expand Down
Loading

0 comments on commit 62f595b

Please sign in to comment.