mirror of
https://github.com/hanzoai/core-js.git
synced 2026-09-24 16:58:15 +00:00
v3.49.0
This commit is contained in:
+5
-1
@@ -1,11 +1,15 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
### Unreleased
|
### Unreleased
|
||||||
- Improved performance of `atob`, `btoa`, `Uint8Array.fromHex`, `Uint8Array.prototype.setFromHex`, and `Uint8Array.prototype.toHex`, [#1503](https://github.com/zloirock/core-js/issues/1503), [#1464](https://github.com/zloirock/core-js/issues/1464), [#1510](https://github.com/zloirock/core-js/issues/1510)
|
- Nothing
|
||||||
|
|
||||||
|
### [3.49.0 - 2026.03.16](https://github.com/zloirock/core-js/releases/tag/v3.49.0)
|
||||||
|
- Changes [v3.48.0...v3.49.0](https://github.com/zloirock/core-js/compare/v3.48.0...v3.49.0) (373 commits)
|
||||||
- [`Iterator.range`](https://github.com/tc39/proposal-iterator.range) updated following the actual spec version
|
- [`Iterator.range`](https://github.com/tc39/proposal-iterator.range) updated following the actual spec version
|
||||||
- Throw a `RangeError` on `NaN` `start` / `end` / `step`
|
- Throw a `RangeError` on `NaN` `start` / `end` / `step`
|
||||||
- Allow `null` as `optionOrStep`
|
- Allow `null` as `optionOrStep`
|
||||||
- Improved accuracy of `Math.{ asinh, atanh }` polyfills with big and small values
|
- Improved accuracy of `Math.{ asinh, atanh }` polyfills with big and small values
|
||||||
- Improved accuracy of `Number.prototype.toExponential` polyfills with big and small values
|
- Improved accuracy of `Number.prototype.toExponential` polyfills with big and small values
|
||||||
|
- Improved performance of `atob`, `btoa`, `Uint8Array.fromHex`, `Uint8Array.prototype.setFromHex`, and `Uint8Array.prototype.toHex`, [#1503](https://github.com/zloirock/core-js/issues/1503), [#1464](https://github.com/zloirock/core-js/issues/1464), [#1510](https://github.com/zloirock/core-js/issues/1510), thanks [**@johnzhou721**](https://github.com/johnzhou721)
|
||||||
- Minor performance optimization polyfills of methods from [`Map` upsert proposal](https://github.com/tc39/proposal-upsert)
|
- Minor performance optimization polyfills of methods from [`Map` upsert proposal](https://github.com/tc39/proposal-upsert)
|
||||||
- Polyfills of methods from [`Map` upsert proposal](https://github.com/tc39/proposal-upsert) from the pure version made generic to make it work with polyfilled and native collections
|
- Polyfills of methods from [`Map` upsert proposal](https://github.com/tc39/proposal-upsert) from the pure version made generic to make it work with polyfilled and native collections
|
||||||
- Wrap `Symbol.for` in `Symbol.prototype.description` polyfill for correct handling of empty string descriptions
|
- Wrap `Symbol.for` in `Symbol.prototype.description` polyfill for correct handling of empty string descriptions
|
||||||
|
|||||||
@@ -220,11 +220,11 @@ structuredClone(new Set([1, 2, 3])); // => new Set([1, 2, 3])
|
|||||||
### Installation:[⬆](#index)
|
### Installation:[⬆](#index)
|
||||||
```sh
|
```sh
|
||||||
// global version
|
// global version
|
||||||
npm install --save [email protected]8.0
|
npm install --save [email protected]9.0
|
||||||
// version without global namespace pollution
|
// version without global namespace pollution
|
||||||
npm install --save [email protected]8.0
|
npm install --save [email protected]9.0
|
||||||
// bundled global version
|
// bundled global version
|
||||||
npm install --save [email protected]8.0
|
npm install --save [email protected]9.0
|
||||||
```
|
```
|
||||||
|
|
||||||
### `postinstall` message[⬆](#index)
|
### `postinstall` message[⬆](#index)
|
||||||
@@ -320,10 +320,10 @@ import 'regenerator-runtime/runtime';
|
|||||||
|
|
||||||
#### `@babel/preset-env`[⬆](#index)
|
#### `@babel/preset-env`[⬆](#index)
|
||||||
|
|
||||||
[`@babel/preset-env`](https://github.com/babel/babel/tree/master/packages/babel-preset-env) has `useBuiltIns` option, which optimizes the use of the global version of `core-js`. With `useBuiltIns` option, you should also set `corejs` option to the used version of `core-js`, like `corejs: '3.48'`.
|
[`@babel/preset-env`](https://github.com/babel/babel/tree/master/packages/babel-preset-env) has `useBuiltIns` option, which optimizes the use of the global version of `core-js`. With `useBuiltIns` option, you should also set `corejs` option to the used version of `core-js`, like `corejs: '3.49'`.
|
||||||
|
|
||||||
> [!IMPORTANT]
|
> [!IMPORTANT]
|
||||||
> It is recommended to specify the used minor `core-js` version, like `corejs: '3.48'`, instead of `corejs: 3`, since with `corejs: 3` will not be injected modules which were added in minor `core-js` releases.
|
> It is recommended to specify the used minor `core-js` version, like `corejs: '3.49'`, instead of `corejs: 3`, since with `corejs: 3` will not be injected modules which were added in minor `core-js` releases.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -384,7 +384,7 @@ import 'core-js/modules/es.array.of';
|
|||||||
var array = Array.of(1, 2, 3);
|
var array = Array.of(1, 2, 3);
|
||||||
```
|
```
|
||||||
|
|
||||||
By default, `@babel/preset-env` with `useBuiltIns: 'usage'` option only polyfills stable features, but you can enable polyfilling of proposals by the `proposals` option, as `corejs: { version: '3.48', proposals: true }`.
|
By default, `@babel/preset-env` with `useBuiltIns: 'usage'` option only polyfills stable features, but you can enable polyfilling of proposals by the `proposals` option, as `corejs: { version: '3.49', proposals: true }`.
|
||||||
|
|
||||||
> [!IMPORTANT]
|
> [!IMPORTANT]
|
||||||
> In the case of `useBuiltIns: 'usage'`, you should not add `core-js` imports by yourself, they will be added automatically.
|
> In the case of `useBuiltIns: 'usage'`, you should not add `core-js` imports by yourself, they will be added automatically.
|
||||||
@@ -422,7 +422,7 @@ Fast JavaScript transpiler `swc` [contains integration with `core-js`](https://s
|
|||||||
"env": {
|
"env": {
|
||||||
"targets": "> 0.25%, not dead",
|
"targets": "> 0.25%, not dead",
|
||||||
"mode": "entry",
|
"mode": "entry",
|
||||||
"coreJs": "3.48"
|
"coreJs": "3.49"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
*Example*:
|
*Example*:
|
||||||
```js
|
```js
|
||||||
import 'https://deno.land/x/[email protected]8.0/index.js'; // <- at the top of your entry point
|
import 'https://deno.land/x/[email protected]9.0/index.js'; // <- at the top of your entry point
|
||||||
|
|
||||||
Object.hasOwn({ foo: 42 }, 'foo'); // => true
|
Object.hasOwn({ foo: 42 }, 'foo'); // => true
|
||||||
|
|
||||||
|
|||||||
+928
-788
File diff suppressed because it is too large
Load Diff
@@ -2,11 +2,11 @@
|
|||||||
## Installation
|
## Installation
|
||||||
```sh
|
```sh
|
||||||
// global version
|
// global version
|
||||||
npm install --save [email protected]8.0
|
npm install --save [email protected]9.0
|
||||||
// version without global namespace pollution
|
// version without global namespace pollution
|
||||||
npm install --save [email protected]8.0
|
npm install --save [email protected]9.0
|
||||||
// bundled global version
|
// bundled global version
|
||||||
npm install --save [email protected]8.0
|
npm install --save [email protected]9.0
|
||||||
```
|
```
|
||||||
|
|
||||||
## Entry points
|
## Entry points
|
||||||
@@ -92,10 +92,10 @@ import 'regenerator-runtime/runtime';
|
|||||||
|
|
||||||
## `@babel/preset-env`
|
## `@babel/preset-env`
|
||||||
|
|
||||||
[`@babel/preset-env`](https://github.com/babel/babel/tree/master/packages/babel-preset-env) has `useBuiltIns` option, which optimizes the use of the global version of `core-js`. With `useBuiltIns` option, you should also set `corejs` option to the used version of `core-js`, like `corejs: '3.48'`.
|
[`@babel/preset-env`](https://github.com/babel/babel/tree/master/packages/babel-preset-env) has `useBuiltIns` option, which optimizes the use of the global version of `core-js`. With `useBuiltIns` option, you should also set `corejs` option to the used version of `core-js`, like `corejs: '3.49'`.
|
||||||
|
|
||||||
> [!IMPORTANT]
|
> [!IMPORTANT]
|
||||||
> It is recommended to specify the used minor `core-js` version, like `corejs: '3.48'`, instead of `corejs: 3`, since with `corejs: 3` will not be injected modules which were added in minor `core-js` releases.
|
> It is recommended to specify the used minor `core-js` version, like `corejs: '3.49'`, instead of `corejs: 3`, since with `corejs: 3` will not be injected modules which were added in minor `core-js` releases.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -156,7 +156,7 @@ import 'core-js/modules/es.array.of';
|
|||||||
var array = Array.of(1, 2, 3);
|
var array = Array.of(1, 2, 3);
|
||||||
```
|
```
|
||||||
|
|
||||||
By default, `@babel/preset-env` with `useBuiltIns: 'usage'` option only polyfills stable features, but you can enable polyfilling of proposals by the `proposals` option, as `corejs: { version: '3.48', proposals: true }`.
|
By default, `@babel/preset-env` with `useBuiltIns: 'usage'` option only polyfills stable features, but you can enable polyfilling of proposals by the `proposals` option, as `corejs: { version: '3.49', proposals: true }`.
|
||||||
|
|
||||||
> [!IMPORTANT]
|
> [!IMPORTANT]
|
||||||
> In the case of `useBuiltIns: 'usage'`, you should not add `core-js` imports by yourself, they will be added automatically.
|
> In the case of `useBuiltIns: 'usage'`, you should not add `core-js` imports by yourself, they will be added automatically.
|
||||||
@@ -194,7 +194,7 @@ Fast JavaScript transpiler `swc` [contains integration with `core-js`](https://s
|
|||||||
"env": {
|
"env": {
|
||||||
"targets": "> 0.25%, not dead",
|
"targets": "> 0.25%, not dead",
|
||||||
"mode": "entry",
|
"mode": "entry",
|
||||||
"coreJs": "3.48"
|
"coreJs": "3.49"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
Generated
+9
-9
@@ -1,11 +1,11 @@
|
|||||||
{
|
{
|
||||||
"name": "core-js",
|
"name": "core-js",
|
||||||
"version": "3.48.0",
|
"version": "3.49.0",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"version": "3.48.0",
|
"version": "3.49.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"workspaces": [
|
"workspaces": [
|
||||||
"./packages/*"
|
"./packages/*"
|
||||||
@@ -5890,7 +5890,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"packages/core-js": {
|
"packages/core-js": {
|
||||||
"version": "3.48.0",
|
"version": "3.49.0",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"funding": {
|
"funding": {
|
||||||
@@ -5899,11 +5899,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"packages/core-js-builder": {
|
"packages/core-js-builder": {
|
||||||
"version": "3.48.0",
|
"version": "3.49.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"core-js": "3.48.0",
|
"core-js": "3.49.0",
|
||||||
"core-js-compat": "3.48.0",
|
"core-js-compat": "3.49.0",
|
||||||
"mkdirp": ">=0.5.6 <1",
|
"mkdirp": ">=0.5.6 <1",
|
||||||
"webpack": ">=4.47.0 <5"
|
"webpack": ">=4.47.0 <5"
|
||||||
},
|
},
|
||||||
@@ -5916,7 +5916,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"packages/core-js-bundle": {
|
"packages/core-js-bundle": {
|
||||||
"version": "3.48.0",
|
"version": "3.49.0",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"funding": {
|
"funding": {
|
||||||
@@ -5925,7 +5925,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"packages/core-js-compat": {
|
"packages/core-js-compat": {
|
||||||
"version": "3.48.0",
|
"version": "3.49.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"browserslist": "^4.28.1"
|
"browserslist": "^4.28.1"
|
||||||
@@ -5936,7 +5936,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"packages/core-js-pure": {
|
"packages/core-js-pure": {
|
||||||
"version": "3.48.0",
|
"version": "3.49.0",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"funding": {
|
"funding": {
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"version": "3.48.0",
|
"version": "3.49.0",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/zloirock/core-js.git"
|
"url": "https://github.com/zloirock/core-js.git"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "core-js-builder",
|
"name": "core-js-builder",
|
||||||
"version": "3.48.0",
|
"version": "3.49.0",
|
||||||
"type": "commonjs",
|
"type": "commonjs",
|
||||||
"description": "core-js builder",
|
"description": "core-js builder",
|
||||||
"repository": {
|
"repository": {
|
||||||
@@ -26,8 +26,8 @@
|
|||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"types": "index.d.ts",
|
"types": "index.d.ts",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"core-js": "3.48.0",
|
"core-js": "3.49.0",
|
||||||
"core-js-compat": "3.48.0",
|
"core-js-compat": "3.49.0",
|
||||||
"mkdirp": ">=0.5.6 <1",
|
"mkdirp": ">=0.5.6 <1",
|
||||||
"webpack": ">=4.47.0 <5"
|
"webpack": ">=4.47.0 <5"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "core-js-bundle",
|
"name": "core-js-bundle",
|
||||||
"version": "3.48.0",
|
"version": "3.49.0",
|
||||||
"type": "commonjs",
|
"type": "commonjs",
|
||||||
"description": "Standard library",
|
"description": "Standard library",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ const {
|
|||||||
exclude: [ // optional list / filter of modules to exclude, the signature is similar to `modules` option
|
exclude: [ // optional list / filter of modules to exclude, the signature is similar to `modules` option
|
||||||
'web.atob',
|
'web.atob',
|
||||||
],
|
],
|
||||||
version: '3.48', // used `core-js` version, by default - the latest
|
version: '3.49', // used `core-js` version, by default - the latest
|
||||||
inverse: false, // inverse of the result - shows modules that are NOT required for the target environment
|
inverse: false, // inverse of the result - shows modules that are NOT required for the target environment
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -129,9 +129,9 @@ require('core-js-compat/modules'); // => Array<ModuleName>
|
|||||||
require('core-js-compat').modules; // => Array<ModuleName>
|
require('core-js-compat').modules; // => Array<ModuleName>
|
||||||
|
|
||||||
// the subset of modules which available in the passed `core-js` version:
|
// the subset of modules which available in the passed `core-js` version:
|
||||||
require('core-js-compat/get-modules-list-for-target-version')('3.48'); // => Array<ModuleName>
|
require('core-js-compat/get-modules-list-for-target-version')('3.49'); // => Array<ModuleName>
|
||||||
// or
|
// or
|
||||||
require('core-js-compat').getModulesListForTargetVersion('3.48'); // => Array<ModuleName>
|
require('core-js-compat').getModulesListForTargetVersion('3.49'); // => Array<ModuleName>
|
||||||
```
|
```
|
||||||
|
|
||||||
If you wanna help to improve this data, you could take a look at the related section of [`CONTRIBUTING.md`](https://github.com/zloirock/core-js/blob/master/CONTRIBUTING.md#how-to-update-core-js-compat-data). The visualization of compatibility data and the browser tests runner is available [here](http://zloirock.github.io/core-js/master/compat/), the example:
|
If you wanna help to improve this data, you could take a look at the related section of [`CONTRIBUTING.md`](https://github.com/zloirock/core-js/blob/master/CONTRIBUTING.md#how-to-update-core-js-compat-data). The visualization of compatibility data and the browser tests runner is available [here](http://zloirock.github.io/core-js/master/compat/), the example:
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "core-js-compat",
|
"name": "core-js-compat",
|
||||||
"version": "3.48.0",
|
"version": "3.49.0",
|
||||||
"type": "commonjs",
|
"type": "commonjs",
|
||||||
"description": "core-js compat",
|
"description": "core-js compat",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "core-js-pure",
|
"name": "core-js-pure",
|
||||||
"version": "3.48.0",
|
"version": "3.49.0",
|
||||||
"type": "commonjs",
|
"type": "commonjs",
|
||||||
"description": "Standard library",
|
"description": "Standard library",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
|||||||
@@ -7,9 +7,9 @@ var SHARED = '__core-js_shared__';
|
|||||||
var store = module.exports = globalThis[SHARED] || defineGlobalProperty(SHARED, {});
|
var store = module.exports = globalThis[SHARED] || defineGlobalProperty(SHARED, {});
|
||||||
|
|
||||||
(store.versions || (store.versions = [])).push({
|
(store.versions || (store.versions = [])).push({
|
||||||
version: '3.48.0',
|
version: '3.49.0',
|
||||||
mode: IS_PURE ? 'pure' : 'global',
|
mode: IS_PURE ? 'pure' : 'global',
|
||||||
copyright: '© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.',
|
copyright: '© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.',
|
||||||
license: 'https://github.com/zloirock/core-js/blob/v3.48.0/LICENSE',
|
license: 'https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE',
|
||||||
source: 'https://github.com/zloirock/core-js'
|
source: 'https://github.com/zloirock/core-js'
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "core-js",
|
"name": "core-js",
|
||||||
"version": "3.48.0",
|
"version": "3.49.0",
|
||||||
"type": "commonjs",
|
"type": "commonjs",
|
||||||
"description": "Standard library",
|
"description": "Standard library",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
|||||||
Reference in New Issue
Block a user