babel-plugin-polyfill-corejs3
Advanced tools
Comparing version 0.5.3 to 0.6.0
@@ -32,3 +32,3 @@ "use strict"; | ||
const ErrorDependencies = ["es.error.cause", "es.error.to-string"]; | ||
const TypedArrayDependencies = ["es.typed-array.at", "es.typed-array.copy-within", "es.typed-array.every", "es.typed-array.fill", "es.typed-array.filter", "es.typed-array.find", "es.typed-array.find-index", "es.typed-array.for-each", "es.typed-array.includes", "es.typed-array.index-of", "es.typed-array.iterator", "es.typed-array.join", "es.typed-array.last-index-of", "es.typed-array.map", "es.typed-array.reduce", "es.typed-array.reduce-right", "es.typed-array.reverse", "es.typed-array.set", "es.typed-array.slice", "es.typed-array.some", "es.typed-array.sort", "es.typed-array.subarray", "es.typed-array.to-locale-string", "es.typed-array.to-string", "es.object.to-string", "es.array.iterator", "es.array-buffer.slice", "esnext.typed-array.filter-reject", "esnext.typed-array.find-last", "esnext.typed-array.find-last-index", "esnext.typed-array.group-by", "esnext.typed-array.to-reversed", "esnext.typed-array.to-sorted", "esnext.typed-array.to-spliced", "esnext.typed-array.unique-by", "esnext.typed-array.with"]; | ||
const TypedArrayDependencies = ["es.typed-array.at", "es.typed-array.copy-within", "es.typed-array.every", "es.typed-array.fill", "es.typed-array.filter", "es.typed-array.find", "es.typed-array.find-index", "es.typed-array.find-last", "es.typed-array.find-last-index", "es.typed-array.for-each", "es.typed-array.includes", "es.typed-array.index-of", "es.typed-array.iterator", "es.typed-array.join", "es.typed-array.last-index-of", "es.typed-array.map", "es.typed-array.reduce", "es.typed-array.reduce-right", "es.typed-array.reverse", "es.typed-array.set", "es.typed-array.slice", "es.typed-array.some", "es.typed-array.sort", "es.typed-array.subarray", "es.typed-array.to-locale-string", "es.typed-array.to-string", "es.object.to-string", "es.array.iterator", "es.array-buffer.slice", "esnext.typed-array.filter-reject", "esnext.typed-array.group-by", "esnext.typed-array.to-reversed", "esnext.typed-array.to-sorted", "esnext.typed-array.to-spliced", "esnext.typed-array.unique-by", "esnext.typed-array.with"]; | ||
const PromiseDependencies = ["es.promise", "es.object.to-string"]; | ||
@@ -265,2 +265,3 @@ exports.PromiseDependencies = PromiseDependencies; | ||
metadata: define("symbol/metadata", ["esnext.symbol.metadata"]), | ||
metadataKey: define("symbol/metadata-key", ["esnext.symbol.metadata-key"]), | ||
observable: define("symbol/observable", ["esnext.symbol.observable"]), | ||
@@ -337,4 +338,4 @@ patternMatch: define("symbol/pattern-match", ["esnext.symbol.pattern-match"]), | ||
findIndex: define("instance/find-index", ["es.array.find-index"]), | ||
findLast: define("instance/find-last", ["esnext.array.find-last"]), | ||
findLastIndex: define("instance/find-last-index", ["esnext.array.find-last-index"]), | ||
findLast: define("instance/find-last", ["es.array.find-last"]), | ||
findLastIndex: define("instance/find-last-index", ["es.array.find-last-index"]), | ||
fixed: define(null, ["es.string.fixed"]), | ||
@@ -345,4 +346,6 @@ flags: define("instance/flags", ["es.regexp.flags"]), | ||
getYear: define(null, ["es.date.get-year"]), | ||
group: define("instance/group", ["esnext.array.group"]), | ||
groupBy: define("instance/group-by", ["esnext.array.group-by"]), | ||
groupByToMap: define("instance/group-by-to-map", ["esnext.array.group-by-to-map", "es.map", "es.object.to-string"]), | ||
groupToMap: define("instance/group-to-map", ["esnext.array.group-to-map", "es.map", "es.object.to-string"]), | ||
fontcolor: define(null, ["es.string.fontcolor"]), | ||
@@ -352,2 +355,3 @@ fontsize: define(null, ["es.string.fontsize"]), | ||
includes: define("instance/includes", ["es.array.includes", "es.string.includes"]), | ||
indexed: define("instance/indexed", ["esnext.async-iterator.indexed", ...AsyncIteratorDependencies, "esnext.iterator.indexed", ...IteratorDependencies]), | ||
indexOf: define("instance/index-of", ["es.array.index-of"]), | ||
@@ -367,2 +371,3 @@ italic: define(null, ["es.string.italics"]), | ||
padStart: define("instance/pad-start", ["es.string.pad-start"]), | ||
push: define("instance/push", ["es.array.push"]), | ||
reduce: define("instance/reduce", ["es.array.reduce", "esnext.async-iterator.reduce", "esnext.iterator.reduce", ...IteratorDependencies]), | ||
@@ -389,3 +394,3 @@ reduceRight: define("instance/reduce-right", ["es.array.reduce-right"]), | ||
take: define("instance/take", ["esnext.async-iterator.take", ...AsyncIteratorDependencies, "esnext.iterator.take", ...IteratorDependencies]), | ||
test: define("instance/test", ["es.regexp.test", "es.regexp.exec"]), | ||
test: define(null, ["es.regexp.test", "es.regexp.exec"]), | ||
toArray: define("instance/to-array", ["esnext.async-iterator.to-array", ...AsyncIteratorDependencies, "esnext.iterator.to-array", ...IteratorDependencies]), | ||
@@ -409,2 +414,3 @@ toAsync: define(null, ["esnext.iterator.to-async", ...IteratorDependencies, ...AsyncIteratorDependencies, ...AsyncIteratorProblemMethods]), | ||
uniqueBy: define("instance/unique-by", ["esnext.array.unique-by", "es.map"]), | ||
unshift: define("instance/unshift", ["es.array.unshift"]), | ||
unThis: define("instance/un-this", ["esnext.function.un-this"]), | ||
@@ -416,3 +422,4 @@ values: define("instance/values", ArrayNatureIteratorsWithTag), | ||
__lookupGetter__: define(null, ["es.object.lookup-getter"]), | ||
__lookupSetter__: define(null, ["es.object.lookup-setter"]) | ||
__lookupSetter__: define(null, ["es.object.lookup-setter"]), | ||
["__proto__"]: define(null, ["es.object.proto"]) | ||
}; | ||
@@ -419,0 +426,0 @@ exports.InstanceProperties = InstanceProperties; |
@@ -14,2 +14,4 @@ "use strict"; | ||
var _usageFilters = _interopRequireDefault(require("./usage-filters")); | ||
var _babel = _interopRequireWildcard(require("@babel/core")); | ||
@@ -27,3 +29,3 @@ | ||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
@@ -164,5 +166,6 @@ const { | ||
usageGlobal(meta, utils) { | ||
usageGlobal(meta, utils, path) { | ||
const resolved = resolve(meta); | ||
if (!resolved) return; | ||
if ((0, _usageFilters.default)(resolved.desc, path)) return; | ||
let deps = resolved.desc.global; | ||
@@ -198,2 +201,6 @@ | ||
if (t.isSuper(path.node.object)) { | ||
return; | ||
} | ||
if (meta.key === "Symbol.iterator") { | ||
@@ -225,2 +232,3 @@ if (!shouldInjectPolyfill("es.symbol.iterator")) return; | ||
if (!resolved) return; | ||
if ((0, _usageFilters.default)(resolved.desc, path)) return; | ||
@@ -227,0 +235,0 @@ if (useBabelRuntime && resolved.desc.pure && resolved.desc.pure.slice(-6) === "/index") { |
@@ -7,4 +7,4 @@ "use strict"; | ||
// This file is automatically generated by scripts/build-corejs3-shipped-proposals.mjs | ||
var _default = new Set(["esnext.array.find-last", "esnext.array.find-last-index", "esnext.typed-array.find-last", "esnext.typed-array.find-last-index"]); | ||
var _default = new Set(["esnext.array.group", "esnext.array.group-to-map", "esnext.array.to-reversed", "esnext.array.to-sorted", "esnext.array.to-spliced", "esnext.array.with", "esnext.typed-array.to-reversed", "esnext.typed-array.to-sorted", "esnext.typed-array.with"]); | ||
exports.default = _default; |
{ | ||
"name": "babel-plugin-polyfill-corejs3", | ||
"version": "0.5.3", | ||
"version": "0.6.0", | ||
"description": "A Babel plugin to inject imports to core-js@3 polyfills", | ||
@@ -29,4 +29,4 @@ "repository": { | ||
"dependencies": { | ||
"@babel/helper-define-polyfill-provider": "^0.3.2", | ||
"core-js-compat": "^3.21.0" | ||
"@babel/helper-define-polyfill-provider": "^0.3.3", | ||
"core-js-compat": "^3.25.1" | ||
}, | ||
@@ -41,4 +41,4 @@ "devDependencies": { | ||
"@babel/plugin-transform-spread": "^7.16.7", | ||
"core-js": "^3.21.0", | ||
"core-js-pure": "^3.21.0" | ||
"core-js": "^3.25.1", | ||
"core-js-pure": "^3.25.1" | ||
}, | ||
@@ -48,3 +48,3 @@ "peerDependencies": { | ||
}, | ||
"gitHead": "62b9025beeec450a1ff5d61fadcf63963aec5015" | ||
"gitHead": "42b9477c199c0c5420b45cfa8c9bb892d94a64af" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
169888
14
1452