Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ember-cli to 3.28 #87

Merged
merged 6 commits into from
May 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
29 changes: 14 additions & 15 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,15 @@ module.exports = {
// 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',
],
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',
'./tests/dummy/config/**/*.js',
],
parserOptions: {
sourceType: 'script',
Expand All @@ -50,5 +44,10 @@ module.exports = {
plugins: ['node'],
extends: ['plugin:node/recommended'],
},
{
// Test files:
files: ['tests/**/*-test.{js,ts}'],
extends: ['plugin:qunit/recommended'],
},
],
};
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,12 @@ jobs:
needs: test

strategy:
fail-fast: true
fail-fast: false
matrix:
ember-try-scenario: [
ember-lts-3.12,
ember-lts-3.16,
ember-lts-3.20,
ember-lts-3.24,
ember-release,
ember-beta,
ember-default-with-jquery,
Expand Down
3 changes: 3 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
/.eslintrc.js
/.git/
/.gitignore
/.prettierignore
/.prettierrc.js
/.template-lintrc.js
/.travis.yml
/.watchmanconfig
Expand All @@ -24,6 +26,7 @@
/ember-cli-build.js
/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',
};
5 changes: 2 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@

## Linting

* `npm run lint:hbs`
* `npm run lint:js`
* `npm run lint:js -- --fix`
* `yarn lint`
* `yarn lint:fix`

## Running tests

Expand Down
32 changes: 26 additions & 6 deletions config/ember-try.js
Original file line number Diff line number Diff line change
@@ -1,56 +1,71 @@
'use strict';

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

