babel-plugin-polyfill-corejs3 0.12.0 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -20,7 +20,7 @@ Add this plugin to your Babel configuration:
20
20
 
21
21
  ```json
22
22
  {
23
- "plugins": [["polyfill-corejs3", { "method": "usage-global", "version": "3.20" }]]
23
+ "plugins": [["polyfill-corejs3", { "method": "usage-global", "version": "3.48" }]]
24
24
  }
25
25
  ```
26
26
 
@@ -55,7 +55,7 @@ If you are a library author, specify a reasonably modern `core-js` version in yo
55
55
  ```json
56
56
  {
57
57
  "dependencies": {
58
- "core-js": "^3.20.0"
58
+ "core-js": "^3.48.0"
59
59
  }
60
60
  }
61
61
  ```
package/esm/index.mjs CHANGED
@@ -6,7 +6,7 @@ import defineProvider from '@babel/helper-define-polyfill-provider';
6
6
 
7
7
  // This file is automatically generated by scripts/build-corejs3-shipped-proposals.mjs
8
8
 
9
- var corejs3ShippedProposalsList = new Set(["esnext.suppressed-error.constructor", "esnext.array.from-async", "esnext.array.group", "esnext.array.group-to-map", "esnext.async-disposable-stack.constructor", "esnext.disposable-stack.constructor", "esnext.error.is-error", "esnext.iterator.dispose", "esnext.json.is-raw-json", "esnext.json.parse", "esnext.json.raw-json", "esnext.math.sum-precise", "esnext.symbol.async-dispose", "esnext.symbol.dispose", "esnext.symbol.metadata", "esnext.uint8-array.from-base64", "esnext.uint8-array.from-hex", "esnext.uint8-array.set-from-base64", "esnext.uint8-array.set-from-hex", "esnext.uint8-array.to-base64", "esnext.uint8-array.to-hex"]);
9
+ var corejs3ShippedProposalsList = new Set(["esnext.array.group", "esnext.array.group-to-map", "esnext.iterator.zip", "esnext.iterator.zip-keyed", "esnext.symbol.metadata"]);
10
10
 
11
11
  const polyfillsOrder = {};
