Skip to content

Commit

Permalink
3.20.0
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock committed Dec 15, 2021
1 parent 65a85a4 commit 29590d0
Show file tree
Hide file tree
Showing 13 changed files with 2,417 additions and 1,013 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
## Changelog
##### Unreleased
- Nothing

##### 3.20.0 - 2021.12.16
- Added `structuredClone` method [from the HTML spec](https://html.spec.whatwg.org/multipage/structured-data.html#dom-structuredclone), [see MDN](https://developer.mozilla.org/en-US/docs/Web/API/structuredClone)
- Includes all cases of cloning and transferring of required ECMAScript and platform types that can be polyfilled, for the details see [the caveats](https://github.com/zloirock/core-js#caveats-when-using-structuredclone-polyfill)
- Uses native structured cloning algorithm implementations where it's possible
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,14 +175,14 @@ queueMicrotask(() => console.log('called as microtask'));
### Installation:[](#index)
```
// global version
npm install --save core-js@3.19.3
npm install --save core-js@3.20.0
// version without global namespace pollution
npm install --save core-js-pure@3.19.3
npm install --save core-js-pure@3.20.0
// bundled global version
npm install --save core-js-bundle@3.19.3
npm install --save core-js-bundle@3.20.0
```

Already bundled version of `core-js` [on CDN](https://unpkg.com/core-js-bundle@3.19.3) ([minified version](https://unpkg.com/core-js-bundle@3.19.3/minified.js)).
Already bundled version of `core-js` [on CDN](https://unpkg.com/core-js-bundle@3.20.0) ([minified version](https://unpkg.com/core-js-bundle@3.20.0/minified.js)).

### `postinstall` message[](#index)
The `core-js` project needs your help, so the package shows a message about it after installation. If it causes problems for you, you can disable it:
Expand Down Expand Up @@ -276,9 +276,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.19'`.
[`@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.20'`.

> **Warning!** Recommended to specify used minor `core-js` version, like `corejs: '3.19'`, 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.20'`, 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 @@ -333,7 +333,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.19', 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.20', proposals: true }`.

#### `@babel/runtime`[](#index)

Expand Down
2 changes: 1 addition & 1 deletion deno/corejs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

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

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

Expand Down
Loading

0 comments on commit 29590d0

Please sign in to comment.