@babel/plugin-transform-runtime
Advanced tools
Comparing version 7.7.5 to 7.7.6
@@ -183,3 +183,3 @@ "use strict"; | ||
const helpersDir = esModules && file.path.node.sourceType === "module" ? "helpers/esm" : "helpers"; | ||
return this.addDefaultImport(`${modulePath}/${helpersDir}/${name}.js`, name, blockHoist); | ||
return this.addDefaultImport(`${modulePath}/${helpersDir}/${name}`, name, blockHoist); | ||
}); | ||
@@ -222,3 +222,3 @@ } | ||
if (name === "regeneratorRuntime" && useRuntimeRegenerator) { | ||
path.replaceWith(this.addDefaultImport(`${modulePath}/regenerator/index.js`, "regeneratorRuntime")); | ||
path.replaceWith(this.addDefaultImport(`${modulePath}/regenerator`, "regeneratorRuntime")); | ||
return; | ||
@@ -231,3 +231,3 @@ } | ||
if (scope.getBindingIdentifier(name)) return; | ||
path.replaceWith(this.addDefaultImport(`${modulePath}/${corejsRoot}/${BuiltIns[name].path}.js`, name)); | ||
path.replaceWith(this.addDefaultImport(`${modulePath}/${corejsRoot}/${BuiltIns[name].path}`, name)); | ||
}, | ||
@@ -261,3 +261,3 @@ | ||
node.callee = _core.types.memberExpression(_core.types.callExpression(this.addDefaultImport(`${moduleName}/${corejsRoot}/instance/${InstanceProperties[propertyName].path}.js`, `${propertyName}InstanceProperty`), [context2]), _core.types.identifier("call")); | ||
node.callee = _core.types.memberExpression(_core.types.callExpression(this.addDefaultImport(`${moduleName}/${corejsRoot}/instance/${InstanceProperties[propertyName].path}`, `${propertyName}InstanceProperty`), [context2]), _core.types.identifier("call")); | ||
node.arguments.unshift(context1); | ||
@@ -275,3 +275,3 @@ return; | ||
path.replaceWith(_core.types.callExpression(this.addDefaultImport(`${modulePath}/core-js/get-iterator.js`, "getIterator"), [object])); | ||
path.replaceWith(_core.types.callExpression(this.addDefaultImport(`${modulePath}/core-js/get-iterator`, "getIterator"), [object])); | ||
}, | ||
@@ -283,3 +283,3 @@ | ||
if (!path.get("left").matchesPattern("Symbol.iterator")) return; | ||
path.replaceWith(_core.types.callExpression(this.addDefaultImport(`${modulePath}/core-js/is-iterable.js`, "isIterable"), [path.node.right])); | ||
path.replaceWith(_core.types.callExpression(this.addDefaultImport(`${modulePath}/core-js/is-iterable`, "isIterable"), [path.node.right])); | ||
}, | ||
@@ -300,3 +300,3 @@ | ||
if (!injectCoreJS2 && node.computed && path.get("property").matchesPattern("Symbol.iterator")) { | ||
path.replaceWith(_core.types.callExpression(this.addDefaultImport(`${moduleName}/core-js/get-iterator-method.js`, "getIteratorMethod"), [object])); | ||
path.replaceWith(_core.types.callExpression(this.addDefaultImport(`${moduleName}/core-js/get-iterator-method`, "getIteratorMethod"), [object])); | ||
return; | ||
@@ -310,3 +310,3 @@ } | ||
if (injectCoreJS3 && hasMapping(InstanceProperties, propertyName) && maybeNeedsPolyfill(path, InstanceProperties, propertyName)) { | ||
path.replaceWith(_core.types.callExpression(this.addDefaultImport(`${moduleName}/${corejsRoot}/instance/${InstanceProperties[propertyName].path}.js`, `${propertyName}InstanceProperty`), [object])); | ||
path.replaceWith(_core.types.callExpression(this.addDefaultImport(`${moduleName}/${corejsRoot}/instance/${InstanceProperties[propertyName].path}`, `${propertyName}InstanceProperty`), [object])); | ||
} | ||
@@ -317,3 +317,3 @@ | ||
path.replaceWith(this.addDefaultImport(`${modulePath}/${corejsRoot}/${StaticProperties[objectName][propertyName].path}.js`, `${objectName}$${propertyName}`)); | ||
path.replaceWith(this.addDefaultImport(`${modulePath}/${corejsRoot}/${StaticProperties[objectName][propertyName].path}`, `${objectName}$${propertyName}`)); | ||
}, | ||
@@ -336,3 +336,3 @@ | ||
if (path.scope.getBindingIdentifier(name)) return; | ||
path.replaceWith(_core.types.memberExpression(this.addDefaultImport(`${modulePath}/${corejsRoot}/${BuiltIns[name].path}.js`, name), node.property)); | ||
path.replaceWith(_core.types.memberExpression(this.addDefaultImport(`${modulePath}/${corejsRoot}/${BuiltIns[name].path}`, name), node.property)); | ||
} | ||
@@ -339,0 +339,0 @@ |
{ | ||
"name": "@babel/plugin-transform-runtime", | ||
"version": "7.7.5", | ||
"version": "7.7.6", | ||
"description": "Externalise references to helpers and builtins, automatically polyfilling your code without polluting globals", | ||
@@ -28,8 +28,8 @@ "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-runtime", | ||
"@babel/plugin-transform-typeof-symbol": "^7.7.4", | ||
"@babel/preset-env": "^7.7.5", | ||
"@babel/runtime": "^7.7.5", | ||
"@babel/preset-env": "^7.7.6", | ||
"@babel/runtime": "^7.7.6", | ||
"@babel/template": "^7.7.4", | ||
"@babel/types": "^7.7.4" | ||
}, | ||
"gitHead": "d04508e510abc624b3e423ff334eff47f297502a" | ||
"gitHead": "f753c48f74e9556265796806370fdf104e8147eb" | ||
} |
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
39039