Skip to content

Commit

Permalink
3.30.0
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock committed Apr 3, 2023
1 parent 56a31ae commit 280680b
Show file tree
Hide file tree
Showing 15 changed files with 273 additions and 127 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
## Changelog
##### Unreleased
- Nothing

##### [3.30.0 - 2023.04.04](https://github.com/zloirock/core-js/releases/tag/v3.30.0)
- Added [`URL.canParse` method](https://url.spec.whatwg.org/#dom-url-canparse), [url/763](https://github.com/whatwg/url/pull/763)
- [`Set` methods proposal](https://github.com/tc39/proposal-set-methods):
- Removed sort from `Set.prototype.intersection`, [March 2023 TC39 meeting](https://github.com/babel/proposals/issues/87#issuecomment-1478610425), [proposal-set-methods/94](https://github.com/tc39/proposal-set-methods/pull/94)
- (Async) Iterator Helpers proposals ([sync](https://github.com/tc39/proposal-iterator-helpers), [async](https://github.com/tc39/proposal-async-iterator-helpers)):
- Iterator Helpers proposals ([sync](https://github.com/tc39/proposal-iterator-helpers), [async](https://github.com/tc39/proposal-async-iterator-helpers)):
- Validate arguments before opening iterator, [March 2023 TC39 meeting](https://github.com/babel/proposals/issues/87#issuecomment-1478412430), [proposal-iterator-helpers/265](https://github.com/tc39/proposal-iterator-helpers/pull/265)
- (Async) Explicit Resource Management proposals ([sync](https://github.com/tc39/proposal-explicit-resource-management), [async](https://github.com/tc39/proposal-async-explicit-resource-management)):
- Explicit Resource Management proposals ([sync](https://github.com/tc39/proposal-explicit-resource-management), [async](https://github.com/tc39/proposal-async-explicit-resource-management)):
- `(Async)DisposableStack.prototype.move` marks the original stack as disposed, [#1226](https://github.com/zloirock/core-js/issues/1226)
- Some simplifications like [proposal-explicit-resource-management/150](https://github.com/tc39/proposal-explicit-resource-management/pull/150)
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,11 +208,11 @@ structuredClone(new Set([1, 2, 3])); // => new Set([1, 2, 3])
### Installation:[](#index)
```sh
// global version
npm install --save core-js@3.29.1
npm install --save core-js@3.30.0
// version without global namespace pollution
npm install --save core-js-pure@3.29.1
npm install --save core-js-pure@3.30.0
// bundled global version
npm install --save core-js-bundle@3.29.1
npm install --save core-js-bundle@3.30.0
```

Or you can use `core-js` [from CDN](https://www.jsdelivr.com/package/npm/core-js-bundle).
Expand Down Expand Up @@ -309,9 +309,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.29'`.
[`@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'`.

> **Warning!** Recommended to specify used minor `core-js` version, like `corejs: '3.29'`, 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.30'`, 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 @@ -366,7 +366,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.29', 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.30', 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 @@ -402,7 +402,7 @@ Fast JavaScript transpiler `swc` [contains integration with `core-js`](https://s
"env": {
"targets": "> 0.25%, not dead",
"mode": "entry",
"coreJs": "3.29"
"coreJs": "3.30"
}
}
```
Expand Down
2 changes: 1 addition & 1 deletion deno/corejs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

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

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

Expand Down
Loading

0 comments on commit 280680b

Please sign in to comment.