Skip to content

Commit

Permalink
3.29.0
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock committed Feb 26, 2023
1 parent 615d44e commit 8c77615
Show file tree
Hide file tree
Showing 15 changed files with 107 additions and 66 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.29.0 - 2023.02.27](https://github.com/zloirock/core-js/releases/tag/v3.29.0)
- Added `URLSearchParams.prototype.size` getter, [url/734](https://github.com/whatwg/url/pull/734)
- Allowed cloning resizable `ArrayBuffer`s in the `structuredClone` polyfill
- Fixed wrong export in `/(stable|actual|full)/instance/unshift` entries, [#1207](https://github.com/zloirock/core-js/issues/1207)
Expand Down
14 changes: 7 additions & 7 deletions ORIGINAL_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.28.0
npm install --save core-js@3.29.0
// version without global namespace pollution
npm install --save core-js-pure@3.28.0
npm install --save core-js-pure@3.29.0
// bundled global version
npm install --save core-js-bundle@3.28.0
npm install --save core-js-bundle@3.29.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.28'`.
[`@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'`.

> **Warning!** Recommended to specify used minor `core-js` version, like `corejs: '3.28'`, 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.29'`, 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.28', 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.29', 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.28"
"coreJs": "3.29"
}
}
```
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.28.0/index.js'; // <- at the top of your entry point
import 'https://deno.land/x/corejs@v3.29.0/index.js'; // <- at the top of your entry point

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

Expand Down
74 changes: 47 additions & 27 deletions deno/corejs/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* core-js 3.28.0
* core-js 3.29.0
* © 2014-2023 Denis Pushkarev (zloirock.ru)
* license: https://github.com/zloirock/core-js/blob/v3.28.0/LICENSE
* license: https://github.com/zloirock/core-js/blob/v3.29.0/LICENSE
* source: https://github.com/zloirock/core-js
*/
!function (undefined) { 'use strict'; /******/ (function(modules) { // webpackBootstrap
Expand Down Expand Up @@ -277,7 +277,8 @@ __webpack_require__(433);
__webpack_require__(434);
__webpack_require__(435);
__webpack_require__(440);
module.exports = __webpack_require__(441);
__webpack_require__(441);
module.exports = __webpack_require__(442);


/***/ }),
Expand Down Expand Up @@ -942,10 +943,10 @@ var store = __webpack_require__(36);
(module.exports = function (key, value) {
return store[key] || (store[key] = value !== undefined ? value : {});
})('versions', []).push({
version: '3.28.0',
version: '3.29.0',
mode: IS_PURE ? 'pure' : 'global',
copyright: '© 2014-2023 Denis Pushkarev (zloirock.ru)',
license: 'https://github.com/zloirock/core-js/blob/v3.28.0/LICENSE',
license: 'https://github.com/zloirock/core-js/blob/v3.29.0/LICENSE',
source: 'https://github.com/zloirock/core-js'
});

Expand Down Expand Up @@ -9435,31 +9436,21 @@ Context.prototype = {
var i = this.skip(IS_WHITESPACE, this.index);
var fork = this.fork(i);
var chr = at(source, i);
var result;
if (exec(IS_NUMBER_START, chr)) result = fork.number();
else switch (chr) {
if (exec(IS_NUMBER_START, chr)) return fork.number();
switch (chr) {
case '{':
result = fork.object();
break;
return fork.object();
case '[':
result = fork.array();
break;
return fork.array();
case '"':
result = fork.string();
break;
return fork.string();
case 't':
result = fork.keyword(true);
break;
return fork.keyword(true);
case 'f':
result = fork.keyword(false);
break;
return fork.keyword(false);
case 'n':
result = fork.keyword(null);
break;
default:
throw SyntaxError('Unexpected character: "' + chr + '" at: ' + i);
}
return result;
return fork.keyword(null);
} throw SyntaxError('Unexpected character: "' + chr + '" at: ' + i);
},
node: function (type, value, start, end, nodes) {
return new Node(value, end, type ? null : slice(this.source, start, end), nodes);
Expand Down Expand Up @@ -13951,7 +13942,7 @@ var structuredCloneInternal = function (value, map) {

var type = classof(value);
var deep = false;
var C, name, cloned, dataTransfer, i, length, keys, key, source, target;
var C, name, cloned, dataTransfer, i, length, keys, key, source, target, options;

switch (type) {
case 'Array':
Expand Down Expand Up @@ -14106,11 +14097,12 @@ var structuredCloneInternal = function (value, map) {
if (!C && typeof value.slice != 'function') throwUnpolyfillable(type);
// detached buffers throws in `DataView` and `.slice`
try {
if (typeof value.slice == 'function') {
if (typeof value.slice == 'function' && !value.resizable) {
cloned = value.slice(0);
} else {
length = value.byteLength;
cloned = new ArrayBuffer(length);
options = 'maxByteLength' in value ? { maxByteLength: value.maxByteLength } : undefined;
cloned = new ArrayBuffer(length, options);
source = new C(value);
target = new C(cloned);
for (i = 0; i < length; i++) {
Expand Down Expand Up @@ -14305,5 +14297,33 @@ $({ global: true, enumerable: true, sham: !PROPER_TRANSFER, forced: FORCED_REPLA
});


/***/ }),
/* 442 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var DESCRIPTORS = __webpack_require__(5);
var uncurryThis = __webpack_require__(13);
var defineBuiltInAccessor = __webpack_require__(119);

var URLSearchParamsPrototype = URLSearchParams.prototype;
var forEach = uncurryThis(URLSearchParamsPrototype.forEach);

// `URLSearchParams.prototype.size` getter
// https://github.com/whatwg/url/pull/734
if (DESCRIPTORS && !('size' in URLSearchParamsPrototype)) {
defineBuiltInAccessor(URLSearchParamsPrototype, 'size', {
get: function size() {
var count = 0;
forEach(this, function () { count++; });
return count;
},
configurable: true,
enumerable: true
});
}


/***/ })
/******/ ]); }();
31 changes: 23 additions & 8 deletions docs/compat/compat-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -5981,22 +5981,34 @@
"esnext.set.filter": {},
"esnext.set.find": {},
"esnext.set.from": {},
"esnext.set.intersection.v2": {},
"esnext.set.intersection.v2": {
"bun": "0.5.7"
},
"esnext.set.intersection": {},
"esnext.set.is-disjoint-from.v2": {},
"esnext.set.is-disjoint-from.v2": {
"bun": "0.5.7"
},
"esnext.set.is-disjoint-from": {},
"esnext.set.is-subset-of.v2": {},
"esnext.set.is-subset-of.v2": {
"bun": "0.5.7"
},
"esnext.set.is-subset-of": {},
"esnext.set.is-superset-of.v2": {},
"esnext.set.is-superset-of.v2": {
"bun": "0.5.7"
},
"esnext.set.is-superset-of": {},
"esnext.set.join": {},
"esnext.set.map": {},
"esnext.set.of": {},
"esnext.set.reduce": {},
"esnext.set.some": {},
"esnext.set.symmetric-difference.v2": {},
"esnext.set.symmetric-difference.v2": {
"bun": "0.5.7"
},
"esnext.set.symmetric-difference": {},
"esnext.set.union.v2": {},
"esnext.set.union.v2": {
"bun": "0.5.7"
},
"esnext.set.union": {},
"esnext.string.at": {},
"esnext.string.cooked": {},
Expand Down Expand Up @@ -6049,7 +6061,9 @@
"safari": "13.1",
"samsung": "14.0"
},
"esnext.string.to-well-formed": {},
"esnext.string.to-well-formed": {
"bun": "0.5.7"
},
"esnext.symbol.async-dispose": {},
"esnext.symbol.dispose": {},
"esnext.symbol.is-registered": {},
Expand Down Expand Up @@ -6535,5 +6549,6 @@
"quest": "6.0",
"safari": "14.0",
"samsung": "9.0"
}
},
"web.url-search-params.size": {}
}
5 changes: 4 additions & 1 deletion docs/compat/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -1945,5 +1945,8 @@ GLOBAL.tests = {
'web.url.to-json': [URL_AND_URL_SEARCH_PARAMS_SUPPORT, function () {
return URL.prototype.toJSON;
}],
'web.url-search-params.constructor': URL_AND_URL_SEARCH_PARAMS_SUPPORT
'web.url-search-params.constructor': URL_AND_URL_SEARCH_PARAMS_SUPPORT,
'web.url-search-params.size': [URL_AND_URL_SEARCH_PARAMS_SUPPORT, function () {
return 'size' in URLSearchParams.prototype;
}]
};
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "3.28.0",
"version": "3.29.0",
"repository": {
"type": "git",
"url": "https://github.com/zloirock/core-js.git"
Expand Down
6 changes: 3 additions & 3 deletions packages/core-js-builder/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "core-js-builder",
"version": "3.28.0",
"version": "3.29.0",
"description": "core-js builder",
"repository": {
"type": "git",
Expand All @@ -21,8 +21,8 @@
"main": "index.js",
"types": "index.d.ts",
"dependencies": {
"core-js": "3.28.0",
"core-js-compat": "3.28.0",
"core-js": "3.29.0",
"core-js-compat": "3.29.0",
"mkdirp": ">=0.5.5 <1",
"webpack": ">=4.46.0 <5"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/core-js-bundle/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "core-js-bundle",
"version": "3.28.0",
"version": "3.29.0",
"description": "Standard library",
"keywords": [
"ES3",
Expand Down
6 changes: 3 additions & 3 deletions packages/core-js-compat/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const {
exclude: [ // optional list / filter of modules to exclude, the signature is similar to `modules` option
'web.atob',
],
version: '3.28', // used `core-js` version, by default - the latest
version: '3.29', // used `core-js` version, by default - the latest
inverse: false, // inverse of the result - shows modules that are NOT required for the target environment
});

Expand Down Expand Up @@ -125,9 +125,9 @@ 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:
require('core-js-compat/get-modules-list-for-target-version')('3.28'); // => Array<ModuleName>
require('core-js-compat/get-modules-list-for-target-version')('3.29'); // => Array<ModuleName>
// or
require('core-js-compat').getModulesListForTargetVersion('3.28'); // => Array<ModuleName>
require('core-js-compat').getModulesListForTargetVersion('3.29'); // => 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/compat/), the example:
Expand Down
2 changes: 1 addition & 1 deletion packages/core-js-compat/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "core-js-compat",
"version": "3.28.0",
"version": "3.29.0",
"description": "core-js compat",
"repository": {
"type": "git",
Expand Down

0 comments on commit 8c77615

Please sign in to comment.