@babel/helper-plugin-utils
Advanced tools
Comparing version 7.0.0-beta.43 to 7.0.0-beta.44
@@ -9,9 +9,8 @@ "use strict"; | ||
function declare(builder) { | ||
return (api, options, dirname) => { | ||
return function (api, options, dirname) { | ||
if (!api.assertVersion) { | ||
api = Object.assign(copyApiObject(api), { | ||
assertVersion(range) { | ||
assertVersion: function assertVersion(range) { | ||
throwVersionError(range, api.version); | ||
} | ||
}); | ||
@@ -25,3 +24,3 @@ } | ||
function copyApiObject(api) { | ||
let proto = null; | ||
var proto = null; | ||
@@ -49,3 +48,3 @@ if (typeof api.version === "string" && /^7\./.test(api.version)) { | ||
range = `^${range}.0.0-0`; | ||
range = "^" + range + ".0.0-0"; | ||
} | ||
@@ -57,3 +56,3 @@ | ||
const limit = Error.stackTraceLimit; | ||
var limit = Error.stackTraceLimit; | ||
@@ -64,8 +63,8 @@ if (typeof limit === "number" && limit < 25) { | ||
let err; | ||
var err; | ||
if (version.slice(0, 2) === "7.") { | ||
err = new Error(`Requires Babel "^7.0.0-beta.41", but was loaded with "${version}". ` + `You'll need to update your @babel/core version.`); | ||
err = new Error("Requires Babel \"^7.0.0-beta.41\", but was loaded with \"" + version + "\". " + "You'll need to update your @babel/core version."); | ||
} else { | ||
err = new Error(`Requires Babel "${range}", but was loaded with "${version}". ` + `If you are sure you have a compatible version of @babel/core, ` + `it is likely that something in your build process is loading the ` + `wrong version. Inspect the stack trace of this error to look for ` + `the first entry that doesn't mention "@babel/core" or "babel-core" ` + `to see what is calling Babel.`); | ||
err = new Error("Requires Babel \"" + range + "\", but was loaded with \"" + version + "\". " + "If you are sure you have a compatible version of @babel/core, " + "it is likely that something in your build process is loading the " + "wrong version. Inspect the stack trace of this error to look for " + "the first entry that doesn't mention \"@babel/core\" or \"babel-core\" " + "to see what is calling Babel."); | ||
} | ||
@@ -79,5 +78,5 @@ | ||
code: "BABEL_VERSION_UNSUPPORTED", | ||
version, | ||
range | ||
version: version, | ||
range: range | ||
}); | ||
} |
{ | ||
"name": "@babel/helper-plugin-utils", | ||
"version": "7.0.0-beta.43", | ||
"version": "7.0.0-beta.44", | ||
"description": "General utilities for plugins to use", | ||
@@ -5,0 +5,0 @@ "author": "Logan Smyth <loganfsmyth@gmail.com>", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6553