From da784cbcfa76d1948496dda48ddd8667d214ba25 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Tue, 7 Aug 2018 13:35:46 -0400 Subject: [PATCH] Make babel-runtime require at least @babel/runtime@7.0.0-beta.56. https://github.com/meteor/meteor/pull/10134#issue-206446005 --- packages/babel-runtime/babel-runtime.js | 26 +++++-------------------- packages/babel-runtime/package.js | 2 +- 2 files changed, 6 insertions(+), 22 deletions(-) diff --git a/packages/babel-runtime/babel-runtime.js b/packages/babel-runtime/babel-runtime.js index b453b1a9c6..1df02e443d 100644 --- a/packages/babel-runtime/babel-runtime.js +++ b/packages/babel-runtime/babel-runtime.js @@ -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")); - } } diff --git a/packages/babel-runtime/package.js b/packages/babel-runtime/package.js index 18cf3caa9b..3771b5697c 100644 --- a/packages/babel-runtime/package.js +++ b/packages/babel-runtime/package.js @@ -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' });