Skip to content

Commit

Permalink
Merge pull request #757 from Turbo87/babel-5
Browse files Browse the repository at this point in the history
Remove support for ember-cli-babel v5
  • Loading branch information
Turbo87 authored Jul 5, 2021
2 parents 775f23f + 26cf6a1 commit 83cc8b2
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 73 deletions.
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.

0 comments on commit 83cc8b2

Please sign in to comment.