Skip to content

Commit

Permalink
Make babel-runtime require at least @babel/runtime@7.0.0-beta.56.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Newman committed Aug 7, 2018
1 parent defbf6d commit da784cb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 22 deletions.
26 changes: 5 additions & 21 deletions packages/babel-runtime/babel-runtime.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,32 +13,16 @@ try {
].join("\n"));
}

if (parseInt(babelRuntimeVersion, 10) < 6) {
throw new Error([
"",
if (parseInt(babelRuntimeVersion, 10) < 7 ||
(babelRuntimeVersion.indexOf("7.0.0-beta.") === 0 &&
parseInt(babelRuntimeVersion.split(".").pop(), 10) < 56)) {
console.error([
"The version of @babel/runtime installed in your node_modules directory ",
"(" + babelRuntimeVersion + ") is out of date. Please upgrade it by running ",
"",
" meteor npm install --save @babel/runtime",
" meteor npm install --save @babel/runtime@latest",
"",
"in your application directory.",
""
].join("\n"));

} else if (babelRuntimeVersion.indexOf("7.0.0-beta.") === 0) {
var betaVersion = parseInt(babelRuntimeVersion.split(".").pop(), 10);
if (betaVersion > 55) {
console.warn([
"The version of @babel/runtime installed in your node_modules directory ",
"(" + babelRuntimeVersion + ") contains a breaking change which was introduced by ",
"https://github.com/babel/babel/pull/8266. Please either downgrade by ",
"running the following command:",
"",
" meteor npm install --save-exact @babel/runtime@7.0.0-beta.55",
"",
"or update to the latest beta version of Meteor 1.7.1, as explained in ",
"this pull request: https://github.com/meteor/meteor/pull/9942.",
""
].join("\n"));
}
}
2 changes: 1 addition & 1 deletion packages/babel-runtime/package.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package.describe({
name: "babel-runtime",
summary: "Runtime support for output of Babel transpiler",
version: '1.2.4',
version: '1.3.0',
documentation: 'README.md'
});

Expand Down

0 comments on commit da784cb

Please sign in to comment.