summaryrefslogtreecommitdiff
path: root/node_modules/babel-plugin-polyfill-corejs3/lib/built-in-definitions.js
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2024-05-14 14:05:49 +0800
committerlittleblack111 <littleblack11111@gmail.com>2024-05-14 14:05:49 +0800
commit06823fbf1c2e763a5bf76c3990ca98fbbcd98691 (patch)
tree4280bece3888d12a022093bf1a9cd1b049393602 /node_modules/babel-plugin-polyfill-corejs3/lib/built-in-definitions.js
parent1368909b3cd552dbb0d12d5863c597f5be46177d (diff)
updated node_modules
Diffstat (limited to 'node_modules/babel-plugin-polyfill-corejs3/lib/built-in-definitions.js')
-rw-r--r--node_modules/babel-plugin-polyfill-corejs3/lib/built-in-definitions.js62
1 files changed, 33 insertions, 29 deletions
diff --git a/node_modules/babel-plugin-polyfill-corejs3/lib/built-in-definitions.js b/node_modules/babel-plugin-polyfill-corejs3/lib/built-in-definitions.js
index a11d339d..3790fc58 100644
--- a/node_modules/babel-plugin-polyfill-corejs3/lib/built-in-definitions.js
+++ b/node_modules/babel-plugin-polyfill-corejs3/lib/built-in-definitions.js
@@ -4,6 +4,7 @@ exports.__esModule = true;
exports.StaticProperties = exports.PromiseDependenciesWithIterators = exports.PromiseDependencies = exports.InstanceProperties = exports.DecoratorMetadataDependencies = exports.CommonIterators = exports.BuiltIns = void 0;
var _data = _interopRequireDefault(require("../core-js-compat/data.js"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+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); }
const polyfillsOrder = {};
Object.keys(_data.default).forEach((name, index) => {
polyfillsOrder[name] = index;
@@ -16,7 +17,7 @@ const define = (pure, global, name = global[0], exclude) => {
exclude
};
};
-const typed = name => define(null, [name, ...TypedArrayDependencies]);
+const typed = (...modules) => define(null, [...modules, ...TypedArrayDependencies]);
const ArrayNatureIterators = ["es.array.iterator", "web.dom-collections.iterator"];
const CommonIterators = ["es.string.iterator", ...ArrayNatureIterators];
exports.CommonIterators = CommonIterators;
@@ -24,7 +25,7 @@ const ArrayNatureIteratorsWithTag = ["es.object.to-string", ...ArrayNatureIterat
const CommonIteratorsWithTag = ["es.object.to-string", ...CommonIterators];
const ErrorDependencies = ["es.error.cause", "es.error.to-string"];
const SuppressedErrorDependencies = ["esnext.suppressed-error.constructor", ...ErrorDependencies];
-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-reversed", "es.typed-array.to-sorted", "es.typed-array.to-string", "es.typed-array.with", "es.object.to-string", "es.array.iterator", "es.array-buffer.slice", "esnext.array-buffer.detached", "esnext.array-buffer.transfer", "esnext.array-buffer.transfer-to-fixed-length", "esnext.typed-array.filter-reject", "esnext.typed-array.group-by", "esnext.typed-array.to-spliced", "esnext.typed-array.unique-by"];
+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-reversed", "es.typed-array.to-sorted", "es.typed-array.to-string", "es.typed-array.with", "es.object.to-string", "es.array.iterator", "es.array-buffer.slice", "es.data-view", "es.array-buffer.detached", "es.array-buffer.transfer", "es.array-buffer.transfer-to-fixed-length", "esnext.typed-array.filter-reject", "esnext.typed-array.group-by", "esnext.typed-array.to-spliced", "esnext.typed-array.unique-by"];
const PromiseDependencies = ["es.promise", "es.object.to-string"];
exports.PromiseDependencies = PromiseDependencies;
const PromiseDependenciesWithIterators = [...PromiseDependencies, ...CommonIterators];
@@ -41,17 +42,17 @@ const AsyncIteratorProblemMethods = ["esnext.async-iterator.every", "esnext.asyn
const IteratorDependencies = ["esnext.iterator.constructor", "es.object.to-string"];
const DecoratorMetadataDependencies = ["esnext.symbol.metadata", "esnext.function.metadata"];
exports.DecoratorMetadataDependencies = DecoratorMetadataDependencies;
-const TypedArrayStaticMethods = {
- from: define(null, ["es.typed-array.from"]),
- fromAsync: define(null, ["esnext.typed-array.from-async", ...PromiseDependenciesWithIterators]),
- of: define(null, ["es.typed-array.of"])
-};
-const DataViewDependencies = ["es.data-view", "es.array-buffer.slice", "es.object.to-string"];
+const TypedArrayStaticMethods = base => ({
+ from: define(null, ["es.typed-array.from", base, ...TypedArrayDependencies]),
+ fromAsync: define(null, ["esnext.typed-array.from-async", base, ...PromiseDependenciesWithIterators, ...TypedArrayDependencies]),
+ of: define(null, ["es.typed-array.of", base, ...TypedArrayDependencies])
+});
+const DataViewDependencies = ["es.data-view", "es.array-buffer.constructor", "es.array-buffer.slice", "es.array-buffer.detached", "es.array-buffer.transfer", "es.array-buffer.transfer-to-fixed-length", "es.object.to-string"];
const BuiltIns = {
AsyncDisposableStack: define("async-disposable-stack/index", ["esnext.async-disposable-stack.constructor", "es.object.to-string", "esnext.async-iterator.async-dispose", "esnext.iterator.dispose", ...PromiseDependencies, ...SuppressedErrorDependencies]),
AsyncIterator: define("async-iterator/index", AsyncIteratorDependencies),
AggregateError: define("aggregate-error", ["es.aggregate-error", ...ErrorDependencies, ...CommonIteratorsWithTag, "es.aggregate-error.cause"]),
- ArrayBuffer: define(null, ["es.array-buffer.constructor", "es.array-buffer.slice", "es.object.to-string"]),
+ ArrayBuffer: define(null, ["es.array-buffer.constructor", "es.array-buffer.slice", "es.data-view", "es.array-buffer.detached", "es.array-buffer.transfer", "es.array-buffer.transfer-to-fixed-length", "es.object.to-string"]),
DataView: define(null, DataViewDependencies),
Date: define(null, ["es.date.to-string"]),
DOMException: define("dom-exception/index", DOMExceptionDependencies),
@@ -64,7 +65,7 @@ const BuiltIns = {
Int16Array: typed("es.typed-array.int16-array"),
Int32Array: typed("es.typed-array.int32-array"),
Iterator: define("iterator/index", IteratorDependencies),
- Uint8Array: typed("es.typed-array.uint8-array"),
+ Uint8Array: typed("es.typed-array.uint8-array", "esnext.uint8-array.to-base64", "esnext.uint8-array.to-hex"),
Uint8ClampedArray: typed("es.typed-array.uint8-clamped-array"),
Uint16Array: typed("es.typed-array.uint16-array"),
Uint32Array: typed("es.typed-array.uint32-array"),
@@ -82,7 +83,7 @@ const BuiltIns = {
SyntaxError: define(null, ErrorDependencies),
TypeError: define(null, ErrorDependencies),
URIError: define(null, ErrorDependencies),
- URL: define("url/index", ["web.url", ...URLSearchParamsDependencies]),
+ URL: define("url/index", ["web.url", "web.url.to-json", ...URLSearchParamsDependencies]),
URLSearchParams: define("url-search-params/index", URLSearchParamsDependencies),
WeakMap: define("weak-map/index", WeakMapDependencies),
WeakSet: define("weak-set/index", WeakSetDependencies),
@@ -137,7 +138,7 @@ const StaticProperties = {
isRawJSON: define("json/is-raw-json", ["esnext.json.is-raw-json"]),
parse: define("json/parse", ["esnext.json.parse", "es.object.keys"]),
rawJSON: define("json/raw-json", ["esnext.json.raw-json", "es.object.create", "es.object.freeze"]),
- stringify: define("json/stringify", ["es.json.stringify"], "es.symbol")
+ stringify: define("json/stringify", ["es.json.stringify", "es.date.to-json"], "es.symbol")
},
Math: {
DEG_PER_RAD: define("math/deg-per-rad", ["esnext.math.deg-per-rad"]),
@@ -174,8 +175,8 @@ const StaticProperties = {
},
Map: {
from: define(null, ["esnext.map.from", ...MapDependencies]),
- groupBy: define(null, ["esnext.map.group-by", ...MapDependencies]),
- keyBy: define(null, ["esnext.map.key-by", ...MapDependencies]),
+ groupBy: define("map/group-by", ["es.map.group-by", ...MapDependencies]),
+ keyBy: define("map/key-by", ["esnext.map.key-by", ...MapDependencies]),
of: define(null, ["esnext.map.of", ...MapDependencies])
},
Number: {
@@ -204,7 +205,7 @@ const StaticProperties = {
getOwnPropertyNames: define("object/get-own-property-names", ["es.object.get-own-property-names"]),
getOwnPropertySymbols: define("object/get-own-property-symbols", ["es.symbol"]),
getPrototypeOf: define("object/get-prototype-of", ["es.object.get-prototype-of"]),
- groupBy: define("object/group-by", ["esnext.object.group-by", "es.object.create"]),
+ groupBy: define("object/group-by", ["es.object.group-by", "es.object.create"]),
hasOwn: define("object/has-own", ["es.object.has-own"]),
is: define("object/is", ["es.object.is"]),
isExtensible: define("object/is-extensible", ["es.object.is-extensible"]),
@@ -218,11 +219,11 @@ const StaticProperties = {
},
Promise: {
all: define(null, PromiseDependenciesWithIterators),
- allSettled: define(null, ["es.promise.all-settled", ...PromiseDependenciesWithIterators]),
- any: define(null, ["es.promise.any", "es.aggregate-error", ...PromiseDependenciesWithIterators]),
+ allSettled: define("promise/all-settled", ["es.promise.all-settled", ...PromiseDependenciesWithIterators]),
+ any: define("promise/any", ["es.promise.any", "es.aggregate-error", ...PromiseDependenciesWithIterators]),
race: define(null, PromiseDependenciesWithIterators),
- try: define(null, ["esnext.promise.try", ...PromiseDependencies]),
- withResolvers: define(null, ["esnext.promise.with-resolvers", ...PromiseDependencies])
+ try: define("promise/try", ["esnext.promise.try", ...PromiseDependencies]),
+ withResolvers: define("promise/with-resolvers", ["es.promise.with-resolvers", ...PromiseDependencies])
},
Reflect: {
apply: define("reflect/apply", ["es.reflect.apply"]),
@@ -300,15 +301,18 @@ const StaticProperties = {
from: define(null, ["esnext.weak-set.from", ...WeakSetDependencies]),
of: define(null, ["esnext.weak-set.of", ...WeakSetDependencies])
},
- Int8Array: TypedArrayStaticMethods,
- Uint8Array: TypedArrayStaticMethods,
- Uint8ClampedArray: TypedArrayStaticMethods,
- Int16Array: TypedArrayStaticMethods,
- Uint16Array: TypedArrayStaticMethods,
- Int32Array: TypedArrayStaticMethods,
- Uint32Array: TypedArrayStaticMethods,
- Float32Array: TypedArrayStaticMethods,
- Float64Array: TypedArrayStaticMethods,
+ Int8Array: TypedArrayStaticMethods("es.typed-array.int8-array"),
+ Uint8Array: _extends({
+ fromBase64: define(null, ["esnext.uint8-array.from-base64", ...TypedArrayDependencies]),
+ fromHex: define(null, ["esnext.uint8-array.from-hex", ...TypedArrayDependencies])
+ }, TypedArrayStaticMethods("es.typed-array.uint8-array")),
+ Uint8ClampedArray: TypedArrayStaticMethods("es.typed-array.uint8-clamped-array"),
+ Int16Array: TypedArrayStaticMethods("es.typed-array.int16-array"),
+ Uint16Array: TypedArrayStaticMethods("es.typed-array.uint16-array"),
+ Int32Array: TypedArrayStaticMethods("es.typed-array.int32-array"),
+ Uint32Array: TypedArrayStaticMethods("es.typed-array.uint32-array"),
+ Float32Array: TypedArrayStaticMethods("es.typed-array.float32-array"),
+ Float64Array: TypedArrayStaticMethods("es.typed-array.float64-array"),
WebAssembly: {
CompileError: define(null, ErrorDependencies),
LinkError: define(null, ErrorDependencies),
@@ -420,7 +424,7 @@ const InstanceProperties = {
toFixed: define(null, ["es.number.to-fixed"]),
toGMTString: define(null, ["es.date.to-gmt-string"]),
toISOString: define(null, ["es.date.to-iso-string"]),
- toJSON: define(null, ["es.date.to-json", "web.url.to-json"]),
+ toJSON: define(null, ["es.date.to-json"]),
toPrecision: define(null, ["es.number.to-precision"]),
toReversed: define("instance/to-reversed", ["es.array.to-reversed"]),
toSorted: define("instance/to-sorted", ["es.array.to-sorted", "es.array.sort"]),