Make babel-runtime require at least @babel/runtime@7.0.0-beta.56.

https://github.com/meteor/meteor/pull/10134#issue-206446005
This commit is contained in:
Ben Newman
2018-08-07 13:35:46 -04:00
parent defbf6d6eb
commit da784cbcfa
2 changed files with 6 additions and 22 deletions

View File

@@ -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"));
}
}

View File

@@ -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'
});