From 35bfb87ed543b7f89a767121ce484a3b93826ca9 Mon Sep 17 00:00:00 2001 From: Denis Pushkarev Date: Mon, 18 Jul 2022 02:13:38 +0700 Subject: [PATCH] 3.23.5 --- CHANGELOG.md | 3 +++ README.md | 6 +++--- deno/corejs/README.md | 2 +- deno/corejs/index.js | 10 ++++----- docs/compat/tests.js | 30 ++++++++++++++++++++------- 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, 44 insertions(+), 27 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e8455be8598..3739057714a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ ## Changelog ##### Unreleased +- Nothing + +##### [3.23.5 - 2022.07.18](https://github.com/zloirock/core-js/releases/tag/v3.23.5) - Fixed a typo in the `structuredClone` feature detection, [#1106](https://github.com/zloirock/core-js/issues/1106) - Added Opera Android 70 compat data mapping diff --git a/README.md b/README.md index c5e084bc1257..f124cf70b6c7 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.23.4 +npm install --save core-js@3.23.5 // version without global namespace pollution -npm install --save core-js-pure@3.23.4 +npm install --save core-js-pure@3.23.5 // bundled global version -npm install --save core-js-bundle@3.23.4 +npm install --save core-js-bundle@3.23.5 ``` 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 38b4f7def6c2..3dd92ec95e82 100644 --- a/deno/corejs/README.md +++ b/deno/corejs/README.md @@ -24,7 +24,7 @@ *Example*: ```js -import 'https://deno.land/x/corejs@v3.23.4/index.js'; // <- at the top of your entry point +import 'https://deno.land/x/corejs@v3.23.5/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 876e37142f6b..64b8873cf65f 100644 --- a/deno/corejs/index.js +++ b/deno/corejs/index.js @@ -1,7 +1,7 @@ /** - * core-js 3.23.4 + * core-js 3.23.5 * © 2014-2022 Denis Pushkarev (zloirock.ru) - * license: https://github.com/zloirock/core-js/blob/v3.23.4/LICENSE + * license: https://github.com/zloirock/core-js/blob/v3.23.5/LICENSE * source: https://github.com/zloirock/core-js */ !function (undefined) { 'use strict'; /******/ (function(modules) { // webpackBootstrap @@ -879,10 +879,10 @@ var store = __webpack_require__(34); (module.exports = function (key, value) { return store[key] || (store[key] = value !== undefined ? value : {}); })('versions', []).push({ - version: '3.23.4', + version: '3.23.5', mode: IS_PURE ? 'pure' : 'global', copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)', - license: 'https://github.com/zloirock/core-js/blob/v3.23.4/LICENSE', + license: 'https://github.com/zloirock/core-js/blob/v3.23.5/LICENSE', source: 'https://github.com/zloirock/core-js' }); @@ -10239,7 +10239,7 @@ var checkErrorsCloning = function (structuredCloneImplementation, $Error) { return !fails(function () { var error = new $Error(); var test = structuredCloneImplementation({ a: error, b: error }); - return !(test && test.a === test.b && test.a instanceof $Error && test.stack === error.stack); + return !(test && test.a === test.b && test.a instanceof $Error && test.a.stack === error.stack); }); }; diff --git a/docs/compat/tests.js b/docs/compat/tests.js index b784bb495023..50a12ac20ec7 100644 --- a/docs/compat/tests.js +++ b/docs/compat/tests.js @@ -223,6 +223,10 @@ function IMMEDIATE() { return setImmediate && clearImmediate; } +function TIMERS() { + return !/MSIE .\./.test(USERAGENT); +} + GLOBAL.tests = { // TODO: Remove this module from `core-js@4` since it's split to modules listed below 'es.symbol': [SYMBOLS_SUPPORT, function () { @@ -1851,16 +1855,26 @@ GLOBAL.tests = { return Object.getOwnPropertyDescriptor(GLOBAL, 'queueMicrotask').value; }, 'web.set-immediate': IMMEDIATE, + 'web.set-interval': TIMERS, + 'web.set-timeout': TIMERS, 'web.structured-clone': function () { - var error = new Error(); - var test = structuredClone({ a: error, b: error }); - if (!(test && test.a === test.b && test.a instanceof Error && test.stack === error.stack)) return false; - test = structuredClone(new AggregateError([1], 'a', { cause: 3 })); - return test.name == 'AggregateError' && test.errors[0] == 1 && test.message == 'a' && test.cause == 3; - }, - 'web.timers': function () { - return !/MSIE .\./.test(USERAGENT); + function checkErrorsCloning(structuredCloneImplementation, $Error) { + var error = new $Error(); + var test = structuredCloneImplementation({ a: error, b: error }); + return test && test.a === test.b && test.a instanceof $Error && test.a.stack === error.stack; + } + + function checkNewErrorsCloningSemantic(structuredCloneImplementation) { + var test = structuredCloneImplementation(new AggregateError([1], 'message', { cause: 3 })); + return test.name == 'AggregateError' && test.errors[0] == 1 && test.message == 'message' && test.cause == 3; + } + + return checkErrorsCloning(structuredClone, Error) + && checkErrorsCloning(structuredClone, DOMException) + && checkNewErrorsCloningSemantic(structuredClone); }, + // TODO: Remove this module from `core-js@4` since it's split to submodules + 'web.timers': TIMERS, 'web.url.constructor': URL_AND_URL_SEARCH_PARAMS_SUPPORT, 'web.url.to-json': [URL_AND_URL_SEARCH_PARAMS_SUPPORT, function () { return URL.prototype.toJSON; diff --git a/package.json b/package.json index 137023c562f2..9c7f2e60acae 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "version": "3.23.4", + "version": "3.23.5", "workspaces": [ "./packages/*" ], diff --git a/packages/core-js-builder/package.json b/packages/core-js-builder/package.json index f70335a2f78c..7df3ab3baf54 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.23.4", + "version": "3.23.5", "repository": { "type": "git", "url": "https://github.com/zloirock/core-js.git", @@ -9,8 +9,8 @@ }, "main": "index.js", "dependencies": { - "core-js": "3.23.4", - "core-js-compat": "3.23.4", + "core-js": "3.23.5", + "core-js-compat": "3.23.5", "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 79dbfb30b426..30a082171d8a 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.23.4", + "version": "3.23.5", "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 8c9c705d3ec0..943178c0f7e7 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.23.4", + "version": "3.23.5", "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 c7d714769d6d..a76f07eb55bf 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.23.4", + "version": "3.23.5", "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 158b78010434..4ec90f5247fd 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.23.4', + version: '3.23.5', mode: IS_PURE ? 'pure' : 'global', copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)', - license: 'https://github.com/zloirock/core-js/blob/v3.23.4/LICENSE', + license: 'https://github.com/zloirock/core-js/blob/v3.23.5/LICENSE', source: 'https://github.com/zloirock/core-js' }); diff --git a/packages/core-js/package.json b/packages/core-js/package.json index f5fb58f17811..3c6fbf630120 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.23.4", + "version": "3.23.5", "repository": { "type": "git", "url": "https://github.com/zloirock/core-js.git"