Skip to content

Commit 4d035c0

Browse files
authored
Update core-js (#246)
1 parent b63adf1 commit 4d035c0

File tree

123 files changed

+5346
-134
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+5346
-134
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The main Babel packages only transform JavaScript _syntax_: you also need to loa
1313

1414
The easiest way to do so is to directly load the polyfill using a `<script ...>` tag:
1515
```html
16-
<script src="https://unpkg.com/core-js-bundle@3.46.0/minified.js"></script>
16+
<script src="https://unpkg.com/core-js-bundle@3.48.0/minified.js"></script>
1717
```
1818

1919
However, this simple approach can potentially include a lot of unnecessary code. The Babel plugins implemented in this repository automatically inject the polyfills in your code, while trying to only load what is really needed. It does this based on your compilation targets and on what you are using in your code.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
"@lerna/package": "patch:@lerna/package@npm:3.16.0#.yarn-patches/@lerna/package.patch",
6262
"@lerna/package-graph": "patch:@lerna/package-graph@npm:3.18.5#.yarn-patches/@lerna/package-graph.patch",
6363
"@lerna/pack-directory": "patch:@lerna/pack-directory@npm:3.16.4#.yarn-patches/@lerna/pack-directory.patch",
64-
"@babel/preset-env/core-js-compat": "^3.46.0"
64+
"@babel/preset-env/core-js-compat": "^3.48.0"
6565
},
6666
"engines": {
6767
"node": ">= 6.9.0",

packages/babel-plugin-polyfill-corejs3/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Add this plugin to your Babel configuration:
2020

2121
```json
2222
{
23-
"plugins": [["polyfill-corejs3", { "method": "usage-global", "version": "3.46" }]]
23+
"plugins": [["polyfill-corejs3", { "method": "usage-global", "version": "3.48" }]]
2424
}
2525
```
2626

@@ -55,7 +55,7 @@ If you are a library author, specify a reasonably modern `core-js` version in yo
5555
```json
5656
{
5757
"dependencies": {
58-
"core-js": "^3.46.0"
58+
"core-js": "^3.48.0"
5959
}
6060
}
6161
```

packages/babel-plugin-polyfill-corejs3/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
],
2828
"dependencies": {
2929
"@babel/helper-define-polyfill-provider": "workspace:^0.6.5",
30-
"core-js-compat": "^3.46.0"
30+
"core-js-compat": "^3.48.0"
3131
},
3232
"devDependencies": {
3333
"@babel/core": "^7.27.7",
@@ -39,8 +39,8 @@
3939
"@babel/plugin-transform-modules-commonjs": "^7.27.1",
4040
"@babel/plugin-transform-runtime": "^7.27.4",
4141
"@babel/plugin-transform-spread": "^7.27.1",
42-
"core-js": "^3.46.0",
43-
"core-js-pure": "^3.46.0"
42+
"core-js": "^3.48.0",
43+
"core-js-pure": "^3.48.0"
4444
},
4545
"peerDependencies": {
4646
"@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0"

packages/babel-plugin-polyfill-corejs3/src/built-in-definitions.ts

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -117,14 +117,14 @@ const SymbolDependencies = [
117117

118118
const MapDependencies = [
119119
"es.map",
120+
"es.map.get-or-insert",
121+
"es.map.get-or-insert-computed",
120122
"esnext.map.delete-all",
121123
"esnext.map.emplace",
122124
"esnext.map.every",
123125
"esnext.map.filter",
124126
"esnext.map.find",
125127
"esnext.map.find-key",
126-
"esnext.map.get-or-insert",
127-
"esnext.map.get-or-insert-computed",
128128
"esnext.map.includes",
129129
"esnext.map.key-of",
130130
"esnext.map.map-keys",
@@ -166,10 +166,10 @@ const SetDependencies = [
166166

167167
const WeakMapDependencies = [
168168
"es.weak-map",
169+
"es.weak-map.get-or-insert",
170+
"es.weak-map.get-or-insert-computed",
169171
"esnext.weak-map.delete-all",
170172
"esnext.weak-map.emplace",
171-
"esnext.weak-map.get-or-insert",
172-
"esnext.weak-map.get-or-insert-computed",
173173
...CommonIteratorsWithTag,
174174
];
175175

@@ -392,7 +392,7 @@ export const StaticProperties: ObjectMap2<CoreJSPolyfillDescriptor> = {
392392

393393
Iterator: {
394394
concat: define("iterator/concat", [
395-
"esnext.iterator.concat",
395+
"es.iterator.concat",
396396
...IteratorDependencies,
397397
...CommonIterators,
398398
]),
@@ -420,18 +420,17 @@ export const StaticProperties: ObjectMap2<CoreJSPolyfillDescriptor> = {
420420
},
421421

422422
JSON: {
423-
isRawJSON: define("json/is-raw-json", ["esnext.json.is-raw-json"]),
424-
parse: define("json/parse", ["esnext.json.parse", "es.object.keys"]),
423+
isRawJSON: define("json/is-raw-json", ["es.json.is-raw-json"]),
424+
parse: define("json/parse", ["es.json.parse", "es.object.keys"]),
425425
rawJSON: define("json/raw-json", [
426-
"esnext.json.raw-json",
426+
"es.json.raw-json",
427427
"es.object.create",
428428
"es.object.freeze",
429429
]),
430-
stringify: define(
431-
"json/stringify",
432-
["es.json.stringify", "es.date.to-json"],
433-
"es.symbol",
434-
),
430+
stringify: define("json/stringify", [
431+
"es.json.stringify",
432+
"es.date.to-json",
433+
]),
435434
},
436435

437436
Math: {

packages/babel-plugin-polyfill-corejs3/src/shipped-proposals.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,7 @@
33
export default new Set<string>([
44
"esnext.array.group",
55
"esnext.array.group-to-map",
6-
"esnext.json.is-raw-json",
7-
"esnext.json.parse",
8-
"esnext.json.raw-json",
9-
"esnext.map.get-or-insert",
10-
"esnext.map.get-or-insert-computed",
6+
"esnext.iterator.zip",
7+
"esnext.iterator.zip-keyed",
118
"esnext.symbol.metadata",
12-
"esnext.weak-map.get-or-insert",
13-
"esnext.weak-map.get-or-insert-computed",
149
]);

packages/babel-plugin-polyfill-corejs3/test/fixtures/entry-global/actual-chrome-107-corejs-3.27/output.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import "core-js/modules/es.array.push.js";
2+
import "core-js/modules/es.json.stringify.js";
23
import "core-js/modules/es.regexp.flags.js";
34
import "core-js/modules/esnext.suppressed-error.constructor.js";
45
import "core-js/modules/esnext.array.from-async.js";

packages/babel-plugin-polyfill-corejs3/test/fixtures/entry-global/actual-chrome-107-corejs-3.28/output.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import "core-js/modules/es.array.to-reversed.js";
33
import "core-js/modules/es.array.to-sorted.js";
44
import "core-js/modules/es.array.to-spliced.js";
55
import "core-js/modules/es.array.with.js";
6+
import "core-js/modules/es.json.stringify.js";
67
import "core-js/modules/es.regexp.flags.js";
78
import "core-js/modules/es.typed-array.to-reversed.js";
89
import "core-js/modules/es.typed-array.to-sorted.js";

packages/babel-plugin-polyfill-corejs3/test/fixtures/entry-global/actual-chrome-107-corejs-3.29/output.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import "core-js/modules/es.array.to-reversed.js";
33
import "core-js/modules/es.array.to-sorted.js";
44
import "core-js/modules/es.array.to-spliced.js";
55
import "core-js/modules/es.array.with.js";
6+
import "core-js/modules/es.json.stringify.js";
67
import "core-js/modules/es.regexp.flags.js";
78
import "core-js/modules/es.typed-array.to-reversed.js";
89
import "core-js/modules/es.typed-array.to-sorted.js";

packages/babel-plugin-polyfill-corejs3/test/fixtures/entry-global/actual-chrome-107-corejs-3.30/output.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import "core-js/modules/es.array.to-reversed.js";
33
import "core-js/modules/es.array.to-sorted.js";
44
import "core-js/modules/es.array.to-spliced.js";
55
import "core-js/modules/es.array.with.js";
6+
import "core-js/modules/es.json.stringify.js";
67
import "core-js/modules/es.regexp.flags.js";
78
import "core-js/modules/es.typed-array.to-reversed.js";
89
import "core-js/modules/es.typed-array.to-sorted.js";

0 commit comments

Comments
 (0)