Skip to content

Commit

Permalink
3.31.0
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock committed Jun 11, 2023
1 parent 12b11cf commit 199c633
Show file tree
Hide file tree
Showing 18 changed files with 1,405 additions and 992 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
## Changelog
##### Unreleased
- Nothing

##### [3.31.0 - 2023.06.12](https://github.com/zloirock/core-js/releases/tag/v3.31.0)
- [Well-formed unicode strings proposal](https://github.com/tc39/proposal-is-usv-string):
- Methods:
- `String.prototype.isWellFormed` method
Expand Down Expand Up @@ -29,7 +32,7 @@
- Fixed awaiting async `AsyncDisposableStack.prototype.adopt` callback, [#1258](https://github.com/zloirock/core-js/issues/1258)
- Fixed `URLSearchParams#size` in ES3 engines (IE8-)
- Added a workaround in `Object.{ entries, values }` for some IE versions bug with invisible integer keys on `null`-prototype objects
- Added TypeScript definitions to `core-js-compat`, [#1235](https://github.com/zloirock/core-js/issues/1235), thanks [@susnux](https://github.com/susnux)
- Added TypeScript definitions to `core-js-compat`, [#1235](https://github.com/zloirock/core-js/issues/1235), thanks [**@susnux**](https://github.com/susnux)
- Compat data improvements:
- [`Set.prototype.difference`](https://github.com/tc39/proposal-set-methods) that was missed in Bun because of [a bug](https://github.com/oven-sh/bun/issues/2309) added in 0.6.0
- `Array.prototype.{ group, groupToMap }` marked as no longer supported in WebKit runtimes because of the mentioned above web compat issue. For example, it's disabled from Bun 0.6.2
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,11 +209,11 @@ structuredClone(new Set([1, 2, 3])); // => new Set([1, 2, 3])
### Installation:[](#index)
```sh
// global version
npm install --save core-js@3.30.2
npm install --save core-js@3.31.0
// version without global namespace pollution
npm install --save core-js-pure@3.30.2
npm install --save core-js-pure@3.31.0
// bundled global version
npm install --save core-js-bundle@3.30.2
npm install --save core-js-bundle@3.31.0
```

Or you can use `core-js` [from CDN](https://www.jsdelivr.com/package/npm/core-js-bundle).
Expand Down Expand Up @@ -310,9 +310,9 @@ import 'regenerator-runtime/runtime';

#### `@babel/preset-env`[](#index)

[`@babel/preset-env`](https://github.com/babel/babel/tree/master/packages/babel-preset-env) has `useBuiltIns` option, which optimizes working with global version of `core-js`. With `useBuiltIns` option, you should also set `corejs` option to used version of `core-js`, like `corejs: '3.30'`.
[`@babel/preset-env`](https://github.com/babel/babel/tree/master/packages/babel-preset-env) has `useBuiltIns` option, which optimizes working with global version of `core-js`. With `useBuiltIns` option, you should also set `corejs` option to used version of `core-js`, like `corejs: '3.31'`.

> **Warning!** Recommended to specify used minor `core-js` version, like `corejs: '3.30'`, instead of `corejs: 3`, since with `corejs: 3` will not be injected modules which were added in minor `core-js` releases.
> **Warning!** Recommended to specify used minor `core-js` version, like `corejs: '3.31'`, instead of `corejs: 3`, since with `corejs: 3` will not be injected modules which were added in minor `core-js` releases.
- `useBuiltIns: 'entry'` replaces imports of `core-js` to import only required for a target environment modules. So, for example,
```js
Expand Down Expand Up @@ -367,7 +367,7 @@ import 'core-js/modules/es.array.of';
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 `proposals` option, as `corejs: { version: '3.30', proposals: true }`.
By default, `@babel/preset-env` with `useBuiltIns: 'usage'` option only polyfills stable features, but you can enable polyfilling of proposals by `proposals` option, as `corejs: { version: '3.31', proposals: true }`.

> **Warning!** In the case of `useBuiltIns: 'usage'`, you should not add `core-js` imports by yourself, they will be added automatically.
Expand Down Expand Up @@ -403,7 +403,7 @@ Fast JavaScript transpiler `swc` [contains integration with `core-js`](https://s
"env": {
"targets": "> 0.25%, not dead",
"mode": "entry",
"coreJs": "3.30"
"coreJs": "3.31"
}
}
```
Expand Down
2 changes: 1 addition & 1 deletion deno/corejs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

*Example*:
```js
import 'https://deno.land/x/corejs@v3.30.2/index.js'; // <- at the top of your entry point
import 'https://deno.land/x/corejs@v3.31.0/index.js'; // <- at the top of your entry point

Object.hasOwn({ foo: 42 }, 'foo'); // => true

Expand Down

0 comments on commit 199c633

Please sign in to comment.