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

Remove support for ember-cli-babel v5 #757

Merged
merged 1 commit into from
Jul 5, 2021
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
9 changes: 1 addition & 8 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,7 @@ module.exports = {

appOrParent.options = appOrParent.options || {};

if (checker.satisfies('^5.0.0')) {
appOrParent.options.babel = appOrParent.options.babel || {};
appOrParent.options.babel.plugins = appOrParent.options.babel.plugins || [];
appOrParent.options.babel.plugins.push(require('./strip-data-test-properties-plugin'));

this.ui.writeWarnLine('[ember-test-selectors] DEPRECATION: Using ember-cli-babel v5 with ember-test-selectors ' +
'is deprecated. Please make sure to update your ember-cli-babel version.');
} else if (checker.satisfies('^6.0.0-beta.1') || checker.satisfies('^7.0.0')) {
if (checker.satisfies('^6.0.0-beta.1') || checker.satisfies('^7.0.0')) {
appOrParent.options.babel6 = appOrParent.options.babel6 || {};
appOrParent.options.babel6.plugins = appOrParent.options.babel6.plugins || [];
appOrParent.options.babel6.plugins.push(require.resolve('./strip-data-test-properties-plugin6'));
Expand Down
21 changes: 0 additions & 21 deletions node-tests/fixtures/default/expected.js

This file was deleted.

2 changes: 1 addition & 1 deletion node-tests/multidep.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"path": "node-tests/multidep_modules",
"versions": {
"babel-core": ["5.8.33", "6.24.0"]
"babel-core": ["6.24.0"]
}
}
14 changes: 0 additions & 14 deletions node-tests/strip-data-test-properties-plugin-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,12 @@ let fs = require('fs');
let assert = require('assert');
let multidepRequire = require('multidep')('node-tests/multidep.json');

let babel5 = multidepRequire('babel-core', '5.8.33');
let babel6 = multidepRequire('babel-core', '6.24.0');
let babel7 = require('@babel/core');

let StripDataTestPropertiesPlugin5 = require('../strip-data-test-properties-plugin');
let StripDataTestPropertiesPlugin6 = require('../strip-data-test-properties-plugin6');

function testFixture(name) {
it(`Babel5: fixture: ${name}`, function() {
let fixturePath = `${__dirname}/fixtures/${name}/fixture.js`;
let expectedPath = `${__dirname}/fixtures/${name}/expected.js`;

let expected = fs.readFileSync(expectedPath, 'utf8').replace(/\r\n/g, '\n');
let result = babel5.transformFileSync(fixturePath, {
plugins: [StripDataTestPropertiesPlugin5],
});

assert.strictEqual(result.code.trim(), expected.trim());
});

it(`Babel6: fixture: ${name}`, function() {
let fixturePath = `${__dirname}/fixtures/${name}/fixture.js`;
let expectedPath = `${__dirname}/fixtures/${name}/expected6.js`;
Expand Down
29 changes: 0 additions & 29 deletions strip-data-test-properties-plugin.js

This file was deleted.