12
12
  Object.keys(corejs3Polyfills).forEach((name, index) => {
@@ -26,15 +26,15 @@ const CommonIterators = ["es.string.iterator", ...ArrayNatureIterators];
26
26
  const ArrayNatureIteratorsWithTag = ["es.object.to-string", ...ArrayNatureIterators];
27
27
  const CommonIteratorsWithTag = ["es.object.to-string", ...CommonIterators];
28
28
  const ErrorDependencies = ["es.error.cause", "es.error.to-string"];
29
- const SuppressedErrorDependencies = ["esnext.suppressed-error.constructor", ...ErrorDependencies];
29
+ const SuppressedErrorDependencies = ["es.suppressed-error.constructor", ...ErrorDependencies];
30
30
  const ArrayBufferDependencies = ["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"];
31
31
  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", "esnext.typed-array.filter-reject", "esnext.typed-array.group-by", "esnext.typed-array.to-spliced", "esnext.typed-array.unique-by", ...ArrayBufferDependencies];
32
32
  const PromiseDependencies = ["es.promise", "es.object.to-string"];
33
33
  const PromiseDependenciesWithIterators = [...PromiseDependencies, ...CommonIterators];
34
34
  const SymbolDependencies = ["es.symbol", "es.symbol.description", "es.object.to-string"];
35
- const MapDependencies = ["es.map", "esnext.map.delete-all", "esnext.map.emplace", "esnext.map.every", "esnext.map.filter", "esnext.map.find", "esnext.map.find-key", "esnext.map.get-or-insert", "esnext.map.get-or-insert-computed", "esnext.map.includes", "esnext.map.key-of", "esnext.map.map-keys", "esnext.map.map-values", "esnext.map.merge", "esnext.map.reduce", "esnext.map.some", "esnext.map.update", ...CommonIteratorsWithTag];
35
+ const MapDependencies = ["es.map", "es.map.get-or-insert", "es.map.get-or-insert-computed", "esnext.map.delete-all", "esnext.map.emplace", "esnext.map.every", "esnext.map.filter", "esnext.map.find", "esnext.map.find-key", "esnext.map.includes", "esnext.map.key-of", "esnext.map.map-keys", "esnext.map.map-values", "esnext.map.merge", "esnext.map.reduce", "esnext.map.some", "esnext.map.update", ...CommonIteratorsWithTag];
36
36
  const SetDependencies = ["es.set", "es.set.difference.v2", "es.set.intersection.v2", "es.set.is-disjoint-from.v2", "es.set.is-subset-of.v2", "es.set.is-superset-of.v2", "es.set.symmetric-difference.v2", "es.set.union.v2", "esnext.set.add-all", "esnext.set.delete-all", "esnext.set.difference", "esnext.set.every", "esnext.set.filter", "esnext.set.find", "esnext.set.intersection", "esnext.set.is-disjoint-from", "esnext.set.is-subset-of", "esnext.set.is-superset-of", "esnext.set.join", "esnext.set.map", "esnext.set.reduce", "esnext.set.some", "esnext.set.symmetric-difference", "esnext.set.union", ...CommonIteratorsWithTag];
37
- const WeakMapDependencies = ["es.weak-map", "esnext.weak-map.delete-all", "esnext.weak-map.emplace", "esnext.weak-map.get-or-insert", "esnext.weak-map.get-or-insert-computed", ...CommonIteratorsWithTag];
37
+ const WeakMapDependencies = ["es.weak-map", "es.weak-map.get-or-insert", "es.weak-map.get-or-insert-computed", "esnext.weak-map.delete-all", "esnext.weak-map.emplace", ...CommonIteratorsWithTag];
38
38
  const WeakSetDependencies = ["es.weak-set", "esnext.weak-set.add-all", "esnext.weak-set.delete-all", ...CommonIteratorsWithTag];
39
39
  const DOMExceptionDependencies = ["web.dom-exception.constructor", "web.dom-exception.stack", "web.dom-exception.to-string-tag", "es.error.to-string"];
40
40
  const URLSearchParamsDependencies = ["web.url-search-params", "web.url-search-params.delete", "web.url-search-params.has", "web.url-search-params.size", ...CommonIteratorsWithTag];
@@ -49,14 +49,14 @@ const TypedArrayStaticMethods = base => ({
49
49
  });
50
50
  const DataViewDependencies = ["es.data-view", ...ArrayBufferDependencies];
51
51
  const BuiltIns = {
52
- 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]),
52
+ AsyncDisposableStack: define("async-disposable-stack/index", ["es.async-disposable-stack.constructor", "es.object.to-string", "es.async-iterator.async-dispose", "es.iterator.dispose", ...PromiseDependencies, ...SuppressedErrorDependencies]),
53
53
  AsyncIterator: define("async-iterator/index", AsyncIteratorDependencies),
54
54
  AggregateError: define("aggregate-error", ["es.aggregate-error", ...ErrorDependencies, ...CommonIteratorsWithTag, "es.aggregate-error.cause"]),
55
55
  ArrayBuffer: define(null, ArrayBufferDependencies),
56
56
  DataView: define(null, DataViewDependencies),
57
57
  Date: define(null, ["es.date.to-string"]),
58
58
  DOMException: define("dom-exception/index", DOMExceptionDependencies),
59
- DisposableStack: define("disposable-stack/index", ["esnext.disposable-stack.constructor", "es.object.to-string", "esnext.iterator.dispose", ...SuppressedErrorDependencies]),
59
+ DisposableStack: define("disposable-stack/index", ["es.disposable-stack.constructor", "es.object.to-string", "es.iterator.dispose", ...SuppressedErrorDependencies]),
60
60
  Error: define(null, ErrorDependencies),
61
61
  EvalError: define(null, ErrorDependencies),
62
62
  Float32Array: typed("es.typed-array.float32-array"),
@@ -65,7 +65,7 @@ const BuiltIns = {
65
65
  Int16Array: typed("es.typed-array.int16-array"),
66
66
  Int32Array: typed("es.typed-array.int32-array"),
67
67
  Iterator: define("iterator/index", IteratorDependencies),
68
- Uint8Array: typed("es.typed-array.uint8-array", "esnext.uint8-array.set-from-base64", "esnext.uint8-array.set-from-hex", "esnext.uint8-array.to-base64", "esnext.uint8-array.to-hex"),
68
+ Uint8Array: typed("es.typed-array.uint8-array", "es.uint8-array.set-from-base64", "es.uint8-array.set-from-hex", "es.uint8-array.to-base64", "es.uint8-array.to-hex"),
69
69
  Uint8ClampedArray: typed("es.typed-array.uint8-clamped-array"),
70
70
  Uint16Array: typed("es.typed-array.uint16-array"),
71
71
  Uint32Array: typed("es.typed-array.uint32-array"),
@@ -111,7 +111,7 @@ const StaticProperties = {
111
111
  },
112
112
  Array: {
113
113
  from: define("array/from", ["es.array.from", "es.string.iterator"]),
114
- fromAsync: define("array/from-async", ["esnext.array.from-async", ...PromiseDependenciesWithIterators]),
114
+ fromAsync: define("array/from-async", ["es.array.from-async", ...PromiseDependenciesWithIterators]),
115
115
  isArray: define("array/is-array", ["es.array.is-array"]),
116
116
  isTemplateObject: define("array/is-template-object", ["esnext.array.is-template-object"]),
117
117
  of: define("array/of", ["es.array.of"])
@@ -126,22 +126,24 @@ const StaticProperties = {
126
126
  now: define("date/now", ["es.date.now"])
127
127
  },
128
128
  Error: {
129
- isError: define("error/is-error", ["esnext.error.is-error", "es.object.create"])
129
+ isError: define("error/is-error", ["es.error.is-error", "es.object.create"])
130
130
  },
131
131
  Function: {
132
132
  isCallable: define("function/is-callable", ["esnext.function.is-callable"]),
133
133
  isConstructor: define("function/is-constructor", ["esnext.function.is-constructor"])
134
134
  },
135
135
  Iterator: {
136
- concat: define("iterator/concat", ["esnext.iterator.concat", ...IteratorDependencies, ...CommonIterators]),
136
+ concat: define("iterator/concat", ["es.iterator.concat", ...IteratorDependencies, ...CommonIterators]),
137
137
  from: define("iterator/from", ["es.iterator.from", ...IteratorDependencies, ...CommonIterators]),
138
- range: define("iterator/range", ["esnext.iterator.range", ...IteratorDependencies, "es.object.to-string"])
138
+ range: define("iterator/range", ["esnext.iterator.range", ...IteratorDependencies]),
139
+ zip: define("iterator/zip", ["esnext.iterator.zip", ...IteratorDependencies, ...CommonIterators]),
140
+ zipKeyed: define("iterator/zip-keyed", ["esnext.iterator.zip-keyed", "es.object.create", "es.reflect.own-keys", ...IteratorDependencies, ...CommonIterators])
139
141
  },
140
142
  JSON: {
141
- isRawJSON: define("json/is-raw-json", ["esnext.json.is-raw-json"]),
142
- parse: define("json/parse", ["esnext.json.parse", "es.object.keys"]),
143
- rawJSON: define("json/raw-json", ["esnext.json.raw-json", "es.object.create", "es.object.freeze"]),
144
- stringify: define("json/stringify", ["es.json.stringify", "es.date.to-json"], "es.symbol")
143
+ isRawJSON: define("json/is-raw-json", ["es.json.is-raw-json"]),
144
+ parse: define("json/parse", ["es.json.parse", "es.object.keys"]),
145
+ rawJSON: define("json/raw-json", ["es.json.raw-json", "es.object.create", "es.object.freeze"]),
146
+ stringify: define("json/stringify", ["es.json.stringify", "es.date.to-json"])
145
147
  },
146
148
  Math: {
147
149
  DEG_PER_RAD: define("math/deg-per-rad", ["esnext.math.deg-per-rad"]),
@@ -172,7 +174,7 @@ const StaticProperties = {
172
174
  sign: define("math/sign", ["es.math.sign"]),
173
175
  signbit: define("math/signbit", ["esnext.math.signbit"]),
174
176
  sinh: define("math/sinh", ["es.math.sinh"]),
175
- sumPrecise: define("math/sum-precise", ["esnext.math.sum-precise", "es.array.iterator"]),
177
+ sumPrecise: define("math/sum-precise", ["es.math.sum-precise", "es.array.iterator"]),
176
178
  tanh: define("math/tanh", ["es.math.tanh"]),
177
179
  trunc: define("math/trunc", ["es.math.trunc"]),
178
180
  umulh: define("math/umulh", ["esnext.math.umulh"])
@@ -267,10 +269,10 @@ const StaticProperties = {
267
269
  raw: define("string/raw", ["es.string.raw"])
268
270
  },
269
271
  Symbol: {
270
- asyncDispose: define("symbol/async-dispose", ["esnext.symbol.async-dispose", "esnext.async-iterator.async-dispose"]),
272
+ asyncDispose: define("symbol/async-dispose", ["es.symbol.async-dispose", "es.async-iterator.async-dispose"]),
271
273
  asyncIterator: define("symbol/async-iterator", ["es.symbol.async-iterator"]),
272
274
  customMatcher: define("symbol/custom-matcher", ["esnext.symbol.custom-matcher"]),
273
- dispose: define("symbol/dispose", ["esnext.symbol.dispose", "esnext.iterator.dispose"]),
275
+ dispose: define("symbol/dispose", ["es.symbol.dispose", "es.iterator.dispose"]),
274
276
  for: define("symbol/for", [], "es.symbol"),
275
277
  hasInstance: define("symbol/has-instance", ["es.symbol.has-instance", "es.function.has-instance"]),
276
278
  isConcatSpreadable: define("symbol/is-concat-spreadable", ["es.symbol.is-concat-spreadable", "es.array.concat"]),
@@ -309,8 +311,8 @@ const StaticProperties = {
309
311
  },
310
312
  Int8Array: TypedArrayStaticMethods("es.typed-array.int8-array"),
311
313
  Uint8Array: {
312
- fromBase64: define(null, ["esnext.uint8-array.from-base64", ...TypedArrayDependencies]),
313
- fromHex: define(null, ["esnext.uint8-array.from-hex", ...TypedArrayDependencies]),
314
+ fromBase64: define(null, ["es.uint8-array.from-base64", ...TypedArrayDependencies]),
315
+ fromHex: define(null, ["es.uint8-array.from-hex", ...TypedArrayDependencies]),
314
316
  ...TypedArrayStaticMethods("es.typed-array.uint8-array")
315
317
  },
316
318
  Uint8ClampedArray: TypedArrayStaticMethods("es.typed-array.uint8-clamped-array"),
@@ -344,6 +346,8 @@ const InstanceProperties = {
344
346
  bind: define("instance/bind", ["es.function.bind"]),
345
347
  blink: define(null, ["es.string.blink"]),
346
348
  bold: define(null, ["es.string.bold"]),
349
+ chunks: define(null, ["esnext.iterator.chunks", ...IteratorDependencies]),
350
+ clamp: define("instance/clamp", ["esnext.number.clamp"]),
347
351
  codePointAt: define("instance/code-point-at", ["es.string.code-point-at"]),
348
352
  codePoints: define("instance/code-points", ["esnext.string.code-points"]),
349
353
  concat: define("instance/concat", ["es.array.concat"], undefined, ["String"]),
@@ -362,19 +366,16 @@ const InstanceProperties = {
362
366
  // "esnext.async-iterator.every",
363
367
  // ...AsyncIteratorDependencies
364
368
  ]),
365
-
366
369
  exec: define(null, ["es.regexp.exec"]),
367
370
  fill: define("instance/fill", ["es.array.fill"]),
368
371
  filter: define("instance/filter", ["es.array.filter", "es.iterator.filter", ...IteratorDependencies
369
372
  // "esnext.async-iterator.filter",
370
373
  ]),
371
-
372
- filterReject: define("instance/filterReject", ["esnext.array.filter-reject"]),
374
+ filterReject: define("instance/filter-reject", ["esnext.array.filter-reject"]),
373
375
  finally: define(null, ["es.promise.finally", ...PromiseDependencies]),
374
376
  find: define("instance/find", ["es.array.find", "es.iterator.find", ...IteratorDependencies
375
377
  // "esnext.async-iterator.find",
376
378
  ]),
377
-
378
379
  findIndex: define("instance/find-index", ["es.array.find-index"]),
379
380
  findLast: define("instance/find-last", ["es.array.find-last"]),
380
381
  findLastIndex: define("instance/find-last-index", ["es.array.find-last-index"]),
@@ -383,7 +384,6 @@ const InstanceProperties = {
383
384
  flatMap: define("instance/flat-map", ["es.array.flat-map", "es.array.unscopables.flat-map", "es.iterator.flat-map", ...IteratorDependencies
384
385
  // "esnext.async-iterator.flat-map",
385
386
  ]),
386
-
387
387
  flat: define("instance/flat", ["es.array.flat", "es.array.unscopables.flat"]),
388
388
  getFloat16: define(null, ["es.data-view.get-float16", ...DataViewDependencies]),
389
389
  getUint8Clamped: define(null, ["esnext.data-view.get-uint8-clamped", ...DataViewDependencies]),
@@ -401,7 +401,7 @@ const InstanceProperties = {
401
401
  indexed: define(null, ["esnext.async-iterator.indexed", ...AsyncIteratorDependencies, "esnext.iterator.indexed", ...IteratorDependencies]),
402
402
  indexOf: define("instance/index-of", ["es.array.index-of"]),
403
403
  isWellFormed: define("instance/is-well-formed", ["es.string.is-well-formed"]),
404
- italic: define(null, ["es.string.italics"]),
404
+ italics: define(null, ["es.string.italics"]),
405
405
  join: define(null, ["es.array.join"]),
406
406
  keys: define("instance/keys", ArrayNatureIteratorsWithTag),
407
407
  lastIndex: define(null, ["esnext.array.last-index"]),
@@ -411,7 +411,6 @@ const InstanceProperties = {
411
411
  map: define("instance/map", ["es.array.map", "es.iterator.map", ...IteratorDependencies
412
412
  // "esnext.async-iterator.map",
413
413
  ]),
414
-
415
414
  match: define(null, ["es.string.match", "es.regexp.exec"]),
416
415
  matchAll: define("instance/match-all", ["es.string.match-all", "es.regexp.exec"]),
417
416
  name: define(null, ["es.function.name"]),
@@ -421,7 +420,6 @@ const InstanceProperties = {
421
420
  reduce: define("instance/reduce", ["es.array.reduce", "es.iterator.reduce", ...IteratorDependencies
422
421
  // "esnext.async-iterator.reduce",
423
422
  ]),
424
-
425
423
  reduceRight: define("instance/reduce-right", ["es.array.reduce-right"]),
426
424
  repeat: define("instance/repeat", ["es.string.repeat"]),
427
425
  replace: define(null, ["es.string.replace", "es.regexp.exec"]),
@@ -432,11 +430,11 @@ const InstanceProperties = {
432
430
  setUint8Clamped: define(null, ["esnext.data-view.set-uint8-clamped", ...DataViewDependencies]),
433
431
  setYear: define(null, ["es.date.set-year"]),
434
432
  slice: define("instance/slice", ["es.array.slice"]),
433
+ sliding: define(null, ["esnext.iterator.sliding", ...IteratorDependencies]),
435
434
  small: define(null, ["es.string.small"]),
436
435
  some: define("instance/some", ["es.array.some", "es.iterator.some", ...IteratorDependencies
437
436
  // "esnext.async-iterator.some",
438
437
  ]),
439
-
440
438
  sort: define("instance/sort", ["es.array.sort"]),
441
439
  splice: define("instance/splice", ["es.array.splice"]),
442
440
  split: define(null, ["es.string.split", "es.regexp.exec"]),
@@ -470,6 +468,7 @@ const InstanceProperties = {
470
468
  unshift: define("instance/unshift", ["es.array.unshift"]),
471
469
  unThis: define("instance/un-this", ["esnext.function.un-this"]),
472
470
  values: define("instance/values", ArrayNatureIteratorsWithTag),
471
+ windows: define(null, ["esnext.iterator.windows", ...IteratorDependencies]),
473
472
  with: define("instance/with", ["es.array.with"]),
474
473
  __defineGetter__: define(null, ["es.object.define-getter"]),
475
474
  __defineSetter__: define(null, ["es.object.define-setter"]),
@@ -695,7 +694,6 @@ var index = defineProvider(function ({
695
694
  path.replaceWith(t.callExpression(utils.injectDefaultImport(coreJSPureHelper("is-iterable", useBabelRuntime, ext), "isIterable"), [path.node.right] // meta.kind === "in" narrows this
696
695
  ));
697
696
  }
698
-
699
697
  return;
700
698
  }
701
699
  if (path.parentPath.isUnaryExpression({
@@ -853,5 +851,5 @@ var index = defineProvider(function ({
853
851
  };
854
852
  });
855
853
 
856
- export default index;
854
+ export { index as default };
857
855
  //# sourceMappingURL=index.mjs.map