@babel/plugin-transform-runtime
Advanced tools
Comparing version 7.0.0-rc.2 to 7.0.0-rc.3
@@ -77,2 +77,6 @@ "use strict"; | ||
function supportsStaticESM(caller) { | ||
return !!(caller && caller.supportsStaticESM); | ||
} | ||
var _default = (0, _helperPluginUtils().declare)((api, options, dirname) => { | ||
@@ -97,4 +101,4 @@ api.assertVersion(7); | ||
if (typeof useESModules !== "boolean") { | ||
throw new Error("The 'useESModules' option must be undefined, or a boolean."); | ||
if (typeof useESModules !== "boolean" && useESModules !== "auto") { | ||
throw new Error("The 'useESModules' option must be undefined, or a boolean, or 'auto'."); | ||
} | ||
@@ -134,3 +138,3 @@ | ||
const helpersDir = useESModules ? "helpers/esm" : "helpers"; | ||
const esModules = useESModules === "auto" ? api.caller(supportsStaticESM) : useESModules; | ||
const injectCoreJS2 = `${corejsVersion}` === "2"; | ||
@@ -155,2 +159,3 @@ const moduleName = injectCoreJS2 ? "@babel/runtime-corejs2" : "@babel/runtime"; | ||
const blockHoist = isInteropHelper && !(0, _helperModuleImports().isModule)(file.path) ? 4 : undefined; | ||
const helpersDir = esModules && file.path.node.sourceType === "module" ? "helpers/esm" : "helpers"; | ||
return this.addDefaultImport(`${modulePath}/${helpersDir}/${name}`, name, blockHoist); | ||
@@ -157,0 +162,0 @@ }); |
{ | ||
"name": "@babel/plugin-transform-runtime", | ||
"version": "7.0.0-rc.2", | ||
"version": "7.0.0-rc.3", | ||
"description": "Externalise references to helpers and builtins, automatically polyfilling your code without polluting globals", | ||
@@ -12,4 +12,4 @@ "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-runtime", | ||
"dependencies": { | ||
"@babel/helper-module-imports": "7.0.0-rc.2", | ||
"@babel/helper-plugin-utils": "7.0.0-rc.2", | ||
"@babel/helper-module-imports": "7.0.0-rc.3", | ||
"@babel/helper-plugin-utils": "7.0.0-rc.3", | ||
"resolve": "^1.8.1" | ||
@@ -21,11 +21,11 @@ }, | ||
"devDependencies": { | ||
"@babel/core": "7.0.0-rc.2", | ||
"@babel/helper-plugin-test-runner": "7.0.0-rc.2", | ||
"@babel/helpers": "7.0.0-rc.2", | ||
"@babel/plugin-transform-runtime": "7.0.0-rc.2", | ||
"@babel/preset-env": "7.0.0-rc.2", | ||
"@babel/runtime": "7.0.0-rc.2", | ||
"@babel/template": "7.0.0-rc.2", | ||
"@babel/core": "7.0.0-rc.3", | ||
"@babel/helper-plugin-test-runner": "7.0.0-rc.3", | ||
"@babel/helpers": "7.0.0-rc.3", | ||
"@babel/plugin-transform-runtime": "7.0.0-rc.3", | ||
"@babel/preset-env": "7.0.0-rc.3", | ||
"@babel/runtime": "7.0.0-rc.3", | ||
"@babel/template": "7.0.0-rc.3", | ||
"@babel/types": "7.0.0-beta.53" | ||
} | ||
} |
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
16648
5
381
+ Added@babel/helper-module-imports@7.0.0-rc.3(transitive)
+ Added@babel/helper-plugin-utils@7.0.0-rc.3(transitive)
+ Added@babel/types@7.0.0-rc.3(transitive)
- Removed@babel/helper-module-imports@7.0.0-rc.2(transitive)
- Removed@babel/helper-plugin-utils@7.0.0-rc.2(transitive)
- Removed@babel/types@7.0.0-rc.2(transitive)