Skip to content

Commit b760205

Browse files
author
Andrey Fel
committed
Drop ember-qunit support below v5
The scenario wasn't working with ember-cli@5 and ember-qunit has been out for a while.
1 parent 15538f9 commit b760205

4 files changed

Lines changed: 1 addition & 35 deletions

File tree

.github/workflows/ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ jobs:
5656
- ember-release
5757
- ember-beta
5858
- ember-canary
59-
- ember-qunit-4
6059

6160
steps:
6261
- uses: actions/checkout@v2

index.js

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
'use strict';
44

5-
const VersionChecker = require('ember-cli-version-checker');
6-
75
module.exports = {
86
name: require('./package').name,
97

@@ -13,30 +11,9 @@ module.exports = {
1311

1412
init() {
1513
this._super.init.apply(this, arguments);
16-
let versionChecker = new VersionChecker(this.project);
17-
18-
const hasMagicallyProvidedQUnit = versionChecker
19-
.for('ember-qunit')
20-
.lt('5.0.0-beta.1');
2114

22-
let options = {
15+
this.options.autoImport = {
2316
exclude: ['ember-mocha', 'mocha'],
2417
};
25-
26-
// Ember-qunit < 5 provides an AMD shim for qunit but newer versions now use
27-
// ember-auto-import to include qunit. This means that qunit is no
28-
// longer available for addons (if the parent app is using ember-qunit > 5) to
29-
// directly import under embroider unless they are using ember-auto-import
30-
// themselves. This condidionally falls back to not using ember-auto-import
31-
// when the parent app is providing qunit because without this we would double
32-
// include qunit resulting in a runtime error (qunit detects if it as
33-
// already be added to the window object and errors if so).
34-
if (hasMagicallyProvidedQUnit) {
35-
this.options = this.options || {};
36-
options.exclude.push('qunit');
37-
this.options.autoImport = options;
38-
} else {
39-
this.options.autoImport = options;
40-
}
4118
},
4219
};

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
"debug": "^4.2.0",
4747
"ember-auto-import": "^2.7.0",
4848
"ember-cli-babel": "^8.2.0",
49-
"ember-cli-version-checker": "^5.1.2",
5049
"execa": "^8.0.1",
5150
"fs-extra": "^11.2.0",
5251
"js-yaml": "^4.0.0",

tests/dummy/config/ember-try.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -120,15 +120,6 @@ module.exports = async function () {
120120
name: 'embroider-optimized-with-mocha',
121121
}),
122122
),
123-
{
124-
name: 'ember-qunit-4',
125-
npm: {
126-
devDependencies: {
127-
'ember-qunit': '^4.6.0',
128-
'ember-source': '^3.28.0',
129-
},
130-
},
131-
},
132123
],
133124
};
134125
};

0 commit comments

Comments
 (0)