Skip to content

Commit

Permalink
Update core-js (#224)
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock authored Jan 24, 2025
1 parent 66340fb commit 8058285
Show file tree
Hide file tree
Showing 140 changed files with 2,571 additions and 44 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.39.0"
"@babel/preset-env/core-js-compat": "^3.40.0"
},
"engines": {
"node": ">= 6.9.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/babel-plugin-polyfill-corejs3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
],
"dependencies": {
"@babel/helper-define-polyfill-provider": "workspace:^0.6.3",
"core-js-compat": "^3.39.0"
"core-js-compat": "^3.40.0"
},
"devDependencies": {
"@babel/core": "^7.22.6",
Expand All @@ -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.39.0",
"core-js-pure": "^3.39.0"
"core-js": "^3.40.0",
"core-js-pure": "^3.40.0"
},
"peerDependencies": {
"@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0"
Expand Down
20 changes: 20 additions & 0 deletions packages/babel-plugin-polyfill-corejs3/src/built-in-definitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,13 @@ export const StaticProperties: ObjectMap2<CoreJSPolyfillDescriptor> = {
now: define("date/now", ["es.date.now"]),
},

Error: {
isError: define("error/is-error", [
"esnext.error.is-error",
"es.object.create",
]),
},

Function: {
isCallable: define("function/is-callable", ["esnext.function.is-callable"]),
isConstructor: define("function/is-constructor", [
Expand Down Expand Up @@ -758,6 +765,19 @@ export const StaticProperties: ObjectMap2<CoreJSPolyfillDescriptor> = {
},
};

[
"AggregateError",
"EvalError",
"RangeError",
"ReferenceError",
"SuppressedError",
"SyntaxError",
"TypeError",
"URIError",
].forEach(ERROR_SUBCLASS => {
StaticProperties[ERROR_SUBCLASS] = StaticProperties.Error;
});

export const InstanceProperties = {
asIndexedPairs: define(null, [
"esnext.async-iterator.as-indexed-pairs",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ export default new Set<string>([
"esnext.array.group-to-map",
"esnext.data-view.get-float16",
"esnext.data-view.set-float16",
"esnext.error.is-error",
"esnext.iterator.dispose",
"esnext.json.is-raw-json",
"esnext.json.parse",
"esnext.json.raw-json",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import 'core-js/actual';
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"plugins": [
[
"@@/polyfill-corejs3",
{
"version": "3.40",
"method": "entry-global",
"targets": {
"chrome": 107
}
}
]
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
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.iterator.constructor.js";
import "core-js/modules/es.iterator.drop.js";
import "core-js/modules/es.iterator.every.js";
import "core-js/modules/es.iterator.filter.js";
import "core-js/modules/es.iterator.find.js";
import "core-js/modules/es.iterator.flat-map.js";
import "core-js/modules/es.iterator.for-each.js";
import "core-js/modules/es.iterator.from.js";
import "core-js/modules/es.iterator.map.js";
import "core-js/modules/es.iterator.reduce.js";
import "core-js/modules/es.iterator.some.js";
import "core-js/modules/es.iterator.take.js";
import "core-js/modules/es.iterator.to-array.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.try.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.error.is-error.js";
import "core-js/modules/esnext.function.metadata.js";
import "core-js/modules/esnext.iterator.dispose.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.math.sum-precise.js";
import "core-js/modules/esnext.regexp.escape.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.set-from-base64.js";
import "core-js/modules/esnext.uint8-array.set-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";
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import 'core-js/actual';
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"plugins": [
[
"@@/polyfill-corejs3",
{
"version": "3.40",
"method": "entry-global"
}
]
]
}
Loading

0 comments on commit 8058285

Please sign in to comment.