Skip to content

Commit 85057ba

Browse files
lolmausmixonic
authored andcommitted
Upgrade Ember to 3.28
Using ember-cli-update --to 3.28 Had to keep @ember/test-helpers and ember-qunit on old versions
1 parent 06c7e87 commit 85057ba

File tree

15 files changed

+3312
-3013
lines changed

15 files changed

+3312
-3013
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# misc
1414
/coverage/
1515
!.*
16+
.*/
1617
.eslintcache
1718

1819
# ember-try

.eslintrc.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,10 @@ module.exports = {
5454
'ember/new-module-imports': 0,
5555
},
5656
},
57+
{
58+
// Test files:
59+
files: ['tests/**/*-test.{js,ts}'],
60+
extends: ['plugin:qunit/recommended'],
61+
},
5762
],
5863
};

.npmignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
/.eslintrc.js
1616
/.git/
1717
/.gitignore
18+
/.prettierignore
19+
/.prettierrc.js
1820
/.template-lintrc.js
1921
/.travis.yml
2022
/.watchmanconfig
@@ -24,6 +26,7 @@
2426
/ember-cli-build.js
2527
/testem.js
2628
/tests/
29+
/yarn-error.log
2730
/yarn.lock
2831
.gitkeep
2932

.template-lintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
'use strict';
22

33
module.exports = {
4-
extends: 'octane',
4+
extends: 'recommended',
55
};

CONTRIBUTING.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@
88

99
## Linting
1010

11-
* `yarn lint:hbs`
12-
* `yarn lint:js`
13-
* `yarn lint:js --fix`
11+
* `yarn lint`
12+
* `yarn lint:fix`
1413

1514
## Running tests
1615

config/ember-try.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'use strict';
22

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

56
module.exports = async function () {
67
let emberReleaseVersion = await getChannelURL('release');
@@ -49,7 +50,7 @@ module.exports = async function () {
4950
name: 'ember-lts-3.24',
5051
npm: {
5152
devDependencies: {
52-
'ember-source': '~3.24.0',
53+
'ember-source': '~3.24.3',
5354
},
5455
},
5556
},
@@ -133,6 +134,8 @@ module.exports = async function () {
133134
},
134135
},
135136
},
137+
embroiderSafe(),
138+
embroiderOptimized(),
136139
],
137140
};
138141
};

ember-cli-build.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,12 @@ module.exports = function (defaults) {
2121
behave. You most likely want to be modifying `./index.js` or app's build file
2222
*/
2323

24-
return app.toTree();
24+
const { maybeEmbroider } = require('@embroider/test-setup');
25+
return maybeEmbroider(app, {
26+
skipBabel: [
27+
{
28+
package: 'qunit',
29+
},
30+
],
31+
});
2532
};