module.exports = async function () {
return {
useYarn: true,
scenarios: [
{
name: 'ember-lts-3.12',
name: 'ember-lts-3.16',
npm: {
devDependencies: {
'ember-source': '~3.12.0',
'ember-source': '~3.16.0',
},
},
},
{
name: 'ember-lts-3.16',
name: 'ember-lts-3.20',
npm: {
devDependencies: {
'ember-source': '~3.16.0',
'ember-source': '~3.20.0',
},
},
},
{
name: 'ember-lts-3.20',
name: 'ember-lts-3.24',
npm: {
devDependencies: {
'ember-source': '~3.24.3',
},
},
},
{
name: 'ember-lts-3.28',
npm: {
devDependencies: {
'ember-source': '~3.20.5',
'ember-source': '~3.28.0',
},
},
},
{
name: 'ember-release',
npm: {
devDependencies: {
'ember-auto-import': '^2.2.0',
'ember-source': await getChannelURL('release'),
webpack: '^5.0.0',
},
},
},
{
name: 'ember-beta',
npm: {
devDependencies: {
'ember-auto-import': '^2.2.0',
'ember-source': await getChannelURL('beta'),
webpack: '^5.0.0',
},
},
},
{
name: 'ember-canary',
npm: {
devDependencies: {
'ember-auto-import': '^2.2.0',
'ember-source': await getChannelURL('canary'),
webpack: '^5.0.0',
},
},
},
Expand All @@ -77,11 +92,16 @@ module.exports = async function () {
}),
},
npm: {
devDependencies: {
'ember-source': '~3.28.0',
},
ember: {
edition: 'classic',
},
},
},
embroiderSafe(),
embroiderOptimized(),
],
};
};
9 changes: 8 additions & 1 deletion ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,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',
},
],
});
};
48 changes: 25 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,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 @@ -37,51 +37,53 @@
"test:ember-compatibility": "ember try:each"
},
"dependencies": {
"ember-cli-babel": "^7.26.6",
"ember-cli-htmlbars": "^5.3.1",
"ember-cli-babel": "^7.26.10",
"ember-cli-htmlbars": "^5.7.2",
"ember-notify-property-change-polyfill": "^0.0.1"
},
"devDependencies": {
"@ember/optional-features": "^2.0.0",
"@ember/test-helpers": "^2.1.4",
"@glimmer/component": "^1.0.3",
"@glimmer/tracking": "^1.0.3",
"@ember/test-helpers": "^2.6.0",
"@embroider/test-setup": "^0.48.1",
"@glimmer/component": "^1.0.4",
"@glimmer/tracking": "^1.0.4",
"babel-eslint": "^10.1.0",
"broccoli-asset-rev": "^3.0.0",
"ember-auto-import": "^1.10.1",
"ember-cli": "~3.24.0",
"ember-auto-import": "^1.12.0",
"ember-cli": "~3.28.5",
"ember-cli-dependency-checker": "^3.2.0",
"ember-cli-inject-live-reload": "^2.0.2",
"ember-cli-inject-live-reload": "^2.1.0",
"ember-cli-release": "^1.0.0-beta.2",
"ember-cli-sri": "^2.1.1",
"ember-cli-terser": "^4.0.1",
"ember-cli-update": "^0.45.0",
"ember-cli-terser": "^4.0.2",
"ember-cli-update": "^1.0.1",
"ember-disable-prototype-extensions": "^1.1.3",
"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.1",
"ember-resolver": "^8.0.2",
"ember-source": "~3.24.0",
"ember-page-title": "^6.2.2",
"ember-qunit": "^5.1.5",
"ember-resolver": "^8.0.3",
"ember-source": "~3.28.8",
"ember-source-channel-url": "^3.0.0",
"ember-template-lint": "^2.15.0",
"ember-template-lint": "^3.15.0",
"ember-try": "^1.4.0",
"eslint": "^7.17.0",
"eslint-config-prettier": "^7.1.0",
"eslint-plugin-ember": "^10.1.1",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-ember": "^10.5.8",
"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.13.0",
"prettier": "^2.5.1",
"qunit": "^2.17.2",
"qunit-dom": "^1.6.0",
"release-it": "^14.2.1",
"release-it-lerna-changelog": "^3.1.0"
},
"engines": {
"node": "12.* || >= 14"
"node": "12.* || 14.* || >= 16"
},
"publishConfig": {
"registry": "https://registry.npmjs.org"
Expand Down
5 changes: 0 additions & 5 deletions tests/.eslintrc.js

This file was deleted.

34 changes: 13 additions & 21 deletions tests/dummy/app/controllers/application.js
Original file line number Diff line number Diff line change
@@ -1,32 +1,24 @@
/* eslint-disable ember/no-classic-classes */
/* eslint-disable ember/no-get */
import Controller from '@ember/controller';
import { computed } from '@ember/object';
import BufferedProxy from 'ember-buffered-proxy/proxy';
import { action } from '@ember/object';

export default Controller.extend({
computedOnBuffer: computed('buffer.firstName', function () {
return this.get('buffer.firstName').split('').reverse().join('');
}),
export default class extends Controller {
get computedOnBuffer() {
return this.buffer.get('firstName').split('').reverse().join('');
}

init() {
this._super(...arguments);
constructor() {
super(...arguments);

let user = {
this.user = {
firstName: 'stefan',
email: 'example@example.com',
};

let buffer = BufferedProxy.create({
content: user,
this.buffer = BufferedProxy.create({
content: this.user,
});

this.setProperties({
buffer: buffer,
user: user,
});
},
}

@action
applyChanges(field, ev) {
Expand All @@ -40,7 +32,7 @@ export default Controller.extend({
} else {
this.buffer.applyBufferedChanges();
}
},
}

@action
discardChanges(field, ev) {
Expand All @@ -54,5 +46,5 @@ export default Controller.extend({
} else {
this.buffer.discardBufferedChanges();
}
},
});
}
}
4 changes: 2 additions & 2 deletions tests/dummy/app/templates/application.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

<div id="buffer-has-changes">{{this.buffer.hasChanges}}</div>

<Input id="firstname-input" @value={{this.buffer.firstName}} @onChange={{fn (mut this.buffer.firstName)}} />
<Input id="email-input" @value={{this.buffer.email}} @onChange={{fn (mut this.buffer.email)}} />
<Input id="firstname-input" @value={{this.buffer.firstName}} />
<Input id="email-input" @value={{this.buffer.email}} />

<button
type="button"
Expand Down
21 changes: 21 additions & 0 deletions tests/dummy/config/ember-cli-update.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"schemaVersion": "1.0.0",
"packages": [
{
"name": "ember-cli",
"version": "3.28.5",
"blueprints": [
{
"name": "addon",
"outputRepo": "https://github.com/ember-cli/ember-addon-output",
"codemodsSource": "ember-addon-codemods-manifest@1",
"isBaseBlueprint": true,
"options": [
"--yarn",
"--no-welcome"
]
}
]
}
]
}
Loading