Warn in babel-runtime Meteor package if babel-runtime npm package outdated.

This commit is contained in:
Ben Newman
2017-09-14 18:47:38 -04:00
parent 22778ed4fb
commit 4f09556bae
2 changed files with 15 additions and 2 deletions

View File

@@ -10,13 +10,26 @@ exports.checkHelper = function checkHelper(id) {
};
try {
var babelRuntimeVersion = require("babel-runtime/package.json").version;
var regeneratorRuntime = require("babel-runtime/regenerator");
} catch (e) {
throw new Error([
"The babel-runtime npm package could not be found in your node_modules ",
"directory. Please run the following command to install it:",
"",
" meteor npm install --save babel-runtime",
" meteor npm install --save babel-runtime@next",
""
].join("\n"));
}
if (parseInt(babelRuntimeVersion, 10) < 7) {
throw new 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@next",
"",
"in your application directory.",
""
].join("\n"));
}

View File

@@ -1,7 +1,7 @@
Package.describe({
name: "babel-runtime",
summary: "Runtime support for output of Babel transpiler",
version: '1.1.0-beta.27',
version: '7.0.0',
documentation: 'README.md'
});