Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

babel-plugin-polyfill-corejs3

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-polyfill-corejs3 - npm Package Compare versions

Comparing version 0.0.7 to 0.0.8

12

lib/index.js

@@ -41,3 +41,3 @@ "use strict";

const available = new Set((0, _getModulesListForTargetVersion.default)(version));
const coreJSBase = method === "usage-pure" ? proposals ? "core-js-pure/features" : "core-js-pure/stable" : "core-js";
const coreJSPureBase = proposals ? "core-js-pure/features" : "core-js-pure/stable";

@@ -55,3 +55,3 @@ function maybeInjectGlobal(names, utils) {

if (desc.pure && !(object && desc.exclude && desc.exclude.includes(object)) && shouldInjectPolyfill(desc.name)) {
return utils.injectDefaultImport(`${coreJSBase}/${desc.pure}.js`, hint);
return utils.injectDefaultImport(`${coreJSPureBase}/${desc.pure}.js`, hint);
}

@@ -107,3 +107,3 @@ }

if (meta.key === "Symbol.iterator") {
path.replaceWith(_core.types.callExpression(utils.injectDefaultImport(`${coreJSBase}/is-iterable.js`, "isIterable"), [path.node.right]));
path.replaceWith(_core.types.callExpression(utils.injectDefaultImport((0, _utils.coreJSPureHelper)("is-iterable"), "isIterable"), [path.node.right]));
}

@@ -129,9 +129,9 @@

if (path.parent.arguments.length === 0) {
path.parentPath.replaceWith(_core.types.callExpression(utils.injectDefaultImport(`${coreJSBase}/get-iterator.js`, "getIterator"), [path.node.object]));
path.parentPath.replaceWith(_core.types.callExpression(utils.injectDefaultImport((0, _utils.coreJSPureHelper)("get-iterator"), "getIterator"), [path.node.object]));
path.skip();
} else {
(0, _utils.callMethod)(path, utils.injectDefaultImport(`${coreJSBase}/get-iterator-method.js`, "getIteratorMethod"));
(0, _utils.callMethod)(path, utils.injectDefaultImport((0, _utils.coreJSPureHelper)("get-iterator-method"), "getIteratorMethod"));
}
} else {
path.replaceWith(_core.types.callExpression(utils.injectDefaultImport(`${coreJSBase}/get-iterator-method.js`, "getIteratorMethod"), [path.node.object]));
path.replaceWith(_core.types.callExpression(utils.injectDefaultImport((0, _utils.coreJSPureHelper)("get-iterator-method"), "getIteratorMethod"), [path.node.object]));
}

@@ -138,0 +138,0 @@

@@ -7,2 +7,3 @@ "use strict";

exports.coreJSModule = coreJSModule;
exports.coreJSPureHelper = coreJSPureHelper;

@@ -43,2 +44,6 @@ var _core = require("@babel/core");

return `core-js/modules/${name}.js`;
}
function coreJSPureHelper(name) {
return `core-js-pure/features/${name}.js`;
}
{
"name": "babel-plugin-polyfill-corejs3",
"version": "0.0.7",
"version": "0.0.8",
"description": "A Babel plugin to inject imports to core-js@3 polyfills",

@@ -33,3 +33,3 @@ "repository": {

},
"gitHead": "ab1ebbd308b1111920327d95dc4c66a5ae4518f5"
"gitHead": "740427dfa150fbce1cad77602c35cec7cfe69605"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc