Skip to content

Commit

Permalink
Warn about @babel/runtime release candidates, too.
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamn committed Aug 20, 2018
1 parent 7b23f66 commit 72794df
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions packages/babel-runtime/babel-runtime.js
Expand Up @@ -25,9 +25,12 @@ if (parseInt(babelRuntimeVersion, 10) < 6) {
""
].join("\n"));

} else if (babelRuntimeVersion.indexOf("7.0.0-beta.") === 0) {
var betaVersion = parseInt(babelRuntimeVersion.split(".").pop(), 10);
if (betaVersion > 55) {
} else {
var match = /^7\.0\.0-(beta|rc)\./.exec(babelRuntimeVersion);
if (match &&
match[1] === "rc" ||
(match[1] === "beta" &&
parseInt(babelRuntimeVersion.split(".").pop(), 10) > 55)) {
console.warn([
"The version of @babel/runtime installed in your node_modules directory ",
"(" + babelRuntimeVersion + ") contains a breaking change which was introduced by ",
Expand Down
2 changes: 1 addition & 1 deletion 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.2.5',
documentation: 'README.md'
});

Expand Down

0 comments on commit 72794df

Please sign in to comment.