Skip to content

Commit

Permalink
refactor: remove Babel 6 support
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Remove automatic Babel 6 support. For continued support, the React JSX Babel transform can be supplied manually by the application configuration.
  • Loading branch information
alexlafroscia committed Feb 2, 2019
1 parent c272eee commit b076935
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 38 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ jobs:
- env: EMBER_TRY_SCENARIO=ember-release
- env: EMBER_TRY_SCENARIO=ember-beta
- env: EMBER_TRY_SCENARIO=ember-canary
- env: EMBER_TRY_SCENARIO=babel-6
- env: EMBER_TRY_SCENARIO=stage-1-decorators

script:
Expand Down
8 changes: 0 additions & 8 deletions config/ember-try.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,6 @@ module.exports = function() {
}
}
},
{
name: 'babel-6',
npm: {
dependencies: {
'ember-cli-babel': '^6.6.0'
}
}
},
{
name: 'stage-1-decorators',
npm: {
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const configureJsxTransform = require('./lib/configure-jsx-transform');

module.exports = {
name: 'ember-react-components',
name: require('./package').name,

included(parent) {
this._super.included.apply(this, arguments);
Expand Down
12 changes: 5 additions & 7 deletions lib/configure-jsx-transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,17 @@ module.exports = function configureJsxTransform(parent) {
options.babel = options.babel || {};
options.babel.plugins = options.babel.plugins || [];

if (checker.satisfies('^6.0.0-beta.1')) {
if (!hasPlugin(options.babel.plugins, 'babel-plugin-transform-react-jsx')) {
options.babel.plugins.push(
requireTransform('babel-plugin-transform-react-jsx')
);
}
} else if (checker.gte('7.0.0')) {
if (checker.gte('7.0.0')) {
if (
!hasPlugin(options.babel.plugins, '@babel/plugin-transform-react-jsx')
) {
options.babel.plugins.push(
requireTransform('@babel/plugin-transform-react-jsx')
);
}
} else {
parent.project.ui.writeWarnLine(
'ember-react-components: You are using an unsupported ember-cli-babel version, JSX transforms will not be included automatically'
);
}
};
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
},
"dependencies": {
"@babel/plugin-transform-react-jsx": "^7.3.0",
"babel-plugin-transform-react-jsx": "^6.24.1",
"ember-auto-import": "^1.2.19",
"ember-cli-babel": "^7.4.1",
"ember-cli-version-checker": "^3.0.1",
Expand Down
20 changes: 0 additions & 20 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1702,14 +1702,6 @@ babel-helper-builder-binary-assignment-operator-visitor@^6.24.1:
babel-runtime "^6.22.0"
babel-types "^6.24.1"

babel-helper-builder-react-jsx@^6.24.1:
version "6.26.0"
resolved "https://registry.yarnpkg.com/babel-helper-builder-react-jsx/-/babel-helper-builder-react-jsx-6.26.0.tgz#39ff8313b75c8b65dceff1f31d383e0ff2a408a0"
dependencies:
babel-runtime "^6.26.0"
babel-types "^6.26.0"
esutils "^2.0.2"

babel-helper-call-delegate@^6.24.1:
version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz#ece6aacddc76e41c3461f88bfc575bd0daa2df8d"
Expand Down Expand Up @@ -1881,10 +1873,6 @@ babel-plugin-syntax-exponentiation-operator@^6.8.0:
version "6.13.0"
resolved "https://registry.yarnpkg.com/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz#9ee7e8337290da95288201a6a57f4170317830de"

babel-plugin-syntax-jsx@^6.8.0:
version "6.18.0"
resolved "https://registry.yarnpkg.com/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz#0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946"

babel-plugin-syntax-object-rest-spread@^6.8.0:
version "6.13.0"
resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5"
Expand Down Expand Up @@ -2086,14 +2074,6 @@ babel-plugin-transform-object-rest-spread@^6.26.0:
babel-plugin-syntax-object-rest-spread "^6.8.0"
babel-runtime "^6.26.0"

babel-plugin-transform-react-jsx@^6.24.1:
version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-jsx/-/babel-plugin-transform-react-jsx-6.24.1.tgz#840a028e7df460dfc3a2d29f0c0d91f6376e66a3"
dependencies:
babel-helper-builder-react-jsx "^6.24.1"
babel-plugin-syntax-jsx "^6.8.0"
babel-runtime "^6.22.0"

babel-plugin-transform-regenerator@^6.22.0:
version "6.26.0"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz#e0703696fbde27f0a3efcacf8b4dca2f7b3a8f2f"
Expand Down

0 comments on commit b076935

Please sign in to comment.