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

Chore: Use Babel 7 #258

Merged
merged 2 commits into from
Aug 14, 2019
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
24 changes: 1 addition & 23 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,6 @@ const Rollup = require('broccoli-rollup');
const merge = require('broccoli-merge-trees');
const VersionChecker = require('ember-cli-version-checker');

const path = require('path');

const BlockScopingTransform = (function() {
let plugin = require('babel-plugin-transform-es2015-block-scoping');

// adding `baseDir` ensures that broccoli-babel-transpiler does not
// issue a warning and opt out of caching
let pluginPath = require.resolve('babel-plugin-transform-es2015-block-scoping/package');
let pluginBaseDir = path.dirname(pluginPath);
plugin.baseDir = () => pluginBaseDir;

return plugin;
})();

function isProductionEnv() {
const isProd = /production/.test(process.env.EMBER_ENV);
const isTest = process.env.EMBER_CLI_TEST_COMMAND;
Expand Down Expand Up @@ -108,17 +94,9 @@ module.exports = {
const opts = {
loose: true,
plugins,
postTransformPlugins: [StripClassCallCheckPlugin],
exclude: [
'transform-es2015-block-scoping',
'transform-es2015-typeof-symbol'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need @babel/plugin-transform-typeof-symbol here?

]
postTransformPlugins: [StripClassCallCheckPlugin]
};

opts.plugins.push(
[BlockScopingTransform, { 'throwIfClosureRequired': true }]
);

return opts;
},
_setupBabelOptions() {
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,11 @@
"test:all": "ember try:each"
},
"dependencies": {
"babel-plugin-transform-es2015-block-scoping": "^6.24.1",
"babel6-plugin-strip-class-callcheck": "^6.0.0",
"broccoli-funnel": "^2.0.2",
"broccoli-merge-trees": "^3.0.1",
"broccoli-rollup": "^4.1.1",
"ember-cli-babel": "^6.16.0",
"ember-cli-babel": "^7.7.3",
"ember-cli-htmlbars": "^3.0.0",
"ember-cli-version-checker": "^3.1.3",
"ember-compatibility-helpers": "^1.2.0",
Expand Down
14 changes: 7 additions & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -547,9 +547,9 @@
"@babel/helper-plugin-utils" "^7.0.0"

"@babel/plugin-transform-runtime@^7.2.0":
version "7.5.5"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.5.5.tgz#a6331afbfc59189d2135b2e09474457a8e3d28bc"
integrity sha512-6Xmeidsun5rkwnGfMOp6/z9nSzWpHFNVr2Jx7kwoq4mVatQfQx5S56drBgEHF+XQbKOdIaOiMIINvp/kAwMN+w==
version "7.4.3"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.4.3.tgz#4d6691690ecdc9f5cb8c3ab170a1576c1f556371"
integrity sha512-7Q61bU+uEI7bCUFReT1NKn7/X6sDQsZ7wL1sJ9IYMAO7cI+eg6x9re1cEw2fCRMbbTVyoeUKWSV1M6azEfKCfg==
dependencies:
"@babel/helper-module-imports" "^7.0.0"
"@babel/helper-plugin-utils" "^7.0.0"
Expand Down Expand Up @@ -1551,7 +1551,7 @@ babel-plugin-transform-es2015-block-scoped-functions@^6.22.0:
dependencies:
babel-runtime "^6.22.0"

babel-plugin-transform-es2015-block-scoping@^6.23.0, babel-plugin-transform-es2015-block-scoping@^6.24.1:
babel-plugin-transform-es2015-block-scoping@^6.23.0:
version "6.26.0"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz#d70f5299c1308d05c12f463813b0a09e73b1895f"
integrity sha1-1w9SmcEwjQXBL0Y4E7CgnnOxiV8=
Expand Down Expand Up @@ -7291,9 +7291,9 @@ regenerator-runtime@^0.11.0:
integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==

regenerator-runtime@^0.13.2:
version "0.13.3"
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.3.tgz#7cf6a77d8f5c6f60eb73c5fc1955b2ceb01e6bf5"
integrity sha512-naKIZz2GQ8JWh///G7L3X6LaQUAMp2lvb1rvwwsURe/VXwD6VMfr+/1NuNw3ag8v2kY1aQ/go5SNn79O9JU7yw==
version "0.13.2"
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.2.tgz#32e59c9a6fb9b1a4aff09b4930ca2d4477343447"
integrity sha512-S/TQAZJO+D3m9xeN1WTI8dLKBBiRgXBlTJvbWjCThHWZj9EvHK70Ff50/tYj2J/fvBY6JtFVwRuazHN2E7M9BA==

regenerator-runtime@^0.9.5:
version "0.9.6"
Expand Down