From d59e440f1472cef63579edd511a8ea1ffa474f69 Mon Sep 17 00:00:00 2001 From: Denis Pushkarev Date: Mon, 3 Oct 2022 01:01:49 +0700 Subject: [PATCH] 3.25.4 --- CHANGELOG.md | 3 +++ README.md | 6 +++--- deno/corejs/README.md | 2 +- deno/corejs/index.js | 31 +++++++++++++++++---------- docs/compat/compat-data.js | 12 +++++++++-- package.json | 2 +- packages/core-js-builder/package.json | 6 +++--- packages/core-js-bundle/package.json | 2 +- packages/core-js-compat/package.json | 2 +- packages/core-js-pure/package.json | 2 +- packages/core-js/internals/shared.js | 4 ++-- packages/core-js/package.json | 2 +- 12 files changed, 47 insertions(+), 27 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 94bc6394e466..8be211c7b3ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ ## Changelog ##### Unreleased +- Nothing + +##### [3.25.4 - 2022.10.03](https://github.com/zloirock/core-js/releases/tag/v3.25.4) - Added a workaround of a Nashorn bug with `Function.prototype.{ call, apply, bind }` on string methods, [#1128](https://github.com/zloirock/core-js/issues/1128) - Updated lists of `[Serializable]` and `[Transferable]` objects in the `structuredClone` polyfill. Mainly, for better error messages if polyfilling of cloning such types is impossible - `Array.prototype.{ group, groupToMap }` marked as [supported from V8 ~ Chromium 108](https://chromestatus.com/feature/5714791975878656) diff --git a/README.md b/README.md index 07c99d23701a..8c0d2c98bd1e 100644 --- a/README.md +++ b/README.md @@ -176,11 +176,11 @@ queueMicrotask(() => console.log('called as microtask')); ### Installation:[⬆](#index) ``` // global version -npm install --save core-js@3.25.3 +npm install --save core-js@3.25.4 // version without global namespace pollution -npm install --save core-js-pure@3.25.3 +npm install --save core-js-pure@3.25.4 // bundled global version -npm install --save core-js-bundle@3.25.3 +npm install --save core-js-bundle@3.25.4 ``` Or you can use `core-js` [from CDN](https://www.jsdelivr.com/package/npm/core-js-bundle). diff --git a/deno/corejs/README.md b/deno/corejs/README.md index a17655b9072f..d703ed02c5f4 100644 --- a/deno/corejs/README.md +++ b/deno/corejs/README.md @@ -24,7 +24,7 @@ *Example*: ```js -import 'https://deno.land/x/corejs@v3.25.3/index.js'; // <- at the top of your entry point +import 'https://deno.land/x/corejs@v3.25.4/index.js'; // <- at the top of your entry point Object.hasOwn({ foo: 42 }, 'foo'); // => true diff --git a/deno/corejs/index.js b/deno/corejs/index.js index 65576c5822cf..b7bb086d5a2d 100644 --- a/deno/corejs/index.js +++ b/deno/corejs/index.js @@ -1,7 +1,7 @@ /** - * core-js 3.25.3 + * core-js 3.25.4 * © 2014-2022 Denis Pushkarev (zloirock.ru) - * license: https://github.com/zloirock/core-js/blob/v3.25.3/LICENSE + * license: https://github.com/zloirock/core-js/blob/v3.25.4/LICENSE * source: https://github.com/zloirock/core-js */ !function (undefined) { 'use strict'; /******/ (function(modules) { // webpackBootstrap @@ -552,17 +552,19 @@ module.exports = fails(function () { var NATIVE_BIND = __webpack_require__(8); -var FunctionPrototype = Function.prototype; +var $Function = Function; +var FunctionPrototype = $Function.prototype; var bind = FunctionPrototype.bind; var call = FunctionPrototype.call; var uncurryThis = NATIVE_BIND && bind.bind(call, call); -module.exports = NATIVE_BIND ? function (fn) { - return fn && uncurryThis(fn); -} : function (fn) { - return fn && function () { +module.exports = function (fn) { + // Nashorn bug: + // https://github.com/zloirock/core-js/issues/1128 + // https://github.com/zloirock/core-js/issues/1130 + return fn instanceof $Function ? NATIVE_BIND ? uncurryThis(fn) : function () { return call.apply(fn, arguments); - }; + } : undefined; }; @@ -925,10 +927,10 @@ var store = __webpack_require__(36); (module.exports = function (key, value) { return store[key] || (store[key] = value !== undefined ? value : {}); })('versions', []).push({ - version: '3.25.3', + version: '3.25.4', mode: IS_PURE ? 'pure' : 'global', copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)', - license: 'https://github.com/zloirock/core-js/blob/v3.25.3/LICENSE', + license: 'https://github.com/zloirock/core-js/blob/v3.25.4/LICENSE', source: 'https://github.com/zloirock/core-js' }); @@ -11742,9 +11744,13 @@ var structuredCloneInternal = function (value, map) { } catch (error) { throwUnpolyfillable(type); } break; + case 'CropTarget': case 'CryptoKey': - case 'GPUCompilationMessage': + case 'FileSystemDirectoryHandle': + case 'FileSystemFileHandle': + case 'FileSystemHandle': case 'GPUCompilationInfo': + case 'GPUCompilationMessage': case 'ImageBitmap': case 'RTCCertificate': case 'WebAssembly.Module': @@ -11843,6 +11849,7 @@ var tryToTransfer = function (rawTransfer, map) { } catch (error) { /* empty */ } break; case 'ArrayBuffer': + case 'MediaSourceHandle': case 'MessagePort': case 'OffscreenCanvas': case 'ReadableStream': @@ -11856,6 +11863,8 @@ var tryToTransfer = function (rawTransfer, map) { } }; +// `structuredClone` method +// https://html.spec.whatwg.org/multipage/structured-data.html#dom-structuredclone $({ global: true, enumerable: true, sham: !PROPER_TRANSFER, forced: FORCED_REPLACEMENT }, { structuredClone: function structuredClone(value /* , { transfer } */) { var options = validateArgumentsLength(arguments.length, 1) > 1 && !isNullOrUndefined(arguments[1]) ? anObject(arguments[1]) : undefined; diff --git a/docs/compat/compat-data.js b/docs/compat/compat-data.js index b0fd94227e80..70c27f99e79a 100644 --- a/docs/compat/compat-data.js +++ b/docs/compat/compat-data.js @@ -4437,12 +4437,20 @@ "samsung": "18.0" }, "esnext.array.group": { - "bun": "0.1.9" + "android": "108", + "bun": "0.1.9", + "chrome": "108", + "edge": "108", + "opera": "94" }, "esnext.array.group-by": {}, "esnext.array.group-by-to-map": {}, "esnext.array.group-to-map": { - "bun": "0.1.9" + "android": "108", + "bun": "0.1.9", + "chrome": "108", + "edge": "108", + "opera": "94" }, "esnext.array.is-template-object": {}, "esnext.array.last-index": {}, diff --git a/package.json b/package.json index 004194b0fcfd..0b913fede4fd 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "version": "3.25.3", + "version": "3.25.4", "workspaces": [ "./packages/*" ], diff --git a/packages/core-js-builder/package.json b/packages/core-js-builder/package.json index d40d9d16949f..38a9643f62dd 100644 --- a/packages/core-js-builder/package.json +++ b/packages/core-js-builder/package.json @@ -1,7 +1,7 @@ { "name": "core-js-builder", "description": "core-js builder", - "version": "3.25.3", + "version": "3.25.4", "repository": { "type": "git", "url": "https://github.com/zloirock/core-js.git", @@ -10,8 +10,8 @@ "main": "index.js", "sideEffects": false, "dependencies": { - "core-js": "3.25.3", - "core-js-compat": "3.25.3", + "core-js": "3.25.4", + "core-js-compat": "3.25.4", "mkdirp": ">=0.5.5 <1", "webpack": ">=4.46.0 <5" }, diff --git a/packages/core-js-bundle/package.json b/packages/core-js-bundle/package.json index 21f5a898eb17..fe40bc5c3ba0 100644 --- a/packages/core-js-bundle/package.json +++ b/packages/core-js-bundle/package.json @@ -1,7 +1,7 @@ { "name": "core-js-bundle", "description": "Standard library", - "version": "3.25.3", + "version": "3.25.4", "repository": { "type": "git", "url": "https://github.com/zloirock/core-js.git" diff --git a/packages/core-js-compat/package.json b/packages/core-js-compat/package.json index 346157bf3da4..c3cfc479cdfa 100644 --- a/packages/core-js-compat/package.json +++ b/packages/core-js-compat/package.json @@ -1,7 +1,7 @@ { "name": "core-js-compat", "description": "core-js compat", - "version": "3.25.3", + "version": "3.25.4", "repository": { "type": "git", "url": "https://github.com/zloirock/core-js.git", diff --git a/packages/core-js-pure/package.json b/packages/core-js-pure/package.json index 30de2d402c40..3e63980e2f64 100644 --- a/packages/core-js-pure/package.json +++ b/packages/core-js-pure/package.json @@ -1,7 +1,7 @@ { "name": "core-js-pure", "description": "Standard library", - "version": "3.25.3", + "version": "3.25.4", "repository": { "type": "git", "url": "https://github.com/zloirock/core-js.git" diff --git a/packages/core-js/internals/shared.js b/packages/core-js/internals/shared.js index ad5d11f63081..94c2c699623a 100644 --- a/packages/core-js/internals/shared.js +++ b/packages/core-js/internals/shared.js @@ -4,9 +4,9 @@ var store = require('../internals/shared-store'); (module.exports = function (key, value) { return store[key] || (store[key] = value !== undefined ? value : {}); })('versions', []).push({ - version: '3.25.3', + version: '3.25.4', mode: IS_PURE ? 'pure' : 'global', copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)', - license: 'https://github.com/zloirock/core-js/blob/v3.25.3/LICENSE', + license: 'https://github.com/zloirock/core-js/blob/v3.25.4/LICENSE', source: 'https://github.com/zloirock/core-js' }); diff --git a/packages/core-js/package.json b/packages/core-js/package.json index a9056f3c4039..422fae6b5241 100644 --- a/packages/core-js/package.json +++ b/packages/core-js/package.json @@ -1,7 +1,7 @@ { "name": "core-js", "description": "Standard library", - "version": "3.25.3", + "version": "3.25.4", "repository": { "type": "git", "url": "https://github.com/zloirock/core-js.git"