package.json

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"scripts": {
1616
"build": "ember build --environment=production",
1717
"changelog": "lerna-changelog",
18-
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel 'lint:!(fix)'",
18+
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel \"lint:!(fix)\"",
1919
"lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*:fix",
2020
"lint:hbs": "ember-template-lint .",
2121
"lint:hbs:fix": "ember-template-lint . --fix",
@@ -34,45 +34,47 @@
3434
"devDependencies": {
3535
"@ember/optional-features": "^2.0.0",
3636
"@ember/test-helpers": "2.2.9",
37-
"@glimmer/component": "^1.0.3",
38-
"@glimmer/tracking": "^1.0.3",
37+
"@embroider/test-setup": "^0.48.1",
38+
"@glimmer/component": "^1.0.4",
39+
"@glimmer/tracking": "^1.0.4",
3940
"babel-eslint": "^10.1.0",
4041
"broccoli-asset-rev": "^3.0.0",
4142
"ember-auto-import": "^2.2.3",
42-
"ember-cli": "~3.25.0",
43-
"ember-cli-babel": "^7.26.6",
43+
"ember-cli": "~3.28.6",
44+
"ember-cli-babel": "^7.26.10",
4445
"ember-cli-dependency-checker": "^3.2.0",
45-
"ember-cli-htmlbars": "^5.3.2",
46-
"ember-cli-inject-live-reload": "^2.0.2",
46+
"ember-cli-htmlbars": "^5.7.2",
47+
"ember-cli-inject-live-reload": "^2.1.0",
4748
"ember-cli-sri": "^2.1.1",
48-
"ember-cli-terser": "^4.0.1",
49+
"ember-cli-terser": "^4.0.2",
4950
"ember-disable-prototype-extensions": "^1.1.3",
5051
"ember-export-application-global": "^2.0.1",
5152
"ember-load-initializers": "^2.1.2",
52-
"ember-page-title": "^6.2.1",
53+
"ember-page-title": "^6.2.2",
5354
"ember-qunit": "~5.0.0",
54-
"ember-resolver": "^8.0.2",
55-
"ember-source": "~3.25.1",
55+
"ember-resolver": "^8.0.3",
56+
"ember-source": "~3.28.8",
5657
"ember-source-channel-url": "^3.0.0",
57-
"ember-template-lint": "^2.18.1",
58+
"ember-template-lint": "^3.15.0",
5859
"ember-try": "^1.4.0",
59-
"eslint": "^7.20.0",
60-
"eslint-config-prettier": "^7.2.0",
61-
"eslint-plugin-ember": "^10.2.0",
60+
"eslint": "^7.32.0",
61+
"eslint-config-prettier": "^8.3.0",
62+
"eslint-plugin-ember": "^10.5.8",
6263
"eslint-plugin-node": "^11.1.0",
63-
"eslint-plugin-prettier": "^3.3.1",
64+
"eslint-plugin-prettier": "^3.4.1",
65+
"eslint-plugin-qunit": "^6.2.0",
6466
"lerna-changelog": "^0.8.0",
6567
"loader.js": "^4.7.0",
6668
"npm-run-all": "^4.1.5",
67-
"prettier": "^2.2.1",
69+
"prettier": "^2.5.1",
6870
"qunit": "^2.17.2",
6971
"qunit-dom": "^1.6.0",
7072
"release-it": "^14.2.1",
7173
"release-it-lerna-changelog": "^3.1.0",
7274
"webpack": "^5.52.1"
7375
},
7476
"engines": {
75-
"node": "12.* || >= 14"
77+
"node": "12.* || 14.* || >= 16"
7678
},
7779
"publishConfig": {
7880
"registry": "https://registry.npmjs.org"

tests/acceptance/workflow-config-test.js

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ module('workflow config', function (hooks) {
1414
window.Testem.handleConsoleMessage = originalWarn;
1515
});
1616

17-
test('deprecation silenced with string matcher', (assert) => {
17+
test('deprecation silenced with string matcher', function (assert) {
1818
deprecate('silence-strict', false, {
1919
since: '2.0.0',
2020
until: 'forever',
@@ -24,13 +24,14 @@ module('workflow config', function (hooks) {
2424
assert.ok(true, 'Deprecation did not raise');
2525
});
2626

27-
test('deprecation logs with message matcher', (assert) => {
27+
test('deprecation logs with message matcher', function (assert) {
2828
assert.expect(1);
2929

3030
let message = 'log-strict';
3131
window.Testem.handleConsoleMessage = function (passedMessage) {
32-
assert.ok(
33-
passedMessage.indexOf('DEPRECATION: ' + message) === 0,
32+
assert.strictEqual(
33+
passedMessage.indexOf('DEPRECATION: ' + message),
34+
0,
3435
'deprecation logs'
3536
);
3637
};
@@ -42,13 +43,14 @@ module('workflow config', function (hooks) {
4243
});
4344
});
4445

45-
test('deprecation logs with message matcher by regex', (assert) => {
46+
test('deprecation logs with message matcher by regex', function (assert) {
4647
assert.expect(1);
4748

4849
let message = ' foo log-match foo';
4950
window.Testem.handleConsoleMessage = function (passedMessage) {
50-
assert.ok(
51-
passedMessage.indexOf('DEPRECATION: ' + message) === 0,
51+
assert.strictEqual(
52+
passedMessage.indexOf('DEPRECATION: ' + message),
53+
0,
5254
'deprecation logs'
5355
);
5456
};
@@ -60,13 +62,14 @@ module('workflow config', function (hooks) {
6062
});
6163
});
6264

63-
test('deprecation logs with id matcher', (assert) => {
65+
test('deprecation logs with id matcher', function (assert) {
6466
assert.expect(1);
6567

6668
let message = ' foo foo';
6769
window.Testem.handleConsoleMessage = function (passedMessage) {
68-
assert.ok(
69-
passedMessage.indexOf('DEPRECATION: ' + message) === 0,
70+
assert.strictEqual(
71+
passedMessage.indexOf('DEPRECATION: ' + message),
72+
0,
7073
'deprecation logs'
7174
);
7275
};
@@ -78,7 +81,7 @@ module('workflow config', function (hooks) {
7881
});
7982
});
8083

81-
test('deprecation thrown with string matcher', (assert) => {
84+
test('deprecation thrown with string matcher', function (assert) {
8285
assert.throws(function () {
8386
deprecate('throw-strict', false, {
8487
since: '2.0.0',
@@ -89,7 +92,7 @@ module('workflow config', function (hooks) {
8992
}, 'deprecation throws');
9093
});
9194

92-
test('deprecation logs with id matcher', (assert) => {
95+
test('deprecation logs with id matcher and options', function (assert) {
9396
assert.expect(1);
9497

9598
let message = 'arbitrary-unmatched-message';
@@ -111,7 +114,7 @@ module('workflow config', function (hooks) {
111114
deprecate(message, false, options);
112115
});
113116

114-
test('deprecation limits each id to 100 console.logs', (assert) => {
117+
test('deprecation limits each id to 100 console.logs', function (assert) {
115118
assert.expect(104);
116119
let limit = 100;
117120

@@ -129,6 +132,7 @@ module('workflow config', function (hooks) {
129132
window.Testem.handleConsoleMessage = function (passedMessage) {
130133
count++;
131134
if (count <= limit) {
135+
// eslint-disable-next-line qunit/no-conditional-assertions
132136
assert.equal(
133137
passedMessage.substr(0, expected.length),
134138
expected,

tests/dummy/config/ember-cli-update.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"packages": [
44
{
55
"name": "ember-cli",
6-
"version": "3.25.0",
6+
"version": "3.28.6",
77
"blueprints": [
88
{
99
"name": "addon",

0 commit comments

Comments
 (0)