From 5c2f8ba0483cb51d8bef00fe49f259e67d624e4c Mon Sep 17 00:00:00 2001 From: Denis Pushkarev Date: Thu, 18 Apr 2024 03:16:01 +0700 Subject: [PATCH] update `core-js` --- package.json | 2 +- .../package.json | 6 +- .../src/built-in-definitions.ts | 22 +- .../src/shipped-proposals.ts | 7 - .../actual-chrome-107-corejs-3.37/input.mjs | 1 + .../options.json | 14 + .../actual-chrome-107-corejs-3.37/output.mjs | 84 +++++ .../entry-global/actual-corejs-3.37/input.mjs | 1 + .../actual-corejs-3.37/options.json | 11 + .../actual-corejs-3.37/output.mjs | 327 ++++++++++++++++++ .../usage-global/all-corejs-3.28/output.mjs | 7 + .../usage-global/all-corejs-3.29/output.mjs | 7 + .../usage-global/all-corejs-3.30/output.mjs | 7 + .../usage-global/all-corejs-3.31/output.mjs | 7 + .../usage-global/all-corejs-3.32/output.mjs | 7 + .../usage-global/all-corejs-3.33/output.mjs | 7 + .../usage-global/all-corejs-3.34/output.mjs | 7 + .../usage-global/all-corejs-3.36/input.mjs | 4 + .../usage-global/all-corejs-3.36/output.mjs | 10 + .../usage-global/all-corejs-3.37/input.mjs | 102 ++++++ .../usage-global/all-corejs-3.37/options.json | 11 + .../usage-global/all-corejs-3.37/output.mjs | 166 +++++++++ .../input.mjs | 4 + .../output.mjs | 3 + .../input.mjs | 102 ++++++ .../options.json | 15 + .../output.mjs | 197 +++++++++++ .../usage-pure/all-corejs-3.36/input.mjs | 4 + .../usage-pure/all-corejs-3.36/output.mjs | 3 + .../usage-pure/all-corejs-3.37/input.mjs | 99 ++++++ .../usage-pure/all-corejs-3.37/options.json | 11 + .../usage-pure/all-corejs-3.37/output.mjs | 96 +++++ .../input.mjs | 4 + .../output.mjs | 3 + .../input.mjs | 99 ++++++ .../options.json | 15 + .../output.mjs | 116 +++++++ yarn.lock | 30 +- 38 files changed, 1585 insertions(+), 33 deletions(-) create mode 100644 packages/babel-plugin-polyfill-corejs3/test/fixtures/entry-global/actual-chrome-107-corejs-3.37/input.mjs create mode 100644 packages/babel-plugin-polyfill-corejs3/test/fixtures/entry-global/actual-chrome-107-corejs-3.37/options.json create mode 100644 packages/babel-plugin-polyfill-corejs3/test/fixtures/entry-global/actual-chrome-107-corejs-3.37/output.mjs create mode 100644 packages/babel-plugin-polyfill-corejs3/test/fixtures/entry-global/actual-corejs-3.37/input.mjs create mode 100644 packages/babel-plugin-polyfill-corejs3/test/fixtures/entry-global/actual-corejs-3.37/options.json create mode 100644 packages/babel-plugin-polyfill-corejs3/test/fixtures/entry-global/actual-corejs-3.37/output.mjs create mode 100644 packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-corejs-3.37/input.mjs create mode 100644 packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-corejs-3.37/options.json create mode 100644 packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-corejs-3.37/output.mjs create mode 100644 packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-proposals-chrome-107-corejs-3.37/input.mjs create mode 100644 packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-proposals-chrome-107-corejs-3.37/options.json create mode 100644 packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-proposals-chrome-107-corejs-3.37/output.mjs create mode 100644 packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-pure/all-corejs-3.37/input.mjs create mode 100644 packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-pure/all-corejs-3.37/options.json create mode 100644 packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-pure/all-corejs-3.37/output.mjs create mode 100644 packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-pure/all-proposals-chrome-90-corejs-3.37/input.mjs create mode 100644 packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-pure/all-proposals-chrome-90-corejs-3.37/options.json create mode 100644 packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-pure/all-proposals-chrome-90-corejs-3.37/output.mjs diff --git a/package.json b/package.json index 53e8ca69..dc3f3a0d 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "@lerna/package": "patch:@lerna/package@npm:3.16.0#.yarn-patches/@lerna/package.patch", "@lerna/package-graph": "patch:@lerna/package-graph@npm:3.18.5#.yarn-patches/@lerna/package-graph.patch", "@lerna/pack-directory": "patch:@lerna/pack-directory@npm:3.16.4#.yarn-patches/@lerna/pack-directory.patch", - "@babel/preset-env/core-js-compat": "^3.36.1" + "@babel/preset-env/core-js-compat": "^3.37.0" }, "engines": { "node": ">= 6.9.0", diff --git a/packages/babel-plugin-polyfill-corejs3/package.json b/packages/babel-plugin-polyfill-corejs3/package.json index 238ce459..27e11260 100644 --- a/packages/babel-plugin-polyfill-corejs3/package.json +++ b/packages/babel-plugin-polyfill-corejs3/package.json @@ -27,7 +27,7 @@ ], "dependencies": { "@babel/helper-define-polyfill-provider": "workspace:^0.6.1", - "core-js-compat": "^3.36.1" + "core-js-compat": "^3.37.0" }, "devDependencies": { "@babel/core": "^7.22.6", @@ -39,8 +39,8 @@ "@babel/plugin-transform-modules-commonjs": "^7.22.5", "@babel/plugin-transform-runtime": "^7.22.15", "@babel/plugin-transform-spread": "^7.22.5", - "core-js": "^3.36.1", - "core-js-pure": "^3.36.1" + "core-js": "^3.37.0", + "core-js-pure": "^3.37.0" }, "peerDependencies": { "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" diff --git a/packages/babel-plugin-polyfill-corejs3/src/built-in-definitions.ts b/packages/babel-plugin-polyfill-corejs3/src/built-in-definitions.ts index 7287ae73..cb4b2557 100644 --- a/packages/babel-plugin-polyfill-corejs3/src/built-in-definitions.ts +++ b/packages/babel-plugin-polyfill-corejs3/src/built-in-definitions.ts @@ -130,29 +130,29 @@ const MapDependencies = [ 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.difference.v2", "esnext.set.every", "esnext.set.filter", "esnext.set.find", "esnext.set.intersection", - "esnext.set.intersection.v2", "esnext.set.is-disjoint-from", - "esnext.set.is-disjoint-from.v2", "esnext.set.is-subset-of", - "esnext.set.is-subset-of.v2", "esnext.set.is-superset-of", - "esnext.set.is-superset-of.v2", "esnext.set.join", "esnext.set.map", "esnext.set.reduce", "esnext.set.some", "esnext.set.symmetric-difference", - "esnext.set.symmetric-difference.v2", "esnext.set.union", - "esnext.set.union.v2", ...CommonIteratorsWithTag, ]; @@ -446,6 +446,10 @@ export const StaticProperties: ObjectMap2 = { sign: define("math/sign", ["es.math.sign"]), signbit: define("math/signbit", ["esnext.math.signbit"]), sinh: define("math/sinh", ["es.math.sinh"]), + sumPrecise: define("math/sum-precise", [ + "esnext.math.sum-precise", + "es.array.iterator", + ]), tanh: define("math/tanh", ["es.math.tanh"]), trunc: define("math/trunc", ["es.math.trunc"]), umulh: define("math/umulh", ["esnext.math.umulh"]), @@ -633,6 +637,9 @@ export const StaticProperties: ObjectMap2 = { asyncIterator: define("symbol/async-iterator", [ "es.symbol.async-iterator", ]), + customMatcher: define("symbol/custom-matcher", [ + "esnext.symbol.custom-matcher", + ]), dispose: define("symbol/dispose", [ "esnext.symbol.dispose", "esnext.iterator.dispose", @@ -704,6 +711,7 @@ export const StaticProperties: ObjectMap2 = { URL: { canParse: define("url/can-parse", ["web.url.can-parse", "web.url"]), + parse: define("url/parse", ["web.url.parse", "web.url"]), }, WeakMap: { diff --git a/packages/babel-plugin-polyfill-corejs3/src/shipped-proposals.ts b/packages/babel-plugin-polyfill-corejs3/src/shipped-proposals.ts index 50657529..9625f72e 100644 --- a/packages/babel-plugin-polyfill-corejs3/src/shipped-proposals.ts +++ b/packages/babel-plugin-polyfill-corejs3/src/shipped-proposals.ts @@ -21,13 +21,6 @@ export default new Set([ "esnext.json.is-raw-json", "esnext.json.parse", "esnext.json.raw-json", - "esnext.set.difference.v2", - "esnext.set.intersection.v2", - "esnext.set.is-disjoint-from.v2", - "esnext.set.is-subset-of.v2", - "esnext.set.is-superset-of.v2", - "esnext.set.symmetric-difference.v2", - "esnext.set.union.v2", "esnext.symbol.async-dispose", "esnext.symbol.dispose", "esnext.symbol.metadata", diff --git a/packages/babel-plugin-polyfill-corejs3/test/fixtures/entry-global/actual-chrome-107-corejs-3.37/input.mjs b/packages/babel-plugin-polyfill-corejs3/test/fixtures/entry-global/actual-chrome-107-corejs-3.37/input.mjs new file mode 100644 index 00000000..a3a9078c --- /dev/null +++ b/packages/babel-plugin-polyfill-corejs3/test/fixtures/entry-global/actual-chrome-107-corejs-3.37/input.mjs @@ -0,0 +1 @@ +import 'core-js/actual'; diff --git a/packages/babel-plugin-polyfill-corejs3/test/fixtures/entry-global/actual-chrome-107-corejs-3.37/options.json b/packages/babel-plugin-polyfill-corejs3/test/fixtures/entry-global/actual-chrome-107-corejs-3.37/options.json new file mode 100644 index 00000000..c2d45c07 --- /dev/null +++ b/packages/babel-plugin-polyfill-corejs3/test/fixtures/entry-global/actual-chrome-107-corejs-3.37/options.json @@ -0,0 +1,14 @@ +{ + "plugins": [ + [ + "@@/polyfill-corejs3", + { + "version": "3.37", + "method": "entry-global", + "targets": { + "chrome": 107 + } + } + ] + ] +} diff --git a/packages/babel-plugin-polyfill-corejs3/test/fixtures/entry-global/actual-chrome-107-corejs-3.37/output.mjs b/packages/babel-plugin-polyfill-corejs3/test/fixtures/entry-global/actual-chrome-107-corejs-3.37/output.mjs new file mode 100644 index 00000000..f75debd3 --- /dev/null +++ b/packages/babel-plugin-polyfill-corejs3/test/fixtures/entry-global/actual-chrome-107-corejs-3.37/output.mjs @@ -0,0 +1,84 @@ +import "core-js/modules/es.array.push.js"; +import "core-js/modules/es.array.to-reversed.js"; +import "core-js/modules/es.array.to-sorted.js"; +import "core-js/modules/es.array.to-spliced.js"; +import "core-js/modules/es.array.with.js"; +import "core-js/modules/es.array-buffer.detached.js"; +import "core-js/modules/es.array-buffer.transfer.js"; +import "core-js/modules/es.array-buffer.transfer-to-fixed-length.js"; +import "core-js/modules/es.map.group-by.js"; +import "core-js/modules/es.object.group-by.js"; +import "core-js/modules/es.promise.with-resolvers.js"; +import "core-js/modules/es.regexp.flags.js"; +import "core-js/modules/es.set.difference.v2.js"; +import "core-js/modules/es.set.intersection.v2.js"; +import "core-js/modules/es.set.is-disjoint-from.v2.js"; +import "core-js/modules/es.set.is-subset-of.v2.js"; +import "core-js/modules/es.set.is-superset-of.v2.js"; +import "core-js/modules/es.set.symmetric-difference.v2.js"; +import "core-js/modules/es.set.union.v2.js"; +import "core-js/modules/es.string.is-well-formed.js"; +import "core-js/modules/es.string.to-well-formed.js"; +import "core-js/modules/es.typed-array.to-reversed.js"; +import "core-js/modules/es.typed-array.to-sorted.js"; +import "core-js/modules/es.typed-array.with.js"; +import "core-js/modules/esnext.suppressed-error.constructor.js"; +import "core-js/modules/esnext.array.from-async.js"; +import "core-js/modules/esnext.array.group.js"; +import "core-js/modules/esnext.array.group-by.js"; +import "core-js/modules/esnext.array.group-by-to-map.js"; +import "core-js/modules/esnext.array.group-to-map.js"; +import "core-js/modules/esnext.async-disposable-stack.constructor.js"; +import "core-js/modules/esnext.async-iterator.constructor.js"; +import "core-js/modules/esnext.async-iterator.async-dispose.js"; +import "core-js/modules/esnext.async-iterator.drop.js"; +import "core-js/modules/esnext.async-iterator.every.js"; +import "core-js/modules/esnext.async-iterator.filter.js"; +import "core-js/modules/esnext.async-iterator.find.js"; +import "core-js/modules/esnext.async-iterator.flat-map.js"; +import "core-js/modules/esnext.async-iterator.for-each.js"; +import "core-js/modules/esnext.async-iterator.from.js"; +import "core-js/modules/esnext.async-iterator.map.js"; +import "core-js/modules/esnext.async-iterator.reduce.js"; +import "core-js/modules/esnext.async-iterator.some.js"; +import "core-js/modules/esnext.async-iterator.take.js"; +import "core-js/modules/esnext.async-iterator.to-array.js"; +import "core-js/modules/esnext.data-view.get-float16.js"; +import "core-js/modules/esnext.data-view.set-float16.js"; +import "core-js/modules/esnext.disposable-stack.constructor.js"; +import "core-js/modules/esnext.function.metadata.js"; +import "core-js/modules/esnext.iterator.constructor.js"; +import "core-js/modules/esnext.iterator.dispose.js"; +import "core-js/modules/esnext.iterator.drop.js"; +import "core-js/modules/esnext.iterator.every.js"; +import "core-js/modules/esnext.iterator.filter.js"; +import "core-js/modules/esnext.iterator.find.js"; +import "core-js/modules/esnext.iterator.flat-map.js"; +import "core-js/modules/esnext.iterator.for-each.js"; +import "core-js/modules/esnext.iterator.from.js"; +import "core-js/modules/esnext.iterator.map.js"; +import "core-js/modules/esnext.iterator.reduce.js"; +import "core-js/modules/esnext.iterator.some.js"; +import "core-js/modules/esnext.iterator.take.js"; +import "core-js/modules/esnext.iterator.to-array.js"; +import "core-js/modules/esnext.iterator.to-async.js"; +import "core-js/modules/esnext.json.is-raw-json.js"; +import "core-js/modules/esnext.json.parse.js"; +import "core-js/modules/esnext.json.raw-json.js"; +import "core-js/modules/esnext.math.f16round.js"; +import "core-js/modules/esnext.symbol.async-dispose.js"; +import "core-js/modules/esnext.symbol.dispose.js"; +import "core-js/modules/esnext.symbol.metadata.js"; +import "core-js/modules/esnext.typed-array.to-spliced.js"; +import "core-js/modules/esnext.uint8-array.from-base64.js"; +import "core-js/modules/esnext.uint8-array.from-hex.js"; +import "core-js/modules/esnext.uint8-array.to-base64.js"; +import "core-js/modules/esnext.uint8-array.to-hex.js"; +import "core-js/modules/web.dom-exception.stack.js"; +import "core-js/modules/web.immediate.js"; +import "core-js/modules/web.structured-clone.js"; +import "core-js/modules/web.url.can-parse.js"; +import "core-js/modules/web.url.parse.js"; +import "core-js/modules/web.url-search-params.delete.js"; +import "core-js/modules/web.url-search-params.has.js"; +import "core-js/modules/web.url-search-params.size.js"; diff --git a/packages/babel-plugin-polyfill-corejs3/test/fixtures/entry-global/actual-corejs-3.37/input.mjs b/packages/babel-plugin-polyfill-corejs3/test/fixtures/entry-global/actual-corejs-3.37/input.mjs new file mode 100644 index 00000000..a3a9078c --- /dev/null +++ b/packages/babel-plugin-polyfill-corejs3/test/fixtures/entry-global/actual-corejs-3.37/input.mjs @@ -0,0 +1 @@ +import 'core-js/actual'; diff --git a/packages/babel-plugin-polyfill-corejs3/test/fixtures/entry-global/actual-corejs-3.37/options.json b/packages/babel-plugin-polyfill-corejs3/test/fixtures/entry-global/actual-corejs-3.37/options.json new file mode 100644 index 00000000..ab743284 --- /dev/null +++ b/packages/babel-plugin-polyfill-corejs3/test/fixtures/entry-global/actual-corejs-3.37/options.json @@ -0,0 +1,11 @@ +{ + "plugins": [ + [ + "@@/polyfill-corejs3", + { + "version": "3.37", + "method": "entry-global" + } + ] + ] +} diff --git a/packages/babel-plugin-polyfill-corejs3/test/fixtures/entry-global/actual-corejs-3.37/output.mjs b/packages/babel-plugin-polyfill-corejs3/test/fixtures/entry-global/actual-corejs-3.37/output.mjs new file mode 100644 index 00000000..ed8bbd16 --- /dev/null +++ b/packages/babel-plugin-polyfill-corejs3/test/fixtures/entry-global/actual-corejs-3.37/output.mjs @@ -0,0 +1,327 @@ +import "core-js/modules/es.symbol.js"; +import "core-js/modules/es.symbol.description.js"; +import "core-js/modules/es.symbol.async-iterator.js"; +import "core-js/modules/es.symbol.has-instance.js"; +import "core-js/modules/es.symbol.is-concat-spreadable.js"; +import "core-js/modules/es.symbol.iterator.js"; +import "core-js/modules/es.symbol.match.js"; +import "core-js/modules/es.symbol.match-all.js"; +import "core-js/modules/es.symbol.replace.js"; +import "core-js/modules/es.symbol.search.js"; +import "core-js/modules/es.symbol.species.js"; +import "core-js/modules/es.symbol.split.js"; +import "core-js/modules/es.symbol.to-primitive.js"; +import "core-js/modules/es.symbol.to-string-tag.js"; +import "core-js/modules/es.symbol.unscopables.js"; +import "core-js/modules/es.error.cause.js"; +import "core-js/modules/es.error.to-string.js"; +import "core-js/modules/es.aggregate-error.js"; +import "core-js/modules/es.aggregate-error.cause.js"; +import "core-js/modules/es.array.at.js"; +import "core-js/modules/es.array.concat.js"; +import "core-js/modules/es.array.copy-within.js"; +import "core-js/modules/es.array.every.js"; +import "core-js/modules/es.array.fill.js"; +import "core-js/modules/es.array.filter.js"; +import "core-js/modules/es.array.find.js"; +import "core-js/modules/es.array.find-index.js"; +import "core-js/modules/es.array.find-last.js"; +import "core-js/modules/es.array.find-last-index.js"; +import "core-js/modules/es.array.flat.js"; +import "core-js/modules/es.array.flat-map.js"; +import "core-js/modules/es.array.for-each.js"; +import "core-js/modules/es.array.from.js"; +import "core-js/modules/es.array.includes.js"; +import "core-js/modules/es.array.index-of.js"; +import "core-js/modules/es.array.is-array.js"; +import "core-js/modules/es.array.iterator.js"; +import "core-js/modules/es.array.join.js"; +import "core-js/modules/es.array.last-index-of.js"; +import "core-js/modules/es.array.map.js"; +import "core-js/modules/es.array.of.js"; +import "core-js/modules/es.array.push.js"; +import "core-js/modules/es.array.reduce.js"; +import "core-js/modules/es.array.reduce-right.js"; +import "core-js/modules/es.array.reverse.js"; +import "core-js/modules/es.array.slice.js"; +import "core-js/modules/es.array.some.js"; +import "core-js/modules/es.array.sort.js"; +import "core-js/modules/es.array.species.js"; +import "core-js/modules/es.array.splice.js"; +import "core-js/modules/es.array.to-reversed.js"; +import "core-js/modules/es.array.to-sorted.js"; +import "core-js/modules/es.array.to-spliced.js"; +import "core-js/modules/es.array.unscopables.flat.js"; +import "core-js/modules/es.array.unscopables.flat-map.js"; +import "core-js/modules/es.array.unshift.js"; +import "core-js/modules/es.array.with.js"; +import "core-js/modules/es.array-buffer.constructor.js"; +import "core-js/modules/es.array-buffer.is-view.js"; +import "core-js/modules/es.array-buffer.slice.js"; +import "core-js/modules/es.data-view.js"; +import "core-js/modules/es.array-buffer.detached.js"; +import "core-js/modules/es.array-buffer.transfer.js"; +import "core-js/modules/es.array-buffer.transfer-to-fixed-length.js"; +import "core-js/modules/es.date.get-year.js"; +import "core-js/modules/es.date.now.js"; +import "core-js/modules/es.date.set-year.js"; +import "core-js/modules/es.date.to-gmt-string.js"; +import "core-js/modules/es.date.to-iso-string.js"; +import "core-js/modules/es.date.to-json.js"; +import "core-js/modules/es.date.to-primitive.js"; +import "core-js/modules/es.date.to-string.js"; +import "core-js/modules/es.escape.js"; +import "core-js/modules/es.function.bind.js"; +import "core-js/modules/es.function.has-instance.js"; +import "core-js/modules/es.function.name.js"; +import "core-js/modules/es.global-this.js"; +import "core-js/modules/es.json.stringify.js"; +import "core-js/modules/es.json.to-string-tag.js"; +import "core-js/modules/es.map.js"; +import "core-js/modules/es.map.group-by.js"; +import "core-js/modules/es.math.acosh.js"; +import "core-js/modules/es.math.asinh.js"; +import "core-js/modules/es.math.atanh.js"; +import "core-js/modules/es.math.cbrt.js"; +import "core-js/modules/es.math.clz32.js"; +import "core-js/modules/es.math.cosh.js"; +import "core-js/modules/es.math.expm1.js"; +import "core-js/modules/es.math.fround.js"; +import "core-js/modules/es.math.hypot.js"; +import "core-js/modules/es.math.imul.js"; +import "core-js/modules/es.math.log10.js"; +import "core-js/modules/es.math.log1p.js"; +import "core-js/modules/es.math.log2.js"; +import "core-js/modules/es.math.sign.js"; +import "core-js/modules/es.math.sinh.js"; +import "core-js/modules/es.math.tanh.js"; +import "core-js/modules/es.math.to-string-tag.js"; +import "core-js/modules/es.math.trunc.js"; +import "core-js/modules/es.number.constructor.js"; +import "core-js/modules/es.number.epsilon.js"; +import "core-js/modules/es.number.is-finite.js"; +import "core-js/modules/es.number.is-integer.js"; +import "core-js/modules/es.number.is-nan.js"; +import "core-js/modules/es.number.is-safe-integer.js"; +import "core-js/modules/es.number.max-safe-integer.js"; +import "core-js/modules/es.number.min-safe-integer.js"; +import "core-js/modules/es.number.parse-float.js"; +import "core-js/modules/es.number.parse-int.js"; +import "core-js/modules/es.number.to-exponential.js"; +import "core-js/modules/es.number.to-fixed.js"; +import "core-js/modules/es.number.to-precision.js"; +import "core-js/modules/es.object.assign.js"; +import "core-js/modules/es.object.create.js"; +import "core-js/modules/es.object.define-getter.js"; +import "core-js/modules/es.object.define-properties.js"; +import "core-js/modules/es.object.define-property.js"; +import "core-js/modules/es.object.define-setter.js"; +import "core-js/modules/es.object.entries.js"; +import "core-js/modules/es.object.freeze.js"; +import "core-js/modules/es.object.from-entries.js"; +import "core-js/modules/es.object.get-own-property-descriptor.js"; +import "core-js/modules/es.object.get-own-property-descriptors.js"; +import "core-js/modules/es.object.get-own-property-names.js"; +import "core-js/modules/es.object.get-prototype-of.js"; +import "core-js/modules/es.object.group-by.js"; +import "core-js/modules/es.object.has-own.js"; +import "core-js/modules/es.object.is.js"; +import "core-js/modules/es.object.is-extensible.js"; +import "core-js/modules/es.object.is-frozen.js"; +import "core-js/modules/es.object.is-sealed.js"; +import "core-js/modules/es.object.keys.js"; +import "core-js/modules/es.object.lookup-getter.js"; +import "core-js/modules/es.object.lookup-setter.js"; +import "core-js/modules/es.object.prevent-extensions.js"; +import "core-js/modules/es.object.proto.js"; +import "core-js/modules/es.object.seal.js"; +import "core-js/modules/es.object.set-prototype-of.js"; +import "core-js/modules/es.object.to-string.js"; +import "core-js/modules/es.object.values.js"; +import "core-js/modules/es.parse-float.js"; +import "core-js/modules/es.parse-int.js"; +import "core-js/modules/es.promise.js"; +import "core-js/modules/es.promise.all-settled.js"; +import "core-js/modules/es.promise.any.js"; +import "core-js/modules/es.promise.finally.js"; +import "core-js/modules/es.promise.with-resolvers.js"; +import "core-js/modules/es.reflect.apply.js"; +import "core-js/modules/es.reflect.construct.js"; +import "core-js/modules/es.reflect.define-property.js"; +import "core-js/modules/es.reflect.delete-property.js"; +import "core-js/modules/es.reflect.get.js"; +import "core-js/modules/es.reflect.get-own-property-descriptor.js"; +import "core-js/modules/es.reflect.get-prototype-of.js"; +import "core-js/modules/es.reflect.has.js"; +import "core-js/modules/es.reflect.is-extensible.js"; +import "core-js/modules/es.reflect.own-keys.js"; +import "core-js/modules/es.reflect.prevent-extensions.js"; +import "core-js/modules/es.reflect.set.js"; +import "core-js/modules/es.reflect.set-prototype-of.js"; +import "core-js/modules/es.reflect.to-string-tag.js"; +import "core-js/modules/es.regexp.constructor.js"; +import "core-js/modules/es.regexp.dot-all.js"; +import "core-js/modules/es.regexp.exec.js"; +import "core-js/modules/es.regexp.flags.js"; +import "core-js/modules/es.regexp.sticky.js"; +import "core-js/modules/es.regexp.test.js"; +import "core-js/modules/es.regexp.to-string.js"; +import "core-js/modules/es.set.js"; +import "core-js/modules/es.set.difference.v2.js"; +import "core-js/modules/es.set.intersection.v2.js"; +import "core-js/modules/es.set.is-disjoint-from.v2.js"; +import "core-js/modules/es.set.is-subset-of.v2.js"; +import "core-js/modules/es.set.is-superset-of.v2.js"; +import "core-js/modules/es.set.symmetric-difference.v2.js"; +import "core-js/modules/es.set.union.v2.js"; +import "core-js/modules/es.string.at-alternative.js"; +import "core-js/modules/es.string.code-point-at.js"; +import "core-js/modules/es.string.ends-with.js"; +import "core-js/modules/es.string.from-code-point.js"; +import "core-js/modules/es.string.includes.js"; +import "core-js/modules/es.string.is-well-formed.js"; +import "core-js/modules/es.string.iterator.js"; +import "core-js/modules/es.string.match.js"; +import "core-js/modules/es.string.match-all.js"; +import "core-js/modules/es.string.pad-end.js"; +import "core-js/modules/es.string.pad-start.js"; +import "core-js/modules/es.string.raw.js"; +import "core-js/modules/es.string.repeat.js"; +import "core-js/modules/es.string.replace.js"; +import "core-js/modules/es.string.replace-all.js"; +import "core-js/modules/es.string.search.js"; +import "core-js/modules/es.string.split.js"; +import "core-js/modules/es.string.starts-with.js"; +import "core-js/modules/es.string.substr.js"; +import "core-js/modules/es.string.to-well-formed.js"; +import "core-js/modules/es.string.trim.js"; +import "core-js/modules/es.string.trim-end.js"; +import "core-js/modules/es.string.trim-start.js"; +import "core-js/modules/es.string.anchor.js"; +import "core-js/modules/es.string.big.js"; +import "core-js/modules/es.string.blink.js"; +import "core-js/modules/es.string.bold.js"; +import "core-js/modules/es.string.fixed.js"; +import "core-js/modules/es.string.fontcolor.js"; +import "core-js/modules/es.string.fontsize.js"; +import "core-js/modules/es.string.italics.js"; +import "core-js/modules/es.string.link.js"; +import "core-js/modules/es.string.small.js"; +import "core-js/modules/es.string.strike.js"; +import "core-js/modules/es.string.sub.js"; +import "core-js/modules/es.string.sup.js"; +import "core-js/modules/es.typed-array.float32-array.js"; +import "core-js/modules/es.typed-array.float64-array.js"; +import "core-js/modules/es.typed-array.int8-array.js"; +import "core-js/modules/es.typed-array.int16-array.js"; +import "core-js/modules/es.typed-array.int32-array.js"; +import "core-js/modules/es.typed-array.uint8-array.js"; +import "core-js/modules/es.typed-array.uint8-clamped-array.js"; +import "core-js/modules/es.typed-array.uint16-array.js"; +import "core-js/modules/es.typed-array.uint32-array.js"; +import "core-js/modules/es.typed-array.at.js"; +import "core-js/modules/es.typed-array.copy-within.js"; +import "core-js/modules/es.typed-array.every.js"; +import "core-js/modules/es.typed-array.fill.js"; +import "core-js/modules/es.typed-array.filter.js"; +import "core-js/modules/es.typed-array.find.js"; +import "core-js/modules/es.typed-array.find-index.js"; +import "core-js/modules/es.typed-array.find-last.js"; +import "core-js/modules/es.typed-array.find-last-index.js"; +import "core-js/modules/es.typed-array.for-each.js"; +import "core-js/modules/es.typed-array.from.js"; +import "core-js/modules/es.typed-array.includes.js"; +import "core-js/modules/es.typed-array.index-of.js"; +import "core-js/modules/es.typed-array.iterator.js"; +import "core-js/modules/es.typed-array.join.js"; +import "core-js/modules/es.typed-array.last-index-of.js"; +import "core-js/modules/es.typed-array.map.js"; +import "core-js/modules/es.typed-array.of.js"; +import "core-js/modules/es.typed-array.reduce.js"; +import "core-js/modules/es.typed-array.reduce-right.js"; +import "core-js/modules/es.typed-array.reverse.js"; +import "core-js/modules/es.typed-array.set.js"; +import "core-js/modules/es.typed-array.slice.js"; +import "core-js/modules/es.typed-array.some.js"; +import "core-js/modules/es.typed-array.sort.js"; +import "core-js/modules/es.typed-array.subarray.js"; +import "core-js/modules/es.typed-array.to-locale-string.js"; +import "core-js/modules/es.typed-array.to-reversed.js"; +import "core-js/modules/es.typed-array.to-sorted.js"; +import "core-js/modules/es.typed-array.to-string.js"; +import "core-js/modules/es.typed-array.with.js"; +import "core-js/modules/es.unescape.js"; +import "core-js/modules/es.weak-map.js"; +import "core-js/modules/es.weak-set.js"; +import "core-js/modules/esnext.suppressed-error.constructor.js"; +import "core-js/modules/esnext.array.from-async.js"; +import "core-js/modules/esnext.array.group.js"; +import "core-js/modules/esnext.array.group-by.js"; +import "core-js/modules/esnext.array.group-by-to-map.js"; +import "core-js/modules/esnext.array.group-to-map.js"; +import "core-js/modules/esnext.async-disposable-stack.constructor.js"; +import "core-js/modules/esnext.async-iterator.constructor.js"; +import "core-js/modules/esnext.async-iterator.async-dispose.js"; +import "core-js/modules/esnext.async-iterator.drop.js"; +import "core-js/modules/esnext.async-iterator.every.js"; +import "core-js/modules/esnext.async-iterator.filter.js"; +import "core-js/modules/esnext.async-iterator.find.js"; +import "core-js/modules/esnext.async-iterator.flat-map.js"; +import "core-js/modules/esnext.async-iterator.for-each.js"; +import "core-js/modules/esnext.async-iterator.from.js"; +import "core-js/modules/esnext.async-iterator.map.js"; +import "core-js/modules/esnext.async-iterator.reduce.js"; +import "core-js/modules/esnext.async-iterator.some.js"; +import "core-js/modules/esnext.async-iterator.take.js"; +import "core-js/modules/esnext.async-iterator.to-array.js"; +import "core-js/modules/esnext.data-view.get-float16.js"; +import "core-js/modules/esnext.data-view.set-float16.js"; +import "core-js/modules/esnext.disposable-stack.constructor.js"; +import "core-js/modules/esnext.function.metadata.js"; +import "core-js/modules/esnext.iterator.constructor.js"; +import "core-js/modules/esnext.iterator.dispose.js"; +import "core-js/modules/esnext.iterator.drop.js"; +import "core-js/modules/esnext.iterator.every.js"; +import "core-js/modules/esnext.iterator.filter.js"; +import "core-js/modules/esnext.iterator.find.js"; +import "core-js/modules/esnext.iterator.flat-map.js"; +import "core-js/modules/esnext.iterator.for-each.js"; +import "core-js/modules/esnext.iterator.from.js"; +import "core-js/modules/esnext.iterator.map.js"; +import "core-js/modules/esnext.iterator.reduce.js"; +import "core-js/modules/esnext.iterator.some.js"; +import "core-js/modules/esnext.iterator.take.js"; +import "core-js/modules/esnext.iterator.to-array.js"; +import "core-js/modules/esnext.iterator.to-async.js"; +import "core-js/modules/esnext.json.is-raw-json.js"; +import "core-js/modules/esnext.json.parse.js"; +import "core-js/modules/esnext.json.raw-json.js"; +import "core-js/modules/esnext.math.f16round.js"; +import "core-js/modules/esnext.symbol.async-dispose.js"; +import "core-js/modules/esnext.symbol.dispose.js"; +import "core-js/modules/esnext.symbol.metadata.js"; +import "core-js/modules/esnext.typed-array.to-spliced.js"; +import "core-js/modules/esnext.uint8-array.from-base64.js"; +import "core-js/modules/esnext.uint8-array.from-hex.js"; +import "core-js/modules/esnext.uint8-array.to-base64.js"; +import "core-js/modules/esnext.uint8-array.to-hex.js"; +import "core-js/modules/web.atob.js"; +import "core-js/modules/web.btoa.js"; +import "core-js/modules/web.dom-collections.for-each.js"; +import "core-js/modules/web.dom-collections.iterator.js"; +import "core-js/modules/web.dom-exception.constructor.js"; +import "core-js/modules/web.dom-exception.stack.js"; +import "core-js/modules/web.dom-exception.to-string-tag.js"; +import "core-js/modules/web.immediate.js"; +import "core-js/modules/web.queue-microtask.js"; +import "core-js/modules/web.self.js"; +import "core-js/modules/web.structured-clone.js"; +import "core-js/modules/web.timers.js"; +import "core-js/modules/web.url.js"; +import "core-js/modules/web.url.can-parse.js"; +import "core-js/modules/web.url.parse.js"; +import "core-js/modules/web.url.to-json.js"; +import "core-js/modules/web.url-search-params.js"; +import "core-js/modules/web.url-search-params.delete.js"; +import "core-js/modules/web.url-search-params.has.js"; +import "core-js/modules/web.url-search-params.size.js"; diff --git a/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-corejs-3.28/output.mjs b/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-corejs-3.28/output.mjs index 78e1d2e9..a42605c2 100644 --- a/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-corejs-3.28/output.mjs +++ b/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-corejs-3.28/output.mjs @@ -27,6 +27,13 @@ import "core-js/modules/es.string.match-all.js"; import "core-js/modules/es.string.replace.js"; import "core-js/modules/es.string.replace-all.js"; import "core-js/modules/es.weak-map.js"; +import "core-js/modules/esnext.set.difference.v2.js"; +import "core-js/modules/esnext.set.intersection.v2.js"; +import "core-js/modules/esnext.set.is-disjoint-from.v2.js"; +import "core-js/modules/esnext.set.is-subset-of.v2.js"; +import "core-js/modules/esnext.set.is-superset-of.v2.js"; +import "core-js/modules/esnext.set.symmetric-difference.v2.js"; +import "core-js/modules/esnext.set.union.v2.js"; import "core-js/modules/esnext.string.is-well-formed.js"; import "core-js/modules/esnext.string.to-well-formed.js"; import "core-js/modules/web.btoa.js"; diff --git a/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-corejs-3.29/output.mjs b/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-corejs-3.29/output.mjs index 44e832fc..5ad34ce7 100644 --- a/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-corejs-3.29/output.mjs +++ b/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-corejs-3.29/output.mjs @@ -27,6 +27,13 @@ import "core-js/modules/es.string.match-all.js"; import "core-js/modules/es.string.replace.js"; import "core-js/modules/es.string.replace-all.js"; import "core-js/modules/es.weak-map.js"; +import "core-js/modules/esnext.set.difference.v2.js"; +import "core-js/modules/esnext.set.intersection.v2.js"; +import "core-js/modules/esnext.set.is-disjoint-from.v2.js"; +import "core-js/modules/esnext.set.is-subset-of.v2.js"; +import "core-js/modules/esnext.set.is-superset-of.v2.js"; +import "core-js/modules/esnext.set.symmetric-difference.v2.js"; +import "core-js/modules/esnext.set.union.v2.js"; import "core-js/modules/esnext.string.is-well-formed.js"; import "core-js/modules/esnext.string.to-well-formed.js"; import "core-js/modules/web.btoa.js"; diff --git a/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-corejs-3.30/output.mjs b/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-corejs-3.30/output.mjs index caa27028..d99ddae3 100644 --- a/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-corejs-3.30/output.mjs +++ b/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-corejs-3.30/output.mjs @@ -28,6 +28,13 @@ import "core-js/modules/es.string.replace.js"; import "core-js/modules/es.string.replace-all.js"; import "core-js/modules/es.weak-map.js"; import "core-js/modules/esnext.map.group-by.js"; +import "core-js/modules/esnext.set.difference.v2.js"; +import "core-js/modules/esnext.set.intersection.v2.js"; +import "core-js/modules/esnext.set.is-disjoint-from.v2.js"; +import "core-js/modules/esnext.set.is-subset-of.v2.js"; +import "core-js/modules/esnext.set.is-superset-of.v2.js"; +import "core-js/modules/esnext.set.symmetric-difference.v2.js"; +import "core-js/modules/esnext.set.union.v2.js"; import "core-js/modules/esnext.string.is-well-formed.js"; import "core-js/modules/esnext.string.to-well-formed.js"; import "core-js/modules/web.btoa.js"; diff --git a/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-corejs-3.31/output.mjs b/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-corejs-3.31/output.mjs index 784aeba8..dc62640c 100644 --- a/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-corejs-3.31/output.mjs +++ b/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-corejs-3.31/output.mjs @@ -38,6 +38,13 @@ import "core-js/modules/esnext.array-buffer.transfer-to-fixed-length.js"; import "core-js/modules/esnext.map.group-by.js"; import "core-js/modules/esnext.object.group-by.js"; import "core-js/modules/esnext.promise.with-resolvers.js"; +import "core-js/modules/esnext.set.difference.v2.js"; +import "core-js/modules/esnext.set.intersection.v2.js"; +import "core-js/modules/esnext.set.is-disjoint-from.v2.js"; +import "core-js/modules/esnext.set.is-subset-of.v2.js"; +import "core-js/modules/esnext.set.is-superset-of.v2.js"; +import "core-js/modules/esnext.set.symmetric-difference.v2.js"; +import "core-js/modules/esnext.set.union.v2.js"; import "core-js/modules/web.btoa.js"; import "core-js/modules/web.dom-collections.for-each.js"; import "core-js/modules/web.dom-collections.iterator.js"; diff --git a/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-corejs-3.32/output.mjs b/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-corejs-3.32/output.mjs index c9da64ce..b8d14ab0 100644 --- a/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-corejs-3.32/output.mjs +++ b/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-corejs-3.32/output.mjs @@ -38,6 +38,13 @@ import "core-js/modules/esnext.array-buffer.transfer-to-fixed-length.js"; import "core-js/modules/esnext.map.group-by.js"; import "core-js/modules/esnext.object.group-by.js"; import "core-js/modules/esnext.promise.with-resolvers.js"; +import "core-js/modules/esnext.set.difference.v2.js"; +import "core-js/modules/esnext.set.intersection.v2.js"; +import "core-js/modules/esnext.set.is-disjoint-from.v2.js"; +import "core-js/modules/esnext.set.is-subset-of.v2.js"; +import "core-js/modules/esnext.set.is-superset-of.v2.js"; +import "core-js/modules/esnext.set.symmetric-difference.v2.js"; +import "core-js/modules/esnext.set.union.v2.js"; import "core-js/modules/web.btoa.js"; import "core-js/modules/web.dom-collections.for-each.js"; import "core-js/modules/web.dom-collections.iterator.js"; diff --git a/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-corejs-3.33/output.mjs b/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-corejs-3.33/output.mjs index 696657be..fbb71ed3 100644 --- a/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-corejs-3.33/output.mjs +++ b/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-corejs-3.33/output.mjs @@ -68,6 +68,13 @@ import "core-js/modules/esnext.array-buffer.transfer-to-fixed-length.js"; import "core-js/modules/esnext.map.group-by.js"; import "core-js/modules/esnext.object.group-by.js"; import "core-js/modules/esnext.promise.with-resolvers.js"; +import "core-js/modules/esnext.set.difference.v2.js"; +import "core-js/modules/esnext.set.intersection.v2.js"; +import "core-js/modules/esnext.set.is-disjoint-from.v2.js"; +import "core-js/modules/esnext.set.is-subset-of.v2.js"; +import "core-js/modules/esnext.set.is-superset-of.v2.js"; +import "core-js/modules/esnext.set.symmetric-difference.v2.js"; +import "core-js/modules/esnext.set.union.v2.js"; import "core-js/modules/web.btoa.js"; import "core-js/modules/web.dom-collections.for-each.js"; import "core-js/modules/web.dom-collections.iterator.js"; diff --git a/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-corejs-3.34/output.mjs b/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-corejs-3.34/output.mjs index b74a6f18..1bfd49b7 100644 --- a/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-corejs-3.34/output.mjs +++ b/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-corejs-3.34/output.mjs @@ -68,6 +68,13 @@ import "core-js/modules/es.weak-map.js"; import "core-js/modules/esnext.array-buffer.detached.js"; import "core-js/modules/esnext.array-buffer.transfer.js"; import "core-js/modules/esnext.array-buffer.transfer-to-fixed-length.js"; +import "core-js/modules/esnext.set.difference.v2.js"; +import "core-js/modules/esnext.set.intersection.v2.js"; +import "core-js/modules/esnext.set.is-disjoint-from.v2.js"; +import "core-js/modules/esnext.set.is-subset-of.v2.js"; +import "core-js/modules/esnext.set.is-superset-of.v2.js"; +import "core-js/modules/esnext.set.symmetric-difference.v2.js"; +import "core-js/modules/esnext.set.union.v2.js"; import "core-js/modules/web.btoa.js"; import "core-js/modules/web.dom-collections.for-each.js"; import "core-js/modules/web.dom-collections.iterator.js"; diff --git a/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-corejs-3.36/input.mjs b/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-corejs-3.36/input.mjs index 6e850d76..552fa8de 100644 --- a/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-corejs-3.36/input.mjs +++ b/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-corejs-3.36/input.mjs @@ -96,3 +96,7 @@ Uint8Array.fromBase64(string); Uint8Array.fromHex(string); new Uint8Array(foo).toBase64(); new Uint8Array(foo).toHex(); + +URL.parse(x); +Math.sumPrecise(x); +Symbol.customMatcher; diff --git a/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-corejs-3.36/output.mjs b/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-corejs-3.36/output.mjs index dcf80a84..4a841161 100644 --- a/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-corejs-3.36/output.mjs +++ b/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-corejs-3.36/output.mjs @@ -68,6 +68,13 @@ import "core-js/modules/es.typed-array.to-sorted.js"; import "core-js/modules/es.typed-array.to-string.js"; import "core-js/modules/es.typed-array.with.js"; import "core-js/modules/es.weak-map.js"; +import "core-js/modules/esnext.set.difference.v2.js"; +import "core-js/modules/esnext.set.intersection.v2.js"; +import "core-js/modules/esnext.set.is-disjoint-from.v2.js"; +import "core-js/modules/esnext.set.is-subset-of.v2.js"; +import "core-js/modules/esnext.set.is-superset-of.v2.js"; +import "core-js/modules/esnext.set.symmetric-difference.v2.js"; +import "core-js/modules/esnext.set.union.v2.js"; import "core-js/modules/web.btoa.js"; import "core-js/modules/web.dom-collections.for-each.js"; import "core-js/modules/web.dom-collections.iterator.js"; @@ -153,3 +160,6 @@ Uint8Array.fromBase64(string); Uint8Array.fromHex(string); new Uint8Array(foo).toBase64(); new Uint8Array(foo).toHex(); +URL.parse(x); +Math.sumPrecise(x); +Symbol.customMatcher; diff --git a/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-corejs-3.37/input.mjs b/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-corejs-3.37/input.mjs new file mode 100644 index 00000000..552fa8de --- /dev/null +++ b/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-corejs-3.37/input.mjs @@ -0,0 +1,102 @@ +[].findLast(fn); +[].findLastIndex(fn); + +[].asIndexedPairs(); + +Iterator.from({ + next: () => ({ done: Math.random() > .9, value: Math.random() * 10 | 0 }) + }).forEach(console.log).toArray(); + +AsyncIterator.from([1, 2, 3, 4, 5, 6, 7]) + .drop(1) + .take(5) + .filter(it => it % 2) + .groupBy(it => id % 4) + .map(it => it ** 2) + .toArray() + .then(console.log); + +[1, 2, 3, 4, 5, 6, 7, 7].uniqueBy(x => x).groupBy(x => x % 2); + +Number.range(1, 2); +BigInt.range(1n, 2n); + +Array.isTemplateObject((x => x)`a${ x }z`) + +new Map([['x', 1]]).emplace('x', { update: x => x + 1, insert: () => 0}); + +/x/.dotAll; +/x/.sticky + +Symbol.asyncDispose +Symbol.matcher +Symbol.matchAll +Symbol.metadata +Symbol.replaceAll + +new URL(url); + +const foo = [1, 2, 3].groupByToMap(bar); + +const push = [].push.unThis(); + +Function.isConstructor; + +throw new DOMException(); + +structuredClone(72); + +btoa('hi'); + +foo.indexed; +bar.with; +buz.push; +fuz.__proto__; + +string.isWellFormed; +string.toWellFormed; + +String.dedent`42`; + +self; +SuppressedError +DisposableStack; +AsyncDisposableStack; + +Iterator.range(foo, bar); +JSON.parse(foo); +JSON.isRawJSON(foo); +JSON.rawJSON(foo); +Symbol.isWellKnown(foo); +Symbol.isRegistered(foo); +Function.demethodize(); + +new URLSearchParams(string).size; +new Set(array).intersection(otherSet); + +URL.canParse(foo); + +Symbol.isWellKnownSymbol(foo); +Symbol.isRegisteredSymbol(foo); +Symbol.metadata; +Object.groupBy(a, b); +Map.groupBy(a, b); +Promise.withResolvers(); +new URLSearchParams().has(a, b); + +Math.f16round(foo); +foo.getFloat16(0); +foo.setFloat16(0, 1); +foo.getUint8Clamped(0); +foo.setUint8Clamped(0, 1); + +RegExp.escape(foo); + +Uint8Array.fromBase64(string); +Uint8Array.fromHex(string); +new Uint8Array(foo).toBase64(); +new Uint8Array(foo).toHex(); + +URL.parse(x); +Math.sumPrecise(x); +Symbol.customMatcher; diff --git a/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-corejs-3.37/options.json b/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-corejs-3.37/options.json new file mode 100644 index 00000000..20986f1d --- /dev/null +++ b/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-corejs-3.37/options.json @@ -0,0 +1,11 @@ +{ + "plugins": [ + [ + "@@/polyfill-corejs3", + { + "version": "3.37", + "method": "usage-global" + } + ] + ] +} diff --git a/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-corejs-3.37/output.mjs b/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-corejs-3.37/output.mjs new file mode 100644 index 00000000..6ddff8b7 --- /dev/null +++ b/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-corejs-3.37/output.mjs @@ -0,0 +1,166 @@ +import "core-js/modules/es.symbol.js"; +import "core-js/modules/es.symbol.match-all.js"; +import "core-js/modules/es.error.cause.js"; +import "core-js/modules/es.error.to-string.js"; +import "core-js/modules/es.array.filter.js"; +import "core-js/modules/es.array.find-last.js"; +import "core-js/modules/es.array.find-last-index.js"; +import "core-js/modules/es.array.for-each.js"; +import "core-js/modules/es.array.iterator.js"; +import "core-js/modules/es.array.map.js"; +import "core-js/modules/es.array.push.js"; +import "core-js/modules/es.array.with.js"; +import "core-js/modules/es.array-buffer.constructor.js"; +import "core-js/modules/es.array-buffer.slice.js"; +import "core-js/modules/es.data-view.js"; +import "core-js/modules/es.array-buffer.detached.js"; +import "core-js/modules/es.array-buffer.transfer.js"; +import "core-js/modules/es.array-buffer.transfer-to-fixed-length.js"; +import "core-js/modules/es.map.js"; +import "core-js/modules/es.map.group-by.js"; +import "core-js/modules/es.object.create.js"; +import "core-js/modules/es.object.freeze.js"; +import "core-js/modules/es.object.group-by.js"; +import "core-js/modules/es.object.keys.js"; +import "core-js/modules/es.object.proto.js"; +import "core-js/modules/es.object.to-string.js"; +import "core-js/modules/es.promise.js"; +import "core-js/modules/es.promise.with-resolvers.js"; +import "core-js/modules/es.regexp.dot-all.js"; +import "core-js/modules/es.regexp.exec.js"; +import "core-js/modules/es.regexp.sticky.js"; +import "core-js/modules/es.set.js"; +import "core-js/modules/es.set.difference.v2.js"; +import "core-js/modules/es.set.intersection.v2.js"; +import "core-js/modules/es.set.is-disjoint-from.v2.js"; +import "core-js/modules/es.set.is-subset-of.v2.js"; +import "core-js/modules/es.set.is-superset-of.v2.js"; +import "core-js/modules/es.set.symmetric-difference.v2.js"; +import "core-js/modules/es.set.union.v2.js"; +import "core-js/modules/es.string.from-code-point.js"; +import "core-js/modules/es.string.is-well-formed.js"; +import "core-js/modules/es.string.iterator.js"; +import "core-js/modules/es.string.match-all.js"; +import "core-js/modules/es.string.replace.js"; +import "core-js/modules/es.string.replace-all.js"; +import "core-js/modules/es.string.to-well-formed.js"; +import "core-js/modules/es.typed-array.uint8-array.js"; +import "core-js/modules/es.typed-array.at.js"; +import "core-js/modules/es.typed-array.copy-within.js"; +import "core-js/modules/es.typed-array.every.js"; +import "core-js/modules/es.typed-array.fill.js"; +import "core-js/modules/es.typed-array.filter.js"; +import "core-js/modules/es.typed-array.find.js"; +import "core-js/modules/es.typed-array.find-index.js"; +import "core-js/modules/es.typed-array.find-last.js"; +import "core-js/modules/es.typed-array.find-last-index.js"; +import "core-js/modules/es.typed-array.for-each.js"; +import "core-js/modules/es.typed-array.includes.js"; +import "core-js/modules/es.typed-array.index-of.js"; +import "core-js/modules/es.typed-array.iterator.js"; +import "core-js/modules/es.typed-array.join.js"; +import "core-js/modules/es.typed-array.last-index-of.js"; +import "core-js/modules/es.typed-array.map.js"; +import "core-js/modules/es.typed-array.reduce.js"; +import "core-js/modules/es.typed-array.reduce-right.js"; +import "core-js/modules/es.typed-array.reverse.js"; +import "core-js/modules/es.typed-array.set.js"; +import "core-js/modules/es.typed-array.slice.js"; +import "core-js/modules/es.typed-array.some.js"; +import "core-js/modules/es.typed-array.sort.js"; +import "core-js/modules/es.typed-array.subarray.js"; +import "core-js/modules/es.typed-array.to-locale-string.js"; +import "core-js/modules/es.typed-array.to-reversed.js"; +import "core-js/modules/es.typed-array.to-sorted.js"; +import "core-js/modules/es.typed-array.to-string.js"; +import "core-js/modules/es.typed-array.with.js"; +import "core-js/modules/es.weak-map.js"; +import "core-js/modules/web.btoa.js"; +import "core-js/modules/web.dom-collections.for-each.js"; +import "core-js/modules/web.dom-collections.iterator.js"; +import "core-js/modules/web.dom-exception.constructor.js"; +import "core-js/modules/web.dom-exception.stack.js"; +import "core-js/modules/web.dom-exception.to-string-tag.js"; +import "core-js/modules/web.self.js"; +import "core-js/modules/web.structured-clone.js"; +import "core-js/modules/web.url.js"; +import "core-js/modules/web.url.can-parse.js"; +import "core-js/modules/web.url.parse.js"; +import "core-js/modules/web.url.to-json.js"; +import "core-js/modules/web.url-search-params.js"; +import "core-js/modules/web.url-search-params.delete.js"; +import "core-js/modules/web.url-search-params.has.js"; +import "core-js/modules/web.url-search-params.size.js"; +[].findLast(fn); +[].findLastIndex(fn); +[].asIndexedPairs(); +Iterator.from({ + next: () => ({ + done: Math.random() > .9, + value: Math.random() * 10 | 0 + }) +}).forEach(console.log).toArray(); +AsyncIterator.from([1, 2, 3, 4, 5, 6, 7]).drop(1).take(5).filter(it => it % 2).groupBy(it => id % 4).map(it => it ** 2).toArray().then(console.log); +[1, 2, 3, 4, 5, 6, 7, 7].uniqueBy(x => x).groupBy(x => x % 2); +Number.range(1, 2); +BigInt.range(1n, 2n); +Array.isTemplateObject((x => x)`a${x}z`); +new Map([['x', 1]]).emplace('x', { + update: x => x + 1, + insert: () => 0 +}); +/x/.dotAll; +/x/.sticky; +Symbol.asyncDispose; +Symbol.matcher; +Symbol.matchAll; +Symbol.metadata; +Symbol.replaceAll; +new URL(url); +const foo = [1, 2, 3].groupByToMap(bar); +const push = [].push.unThis(); +Function.isConstructor; +throw new DOMException(); +structuredClone(72); +btoa('hi'); +foo.indexed; +bar.with; +buz.push; +fuz.__proto__; +string.isWellFormed; +string.toWellFormed; +String.dedent`42`; +self; +SuppressedError; +DisposableStack; +AsyncDisposableStack; +Iterator.range(foo, bar); +JSON.parse(foo); +JSON.isRawJSON(foo); +JSON.rawJSON(foo); +Symbol.isWellKnown(foo); +Symbol.isRegistered(foo); +Function.demethodize(); +new URLSearchParams(string).size; +new Set(array).intersection(otherSet); +URL.canParse(foo); +Symbol.isWellKnownSymbol(foo); +Symbol.isRegisteredSymbol(foo); +Symbol.metadata; +Object.groupBy(a, b); +Map.groupBy(a, b); +Promise.withResolvers(); +new URLSearchParams().has(a, b); +Math.f16round(foo); +foo.getFloat16(0); +foo.setFloat16(0, 1); +foo.getUint8Clamped(0); +foo.setUint8Clamped(0, 1); +RegExp.escape(foo); +Uint8Array.fromBase64(string); +Uint8Array.fromHex(string); +new Uint8Array(foo).toBase64(); +new Uint8Array(foo).toHex(); +URL.parse(x); +Math.sumPrecise(x); +Symbol.customMatcher; diff --git a/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-proposals-chrome-107-corejs-3.36/input.mjs b/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-proposals-chrome-107-corejs-3.36/input.mjs index 6e850d76..552fa8de 100644 --- a/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-proposals-chrome-107-corejs-3.36/input.mjs +++ b/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-proposals-chrome-107-corejs-3.36/input.mjs @@ -96,3 +96,7 @@ Uint8Array.fromBase64(string); Uint8Array.fromHex(string); new Uint8Array(foo).toBase64(); new Uint8Array(foo).toHex(); + +URL.parse(x); +Math.sumPrecise(x); +Symbol.customMatcher; diff --git a/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-proposals-chrome-107-corejs-3.36/output.mjs b/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-proposals-chrome-107-corejs-3.36/output.mjs index cac63f56..81adafca 100644 --- a/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-proposals-chrome-107-corejs-3.36/output.mjs +++ b/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-proposals-chrome-107-corejs-3.36/output.mjs @@ -189,3 +189,6 @@ Uint8Array.fromBase64(string); Uint8Array.fromHex(string); new Uint8Array(foo).toBase64(); new Uint8Array(foo).toHex(); +URL.parse(x); +Math.sumPrecise(x); +Symbol.customMatcher; diff --git a/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-proposals-chrome-107-corejs-3.37/input.mjs b/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-proposals-chrome-107-corejs-3.37/input.mjs new file mode 100644 index 00000000..552fa8de --- /dev/null +++ b/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-proposals-chrome-107-corejs-3.37/input.mjs @@ -0,0 +1,102 @@ +[].findLast(fn); +[].findLastIndex(fn); + +[].asIndexedPairs(); + +Iterator.from({ + next: () => ({ done: Math.random() > .9, value: Math.random() * 10 | 0 }) + }).forEach(console.log).toArray(); + +AsyncIterator.from([1, 2, 3, 4, 5, 6, 7]) + .drop(1) + .take(5) + .filter(it => it % 2) + .groupBy(it => id % 4) + .map(it => it ** 2) + .toArray() + .then(console.log); + +[1, 2, 3, 4, 5, 6, 7, 7].uniqueBy(x => x).groupBy(x => x % 2); + +Number.range(1, 2); +BigInt.range(1n, 2n); + +Array.isTemplateObject((x => x)`a${ x }z`) + +new Map([['x', 1]]).emplace('x', { update: x => x + 1, insert: () => 0}); + +/x/.dotAll; +/x/.sticky + +Symbol.asyncDispose +Symbol.matcher +Symbol.matchAll +Symbol.metadata +Symbol.replaceAll + +new URL(url); + +const foo = [1, 2, 3].groupByToMap(bar); + +const push = [].push.unThis(); + +Function.isConstructor; + +throw new DOMException(); + +structuredClone(72); + +btoa('hi'); + +foo.indexed; +bar.with; +buz.push; +fuz.__proto__; + +string.isWellFormed; +string.toWellFormed; + +String.dedent`42`; + +self; +SuppressedError +DisposableStack; +AsyncDisposableStack; + +Iterator.range(foo, bar); +JSON.parse(foo); +JSON.isRawJSON(foo); +JSON.rawJSON(foo); +Symbol.isWellKnown(foo); +Symbol.isRegistered(foo); +Function.demethodize(); + +new URLSearchParams(string).size; +new Set(array).intersection(otherSet); + +URL.canParse(foo); + +Symbol.isWellKnownSymbol(foo); +Symbol.isRegisteredSymbol(foo); +Symbol.metadata; +Object.groupBy(a, b); +Map.groupBy(a, b); +Promise.withResolvers(); +new URLSearchParams().has(a, b); + +Math.f16round(foo); +foo.getFloat16(0); +foo.setFloat16(0, 1); +foo.getUint8Clamped(0); +foo.setUint8Clamped(0, 1); + +RegExp.escape(foo); + +Uint8Array.fromBase64(string); +Uint8Array.fromHex(string); +new Uint8Array(foo).toBase64(); +new Uint8Array(foo).toHex(); + +URL.parse(x); +Math.sumPrecise(x); +Symbol.customMatcher; diff --git a/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-proposals-chrome-107-corejs-3.37/options.json b/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-proposals-chrome-107-corejs-3.37/options.json new file mode 100644 index 00000000..af9d09f6 --- /dev/null +++ b/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-proposals-chrome-107-corejs-3.37/options.json @@ -0,0 +1,15 @@ +{ + "targets": { + "chrome": 107 + }, + "plugins": [ + [ + "@@/polyfill-corejs3", + { + "method": "usage-global", + "version": "3.37", + "proposals": true + } + ] + ] +} diff --git a/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-proposals-chrome-107-corejs-3.37/output.mjs b/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-proposals-chrome-107-corejs-3.37/output.mjs new file mode 100644 index 00000000..a0d62f9f --- /dev/null +++ b/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/all-proposals-chrome-107-corejs-3.37/output.mjs @@ -0,0 +1,197 @@ +import "core-js/modules/es.array.push.js"; +import "core-js/modules/es.array.with.js"; +import "core-js/modules/es.array-buffer.detached.js"; +import "core-js/modules/es.array-buffer.transfer.js"; +import "core-js/modules/es.array-buffer.transfer-to-fixed-length.js"; +import "core-js/modules/es.map.group-by.js"; +import "core-js/modules/es.object.group-by.js"; +import "core-js/modules/es.promise.with-resolvers.js"; +import "core-js/modules/es.set.difference.v2.js"; +import "core-js/modules/es.set.intersection.v2.js"; +import "core-js/modules/es.set.is-disjoint-from.v2.js"; +import "core-js/modules/es.set.is-subset-of.v2.js"; +import "core-js/modules/es.set.is-superset-of.v2.js"; +import "core-js/modules/es.set.symmetric-difference.v2.js"; +import "core-js/modules/es.set.union.v2.js"; +import "core-js/modules/es.string.is-well-formed.js"; +import "core-js/modules/es.string.to-well-formed.js"; +import "core-js/modules/es.typed-array.to-reversed.js"; +import "core-js/modules/es.typed-array.to-sorted.js"; +import "core-js/modules/es.typed-array.with.js"; +import "core-js/modules/esnext.suppressed-error.constructor.js"; +import "core-js/modules/esnext.array.group-by.js"; +import "core-js/modules/esnext.array.group-by-to-map.js"; +import "core-js/modules/esnext.array.is-template-object.js"; +import "core-js/modules/esnext.array.unique-by.js"; +import "core-js/modules/esnext.async-disposable-stack.constructor.js"; +import "core-js/modules/esnext.async-iterator.constructor.js"; +import "core-js/modules/esnext.async-iterator.async-dispose.js"; +import "core-js/modules/esnext.async-iterator.drop.js"; +import "core-js/modules/esnext.async-iterator.every.js"; +import "core-js/modules/esnext.async-iterator.filter.js"; +import "core-js/modules/esnext.async-iterator.find.js"; +import "core-js/modules/esnext.async-iterator.flat-map.js"; +import "core-js/modules/esnext.async-iterator.for-each.js"; +import "core-js/modules/esnext.async-iterator.from.js"; +import "core-js/modules/esnext.async-iterator.indexed.js"; +import "core-js/modules/esnext.async-iterator.map.js"; +import "core-js/modules/esnext.async-iterator.reduce.js"; +import "core-js/modules/esnext.async-iterator.some.js"; +import "core-js/modules/esnext.async-iterator.take.js"; +import "core-js/modules/esnext.async-iterator.to-array.js"; +import "core-js/modules/esnext.bigint.range.js"; +import "core-js/modules/esnext.data-view.get-float16.js"; +import "core-js/modules/esnext.data-view.get-uint8-clamped.js"; +import "core-js/modules/esnext.data-view.set-float16.js"; +import "core-js/modules/esnext.data-view.set-uint8-clamped.js"; +import "core-js/modules/esnext.disposable-stack.constructor.js"; +import "core-js/modules/esnext.function.demethodize.js"; +import "core-js/modules/esnext.function.is-constructor.js"; +import "core-js/modules/esnext.function.metadata.js"; +import "core-js/modules/esnext.function.un-this.js"; +import "core-js/modules/esnext.iterator.constructor.js"; +import "core-js/modules/esnext.iterator.dispose.js"; +import "core-js/modules/esnext.iterator.drop.js"; +import "core-js/modules/esnext.iterator.filter.js"; +import "core-js/modules/esnext.iterator.for-each.js"; +import "core-js/modules/esnext.iterator.from.js"; +import "core-js/modules/esnext.iterator.indexed.js"; +import "core-js/modules/esnext.iterator.map.js"; +import "core-js/modules/esnext.iterator.range.js"; +import "core-js/modules/esnext.iterator.take.js"; +import "core-js/modules/esnext.iterator.to-array.js"; +import "core-js/modules/esnext.json.is-raw-json.js"; +import "core-js/modules/esnext.json.parse.js"; +import "core-js/modules/esnext.json.raw-json.js"; +import "core-js/modules/esnext.map.delete-all.js"; +import "core-js/modules/esnext.map.emplace.js"; +import "core-js/modules/esnext.map.every.js"; +import "core-js/modules/esnext.map.filter.js"; +import "core-js/modules/esnext.map.find.js"; +import "core-js/modules/esnext.map.find-key.js"; +import "core-js/modules/esnext.map.includes.js"; +import "core-js/modules/esnext.map.key-of.js"; +import "core-js/modules/esnext.map.map-keys.js"; +import "core-js/modules/esnext.map.map-values.js"; +import "core-js/modules/esnext.map.merge.js"; +import "core-js/modules/esnext.map.reduce.js"; +import "core-js/modules/esnext.map.some.js"; +import "core-js/modules/esnext.map.update.js"; +import "core-js/modules/esnext.math.f16round.js"; +import "core-js/modules/esnext.math.sum-precise.js"; +import "core-js/modules/esnext.number.range.js"; +import "core-js/modules/esnext.regexp.escape.js"; +import "core-js/modules/esnext.set.add-all.js"; +import "core-js/modules/esnext.set.delete-all.js"; +import "core-js/modules/esnext.set.difference.js"; +import "core-js/modules/esnext.set.every.js"; +import "core-js/modules/esnext.set.filter.js"; +import "core-js/modules/esnext.set.find.js"; +import "core-js/modules/esnext.set.intersection.js"; +import "core-js/modules/esnext.set.is-disjoint-from.js"; +import "core-js/modules/esnext.set.is-subset-of.js"; +import "core-js/modules/esnext.set.is-superset-of.js"; +import "core-js/modules/esnext.set.join.js"; +import "core-js/modules/esnext.set.map.js"; +import "core-js/modules/esnext.set.reduce.js"; +import "core-js/modules/esnext.set.some.js"; +import "core-js/modules/esnext.set.symmetric-difference.js"; +import "core-js/modules/esnext.set.union.js"; +import "core-js/modules/esnext.string.dedent.js"; +import "core-js/modules/esnext.symbol.async-dispose.js"; +import "core-js/modules/esnext.symbol.custom-matcher.js"; +import "core-js/modules/esnext.symbol.is-registered-symbol.js"; +import "core-js/modules/esnext.symbol.is-registered.js"; +import "core-js/modules/esnext.symbol.is-well-known-symbol.js"; +import "core-js/modules/esnext.symbol.is-well-known.js"; +import "core-js/modules/esnext.symbol.matcher.js"; +import "core-js/modules/esnext.symbol.metadata.js"; +import "core-js/modules/esnext.typed-array.filter-reject.js"; +import "core-js/modules/esnext.typed-array.group-by.js"; +import "core-js/modules/esnext.typed-array.to-spliced.js"; +import "core-js/modules/esnext.typed-array.unique-by.js"; +import "core-js/modules/esnext.uint8-array.from-base64.js"; +import "core-js/modules/esnext.uint8-array.from-hex.js"; +import "core-js/modules/esnext.uint8-array.to-base64.js"; +import "core-js/modules/esnext.uint8-array.to-hex.js"; +import "core-js/modules/esnext.weak-map.emplace.js"; +import "core-js/modules/web.dom-exception.stack.js"; +import "core-js/modules/web.structured-clone.js"; +import "core-js/modules/web.url.can-parse.js"; +import "core-js/modules/web.url.parse.js"; +import "core-js/modules/web.url-search-params.delete.js"; +import "core-js/modules/web.url-search-params.has.js"; +import "core-js/modules/web.url-search-params.size.js"; +[].findLast(fn); +[].findLastIndex(fn); +[].asIndexedPairs(); +Iterator.from({ + next: () => ({ + done: Math.random() > .9, + value: Math.random() * 10 | 0 + }) +}).forEach(console.log).toArray(); +AsyncIterator.from([1, 2, 3, 4, 5, 6, 7]).drop(1).take(5).filter(it => it % 2).groupBy(it => id % 4).map(it => it ** 2).toArray().then(console.log); +[1, 2, 3, 4, 5, 6, 7, 7].uniqueBy(x => x).groupBy(x => x % 2); +Number.range(1, 2); +BigInt.range(1n, 2n); +Array.isTemplateObject((x => x)`a${x}z`); +new Map([['x', 1]]).emplace('x', { + update: x => x + 1, + insert: () => 0 +}); +/x/.dotAll; +/x/.sticky; +Symbol.asyncDispose; +Symbol.matcher; +Symbol.matchAll; +Symbol.metadata; +Symbol.replaceAll; +new URL(url); +const foo = [1, 2, 3].groupByToMap(bar); +const push = [].push.unThis(); +Function.isConstructor; +throw new DOMException(); +structuredClone(72); +btoa('hi'); +foo.indexed; +bar.with; +buz.push; +fuz.__proto__; +string.isWellFormed; +string.toWellFormed; +String.dedent`42`; +self; +SuppressedError; +DisposableStack; +AsyncDisposableStack; +Iterator.range(foo, bar); +JSON.parse(foo); +JSON.isRawJSON(foo); +JSON.rawJSON(foo); +Symbol.isWellKnown(foo); +Symbol.isRegistered(foo); +Function.demethodize(); +new URLSearchParams(string).size; +new Set(array).intersection(otherSet); +URL.canParse(foo); +Symbol.isWellKnownSymbol(foo); +Symbol.isRegisteredSymbol(foo); +Symbol.metadata; +Object.groupBy(a, b); +Map.groupBy(a, b); +Promise.withResolvers(); +new URLSearchParams().has(a, b); +Math.f16round(foo); +foo.getFloat16(0); +foo.setFloat16(0, 1); +foo.getUint8Clamped(0); +foo.setUint8Clamped(0, 1); +RegExp.escape(foo); +Uint8Array.fromBase64(string); +Uint8Array.fromHex(string); +new Uint8Array(foo).toBase64(); +new Uint8Array(foo).toHex(); +URL.parse(x); +Math.sumPrecise(x); +Symbol.customMatcher; diff --git a/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-pure/all-corejs-3.36/input.mjs b/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-pure/all-corejs-3.36/input.mjs index c20b0d25..cd769f1c 100644 --- a/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-pure/all-corejs-3.36/input.mjs +++ b/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-pure/all-corejs-3.36/input.mjs @@ -93,3 +93,7 @@ Uint8Array.fromBase64(string); Uint8Array.fromHex(string); new Uint8Array(foo).toBase64(); new Uint8Array(foo).toHex(); + +URL.parse(x); +Math.sumPrecise(x); +Symbol.customMatcher; diff --git a/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-pure/all-corejs-3.36/output.mjs b/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-pure/all-corejs-3.36/output.mjs index 7b121426..49416b31 100644 --- a/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-pure/all-corejs-3.36/output.mjs +++ b/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-pure/all-corejs-3.36/output.mjs @@ -90,3 +90,6 @@ Uint8Array.fromBase64(string); Uint8Array.fromHex(string); new Uint8Array(foo).toBase64(); new Uint8Array(foo).toHex(); +_URL.parse(x); +Math.sumPrecise(x); +_Symbol.customMatcher; diff --git a/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-pure/all-corejs-3.37/input.mjs b/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-pure/all-corejs-3.37/input.mjs new file mode 100644 index 00000000..cd769f1c --- /dev/null +++ b/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-pure/all-corejs-3.37/input.mjs @@ -0,0 +1,99 @@ +[].findLast(fn); +[].findLastIndex(fn); + +[].asIndexedPairs(); + +Iterator.from({ + next: () => ({ done: Math.random() > .9, value: Math.random() * 10 | 0 }) + }).forEach(console.log).toArray(); + +AsyncIterator.from([1, 2, 3, 4, 5, 6, 7]) + .drop(1) + .take(5) + .filter(it => it % 2) + .groupBy(it => id % 4) + .map(it => it ** 2) + .toArray() + .then(console.log); + +[1, 2, 3, 4, 5, 6, 7, 7].uniqueBy(x => x).groupBy(x => x % 2); + +Number.range(1, 2); +BigInt.range(1n, 2n); + +Array.isTemplateObject((x => x)`a${ x }z`) + +new Map([['x', 1]]).emplace('x', { update: x => x + 1, insert: () => 0}); + +/x/.dotAll; +/x/.sticky + +Symbol.asyncDispose +Symbol.matcher +Symbol.matchAll +Symbol.metadata +Symbol.replaceAll + +new URL(url); + +const foo = [1, 2, 3].groupByToMap(bar); + +const push = [].push.unThis(); + +Function.isConstructor; + +throw new DOMException(); + +structuredClone(72); + +btoa('hi'); + +foo.indexed; +bar.with; +buz.push; +fuz.__proto__; + +string.isWellFormed; +string.toWellFormed; + +String.dedent`42`; + +self; +SuppressedError +DisposableStack; +AsyncDisposableStack; + +Iterator.range(foo, bar); +JSON.parse(foo); +JSON.isRawJSON(foo); +JSON.rawJSON(foo); +Symbol.isWellKnown(foo); +Symbol.isRegistered(foo); +Function.demethodize(); + +URL.canParse(foo); + +Symbol.isWellKnownSymbol(foo); +Symbol.isRegisteredSymbol(foo); +Symbol.metadata; +Object.groupBy(a, b); +Map.groupBy(a, b); +Promise.withResolvers(); +new URLSearchParams().has(a, b); + +Math.f16round(foo); +foo.getFloat16(0); +foo.setFloat16(0, 1); +foo.getUint8Clamped(0); +foo.setUint8Clamped(0, 1); + +RegExp.escape(foo); + +Uint8Array.fromBase64(string); +Uint8Array.fromHex(string); +new Uint8Array(foo).toBase64(); +new Uint8Array(foo).toHex(); + +URL.parse(x); +Math.sumPrecise(x); +Symbol.customMatcher; diff --git a/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-pure/all-corejs-3.37/options.json b/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-pure/all-corejs-3.37/options.json new file mode 100644 index 00000000..4a31eaea --- /dev/null +++ b/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-pure/all-corejs-3.37/options.json @@ -0,0 +1,11 @@ +{ + "plugins": [ + [ + "@@/polyfill-corejs3", + { + "method": "usage-pure", + "version": "3.37" + } + ] + ] +} diff --git a/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-pure/all-corejs-3.37/output.mjs b/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-pure/all-corejs-3.37/output.mjs new file mode 100644 index 00000000..7753b8e8 --- /dev/null +++ b/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-pure/all-corejs-3.37/output.mjs @@ -0,0 +1,96 @@ +var _context, _context2, _context3, _context4, _context5; +import _findLastInstanceProperty from "core-js-pure/stable/instance/find-last.js"; +import _findLastIndexInstanceProperty from "core-js-pure/stable/instance/find-last-index.js"; +import _forEachInstanceProperty from "core-js-pure/stable/instance/for-each.js"; +import _mapInstanceProperty from "core-js-pure/stable/instance/map.js"; +import _filterInstanceProperty from "core-js-pure/stable/instance/filter.js"; +import _Map from "core-js-pure/stable/map/index.js"; +import _Symbol from "core-js-pure/stable/symbol/index.js"; +import _Symbol$matchAll from "core-js-pure/stable/symbol/match-all.js"; +import _replaceAllInstanceProperty from "core-js-pure/stable/instance/replace-all.js"; +import _URL from "core-js-pure/stable/url/index.js"; +import _pushInstanceProperty from "core-js-pure/stable/instance/push.js"; +import _DOMException from "core-js-pure/stable/dom-exception/index.js"; +import _structuredClone from "core-js-pure/stable/structured-clone.js"; +import _btoa from "core-js-pure/stable/btoa.js"; +import _withInstanceProperty from "core-js-pure/stable/instance/with.js"; +import _isWellFormedInstanceProperty from "core-js-pure/stable/instance/is-well-formed.js"; +import _toWellFormedInstanceProperty from "core-js-pure/stable/instance/to-well-formed.js"; +import _self from "core-js-pure/stable/self.js"; +import _URL$canParse from "core-js-pure/stable/url/can-parse.js"; +import _Object$groupBy from "core-js-pure/stable/object/group-by.js"; +import _Map$groupBy from "core-js-pure/stable/map/group-by.js"; +import _Promise$withResolvers from "core-js-pure/stable/promise/with-resolvers.js"; +import _URLSearchParams from "core-js-pure/stable/url-search-params/index.js"; +import _URL$parse from "core-js-pure/stable/url/parse.js"; +_findLastInstanceProperty(_context = []).call(_context, fn); +_findLastIndexInstanceProperty(_context2 = []).call(_context2, fn); +[].asIndexedPairs(); +_forEachInstanceProperty(_context3 = Iterator.from({ + next: () => ({ + done: Math.random() > .9, + value: Math.random() * 10 | 0 + }) +})).call(_context3, console.log).toArray(); +_mapInstanceProperty(_context4 = _filterInstanceProperty(_context5 = AsyncIterator.from([1, 2, 3, 4, 5, 6, 7]).drop(1).take(5)).call(_context5, it => it % 2).groupBy(it => id % 4)).call(_context4, it => it ** 2).toArray().then(console.log); +[1, 2, 3, 4, 5, 6, 7, 7].uniqueBy(x => x).groupBy(x => x % 2); +Number.range(1, 2); +BigInt.range(1n, 2n); +Array.isTemplateObject((x => x)`a${x}z`); +new _Map([['x', 1]]).emplace('x', { + update: x => x + 1, + insert: () => 0 +}); +/x/.dotAll; +/x/.sticky; +_Symbol.asyncDispose; +_Symbol.matcher; +_Symbol$matchAll; +_Symbol.metadata; +_replaceAllInstanceProperty(_Symbol); +new _URL(url); +const foo = [1, 2, 3].groupByToMap(bar); +const push = _pushInstanceProperty([]).unThis(); +Function.isConstructor; +throw new _DOMException(); +_structuredClone(72); +_btoa('hi'); +foo.indexed; +_withInstanceProperty(bar); +_pushInstanceProperty(buz); +fuz.__proto__; +_isWellFormedInstanceProperty(string); +_toWellFormedInstanceProperty(string); +String.dedent`42`; +_self; +SuppressedError; +DisposableStack; +AsyncDisposableStack; +Iterator.range(foo, bar); +JSON.parse(foo); +JSON.isRawJSON(foo); +JSON.rawJSON(foo); +_Symbol.isWellKnown(foo); +_Symbol.isRegistered(foo); +Function.demethodize(); +_URL$canParse(foo); +_Symbol.isWellKnownSymbol(foo); +_Symbol.isRegisteredSymbol(foo); +_Symbol.metadata; +_Object$groupBy(a, b); +_Map$groupBy(a, b); +_Promise$withResolvers(); +new _URLSearchParams().has(a, b); +Math.f16round(foo); +foo.getFloat16(0); +foo.setFloat16(0, 1); +foo.getUint8Clamped(0); +foo.setUint8Clamped(0, 1); +RegExp.escape(foo); +Uint8Array.fromBase64(string); +Uint8Array.fromHex(string); +new Uint8Array(foo).toBase64(); +new Uint8Array(foo).toHex(); +_URL$parse(x); +Math.sumPrecise(x); +_Symbol.customMatcher; diff --git a/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-pure/all-proposals-chrome-90-corejs-3.36/input.mjs b/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-pure/all-proposals-chrome-90-corejs-3.36/input.mjs index c20b0d25..cd769f1c 100644 --- a/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-pure/all-proposals-chrome-90-corejs-3.36/input.mjs +++ b/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-pure/all-proposals-chrome-90-corejs-3.36/input.mjs @@ -93,3 +93,7 @@ Uint8Array.fromBase64(string); Uint8Array.fromHex(string); new Uint8Array(foo).toBase64(); new Uint8Array(foo).toHex(); + +URL.parse(x); +Math.sumPrecise(x); +Symbol.customMatcher; diff --git a/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-pure/all-proposals-chrome-90-corejs-3.36/output.mjs b/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-pure/all-proposals-chrome-90-corejs-3.36/output.mjs index fb4baf88..4e4b3da9 100644 --- a/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-pure/all-proposals-chrome-90-corejs-3.36/output.mjs +++ b/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-pure/all-proposals-chrome-90-corejs-3.36/output.mjs @@ -107,3 +107,6 @@ Uint8Array.fromBase64(string); Uint8Array.fromHex(string); new Uint8Array(foo).toBase64(); new Uint8Array(foo).toHex(); +URL.parse(x); +Math.sumPrecise(x); +Symbol.customMatcher; diff --git a/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-pure/all-proposals-chrome-90-corejs-3.37/input.mjs b/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-pure/all-proposals-chrome-90-corejs-3.37/input.mjs new file mode 100644 index 00000000..cd769f1c --- /dev/null +++ b/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-pure/all-proposals-chrome-90-corejs-3.37/input.mjs @@ -0,0 +1,99 @@ +[].findLast(fn); +[].findLastIndex(fn); + +[].asIndexedPairs(); + +Iterator.from({ + next: () => ({ done: Math.random() > .9, value: Math.random() * 10 | 0 }) + }).forEach(console.log).toArray(); + +AsyncIterator.from([1, 2, 3, 4, 5, 6, 7]) + .drop(1) + .take(5) + .filter(it => it % 2) + .groupBy(it => id % 4) + .map(it => it ** 2) + .toArray() + .then(console.log); + +[1, 2, 3, 4, 5, 6, 7, 7].uniqueBy(x => x).groupBy(x => x % 2); + +Number.range(1, 2); +BigInt.range(1n, 2n); + +Array.isTemplateObject((x => x)`a${ x }z`) + +new Map([['x', 1]]).emplace('x', { update: x => x + 1, insert: () => 0}); + +/x/.dotAll; +/x/.sticky + +Symbol.asyncDispose +Symbol.matcher +Symbol.matchAll +Symbol.metadata +Symbol.replaceAll + +new URL(url); + +const foo = [1, 2, 3].groupByToMap(bar); + +const push = [].push.unThis(); + +Function.isConstructor; + +throw new DOMException(); + +structuredClone(72); + +btoa('hi'); + +foo.indexed; +bar.with; +buz.push; +fuz.__proto__; + +string.isWellFormed; +string.toWellFormed; + +String.dedent`42`; + +self; +SuppressedError +DisposableStack; +AsyncDisposableStack; + +Iterator.range(foo, bar); +JSON.parse(foo); +JSON.isRawJSON(foo); +JSON.rawJSON(foo); +Symbol.isWellKnown(foo); +Symbol.isRegistered(foo); +Function.demethodize(); + +URL.canParse(foo); + +Symbol.isWellKnownSymbol(foo); +Symbol.isRegisteredSymbol(foo); +Symbol.metadata; +Object.groupBy(a, b); +Map.groupBy(a, b); +Promise.withResolvers(); +new URLSearchParams().has(a, b); + +Math.f16round(foo); +foo.getFloat16(0); +foo.setFloat16(0, 1); +foo.getUint8Clamped(0); +foo.setUint8Clamped(0, 1); + +RegExp.escape(foo); + +Uint8Array.fromBase64(string); +Uint8Array.fromHex(string); +new Uint8Array(foo).toBase64(); +new Uint8Array(foo).toHex(); + +URL.parse(x); +Math.sumPrecise(x); +Symbol.customMatcher; diff --git a/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-pure/all-proposals-chrome-90-corejs-3.37/options.json b/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-pure/all-proposals-chrome-90-corejs-3.37/options.json new file mode 100644 index 00000000..9792baf1 --- /dev/null +++ b/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-pure/all-proposals-chrome-90-corejs-3.37/options.json @@ -0,0 +1,15 @@ +{ + "targets": { + "chrome": 90 + }, + "plugins": [ + [ + "@@/polyfill-corejs3", + { + "method": "usage-pure", + "version": "3.37", + "proposals": true + } + ] + ] +} diff --git a/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-pure/all-proposals-chrome-90-corejs-3.37/output.mjs b/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-pure/all-proposals-chrome-90-corejs-3.37/output.mjs new file mode 100644 index 00000000..5918c018 --- /dev/null +++ b/packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-pure/all-proposals-chrome-90-corejs-3.37/output.mjs @@ -0,0 +1,116 @@ +var _context, _context2, _context3, _context4, _context5, _context6, _context7, _context8, _context9; +import _findLastInstanceProperty from "core-js-pure/features/instance/find-last.js"; +import _findLastIndexInstanceProperty from "core-js-pure/features/instance/find-last-index.js"; +import _asIndexedPairsInstanceProperty from "core-js-pure/features/instance/asIndexedPairs.js"; +import _Iterator$from from "core-js-pure/features/iterator/from.js"; +import _groupByInstanceProperty from "core-js-pure/features/instance/group-by.js"; +import _AsyncIterator$from from "core-js-pure/features/async-iterator/from.js"; +import _uniqueByInstanceProperty from "core-js-pure/features/instance/unique-by.js"; +import _Number$range from "core-js-pure/features/number/range.js"; +import _BigInt$range from "core-js-pure/features/bigint/range.js"; +import _Array$isTemplateObject from "core-js-pure/features/array/is-template-object.js"; +import _emplaceInstanceProperty from "core-js-pure/features/instance/emplace.js"; +import _Symbol$asyncDispose from "core-js-pure/features/symbol/async-dispose.js"; +import _Symbol$matcher from "core-js-pure/features/symbol/matcher.js"; +import _Symbol$metadata from "core-js-pure/features/symbol/metadata.js"; +import _groupByToMapInstanceProperty from "core-js-pure/features/instance/group-by-to-map.js"; +import _unThisInstanceProperty from "core-js-pure/features/instance/un-this.js"; +import _pushInstanceProperty from "core-js-pure/features/instance/push.js"; +import _Function$isConstructor from "core-js-pure/features/function/is-constructor.js"; +import _structuredClone from "core-js-pure/features/structured-clone.js"; +import _withInstanceProperty from "core-js-pure/features/instance/with.js"; +import _isWellFormedInstanceProperty from "core-js-pure/features/instance/is-well-formed.js"; +import _toWellFormedInstanceProperty from "core-js-pure/features/instance/to-well-formed.js"; +import _String$dedent from "core-js-pure/features/string/dedent.js"; +import _SuppressedError from "core-js-pure/features/suppressed-error.js"; +import _DisposableStack from "core-js-pure/features/disposable-stack/index.js"; +import _AsyncDisposableStack from "core-js-pure/features/async-disposable-stack/index.js"; +import _Iterator$range from "core-js-pure/features/iterator/range.js"; +import _JSON$parse from "core-js-pure/features/json/parse.js"; +import _JSON$isRawJSON from "core-js-pure/features/json/is-raw-json.js"; +import _JSON$rawJSON from "core-js-pure/features/json/raw-json.js"; +import _Symbol$isWellKnown from "core-js-pure/features/symbol/is-well-known.js"; +import _Symbol$isRegistered from "core-js-pure/features/symbol/is-registered.js"; +import _demethodizeInstanceProperty from "core-js-pure/features/instance/demethodize.js"; +import _URL$canParse from "core-js-pure/features/url/can-parse.js"; +import _Symbol$isWellKnownSymbol from "core-js-pure/features/symbol/is-well-known-symbol.js"; +import _Symbol$isRegisteredSymbol from "core-js-pure/features/symbol/is-registered-symbol.js"; +import _Object$groupBy from "core-js-pure/features/object/group-by.js"; +import _Map$groupBy from "core-js-pure/features/map/group-by.js"; +import _Promise$withResolvers from "core-js-pure/features/promise/with-resolvers.js"; +import _Math$f16round from "core-js-pure/features/math/f16round.js"; +import _RegExp$escape from "core-js-pure/features/regexp/escape.js"; +import _URL$parse from "core-js-pure/features/url/parse.js"; +import _Math$sumPrecise from "core-js-pure/features/math/sum-precise.js"; +import _Symbol$customMatcher from "core-js-pure/features/symbol/custom-matcher.js"; +_findLastInstanceProperty(_context = []).call(_context, fn); +_findLastIndexInstanceProperty(_context2 = []).call(_context2, fn); +_asIndexedPairsInstanceProperty(_context3 = []).call(_context3); +_Iterator$from({ + next: () => ({ + done: Math.random() > .9, + value: Math.random() * 10 | 0 + }) +}).forEach(console.log).toArray(); +_groupByInstanceProperty(_context4 = _AsyncIterator$from([1, 2, 3, 4, 5, 6, 7]).drop(1).take(5).filter(it => it % 2)).call(_context4, it => id % 4).map(it => it ** 2).toArray().then(console.log); +_groupByInstanceProperty(_context5 = _uniqueByInstanceProperty(_context6 = [1, 2, 3, 4, 5, 6, 7, 7]).call(_context6, x => x)).call(_context5, x => x % 2); +_Number$range(1, 2); +_BigInt$range(1n, 2n); +_Array$isTemplateObject((x => x)`a${x}z`); +_emplaceInstanceProperty(_context7 = new Map([['x', 1]])).call(_context7, 'x', { + update: x => x + 1, + insert: () => 0 +}); +/x/.dotAll; +/x/.sticky; +_Symbol$asyncDispose; +_Symbol$matcher; +Symbol.matchAll; +_Symbol$metadata; +Symbol.replaceAll; +new URL(url); +const foo = _groupByToMapInstanceProperty(_context8 = [1, 2, 3]).call(_context8, bar); +const push = _unThisInstanceProperty(_context9 = _pushInstanceProperty([])).call(_context9); +_Function$isConstructor; +throw new DOMException(); +_structuredClone(72); +btoa('hi'); +foo.indexed; +_withInstanceProperty(bar); +_pushInstanceProperty(buz); +fuz.__proto__; +_isWellFormedInstanceProperty(string); +_toWellFormedInstanceProperty(string); +_String$dedent`42`; +self; +_SuppressedError; +_DisposableStack; +_AsyncDisposableStack; +_Iterator$range(foo, bar); +_JSON$parse(foo); +_JSON$isRawJSON(foo); +_JSON$rawJSON(foo); +_Symbol$isWellKnown(foo); +_Symbol$isRegistered(foo); +_demethodizeInstanceProperty(Function).call(Function); +_URL$canParse(foo); +_Symbol$isWellKnownSymbol(foo); +_Symbol$isRegisteredSymbol(foo); +_Symbol$metadata; +_Object$groupBy(a, b); +_Map$groupBy(a, b); +_Promise$withResolvers(); +new URLSearchParams().has(a, b); +_Math$f16round(foo); +foo.getFloat16(0); +foo.setFloat16(0, 1); +foo.getUint8Clamped(0); +foo.setUint8Clamped(0, 1); +_RegExp$escape(foo); +Uint8Array.fromBase64(string); +Uint8Array.fromHex(string); +new Uint8Array(foo).toBase64(); +new Uint8Array(foo).toHex(); +_URL$parse(x); +_Math$sumPrecise(x); +_Symbol$customMatcher; diff --git a/yarn.lock b/yarn.lock index 36879843..bec21829 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4518,9 +4518,9 @@ __metadata: "@babel/plugin-transform-modules-commonjs": ^7.22.5 "@babel/plugin-transform-runtime": ^7.22.15 "@babel/plugin-transform-spread": ^7.22.5 - core-js: ^3.36.1 - core-js-compat: ^3.36.1 - core-js-pure: ^3.36.1 + core-js: ^3.37.0 + core-js-compat: ^3.37.0 + core-js-pure: ^3.37.0 peerDependencies: "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 languageName: unknown @@ -5777,26 +5777,26 @@ __metadata: languageName: node linkType: hard -"core-js-compat@npm:^3.31.0, core-js-compat@npm:^3.36.1": - version: 3.36.1 - resolution: "core-js-compat@npm:3.36.1" +"core-js-compat@npm:^3.31.0, core-js-compat@npm:^3.37.0": + version: 3.37.0 + resolution: "core-js-compat@npm:3.37.0" dependencies: browserslist: ^4.23.0 - checksum: c9109bd599a97b5d20f25fc8b8339b8c7f3fca5f9a1bebd397805383ff7699e117786c7ffe0f7a95058a6fa5e0e1435d4c10e5cda6ad86ce1957986bb6580562 + checksum: cab5078e98625f889fd9bbbb19e84cb408f31c87e68302d380db0d26ae8e35c1b38cde084358ff345d4aa461af5f3c60d8a913a5b30bff3a83b4b7859374db36 languageName: node linkType: hard -"core-js-pure@npm:^3.36.1": - version: 3.36.1 - resolution: "core-js-pure@npm:3.36.1" - checksum: 5318607e4bca7cc25f4de0a1bbb9f25a0f4d2e6c14963ccc1c7b4fe8a245bdf7ff1453b61e2b36b1eb486c9259399862b9a1f2d6bda2b0dcbc74a7e334628e20 +"core-js-pure@npm:^3.37.0": + version: 3.37.0 + resolution: "core-js-pure@npm:3.37.0" + checksum: 206797d88046f4f5a62ecb9a7158bc6ba38127db2239bcbd1e85b2c8cf3cfb9bb3bbc6a312ecf0f87702f87659959d10625aeac74de6336a9303866f7010d364 languageName: node linkType: hard -"core-js@npm:^3.36.1": - version: 3.36.1 - resolution: "core-js@npm:3.36.1" - checksum: 6f6c152179bd0673da34e67a82c6a5c37f31f9fbe908e9caf93749dc62a25b6e07fbff2411de3b74bb2d0661b7f9fb247115ba8efabf9904f5fef26edead515e +"core-js@npm:^3.37.0": + version: 3.37.0 + resolution: "core-js@npm:3.37.0" + checksum: 212c3e9b3fc277dbb63739ef58a61c5709ccd0b36f09c3ce6946aa91fa180c60f57f976d4a5fdb9cda0c6cb55417379ba5a008fc3a1384ec94ec8ec61826469d languageName: node linkType: hard