diff --git a/CHANGELOG.md b/CHANGELOG.md index 51287a236080..ae9bbcfc0393 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Dropped context workaround from collection static methods entries since with current methods semantic it's no longer required - Added instance methods polyfills to entries of collections static methods that produce collection instances - Added missed `Date#toJSON` to `JSON.stringify` entries dependencies +- Added debugging info in some missed cases - Compat data improvements: - [`{ Map, Object }.groupBy`](https://github.com/tc39/proposal-array-grouping), [`Promise.withResolvers`](https://github.com/tc39/proposal-promise-with-resolvers), [`ArrayBuffer#transfer` and friends](https://github.com/tc39/proposal-arraybuffer-transfer) marked as supported from [Safari 17.4](https://developer.apple.com/documentation/safari-release-notes/safari-17_4-release-notes#JavaScript) - [New `Set` methods](https://github.com/tc39/proposal-set-methods) [fixed](https://bugs.chromium.org/p/v8/issues/detail?id=14559#c4) and marked as supported from V8 ~ Chrome 123 diff --git a/packages/core-js-pure/override/internals/export.js b/packages/core-js-pure/override/internals/export.js index 854745c05b2b..6135786dece6 100644 --- a/packages/core-js-pure/override/internals/export.js +++ b/packages/core-js-pure/override/internals/export.js @@ -9,6 +9,8 @@ var path = require('../internals/path'); var bind = require('../internals/function-bind-context'); var createNonEnumerableProperty = require('../internals/create-non-enumerable-property'); var hasOwn = require('../internals/has-own-property'); +// add debugging info +require('../internals/shared-store'); var wrapConstructor = function (NativeConstructor) { var Wrapper = function (a, b, c) { diff --git a/packages/core-js/internals/shared-store.js b/packages/core-js/internals/shared-store.js index 2a0f7d649264..d8d5d23f3170 100644 --- a/packages/core-js/internals/shared-store.js +++ b/packages/core-js/internals/shared-store.js @@ -1,8 +1,15 @@ 'use strict'; -var global = require('../internals/global'); +var IS_PURE = require('../internals/is-pure'); +var globalThis = require('../internals/global'); var defineGlobalProperty = require('../internals/define-global-property'); var SHARED = '__core-js_shared__'; -var store = global[SHARED] || defineGlobalProperty(SHARED, {}); +var store = module.exports = globalThis[SHARED] || defineGlobalProperty(SHARED, {}); -module.exports = store; +(store.versions || (store.versions = [])).push({ + version: '3.35.1', + mode: IS_PURE ? 'pure' : 'global', + copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)', + license: 'https://github.com/zloirock/core-js/blob/v3.35.1/LICENSE', + source: 'https://github.com/zloirock/core-js' +}); diff --git a/packages/core-js/internals/shared.js b/packages/core-js/internals/shared.js index f434a2b0d2c4..29ac11c2e226 100644 --- a/packages/core-js/internals/shared.js +++ b/packages/core-js/internals/shared.js @@ -1,13 +1,6 @@ 'use strict'; -var IS_PURE = require('../internals/is-pure'); var store = require('../internals/shared-store'); -(module.exports = function (key, value) { - return store[key] || (store[key] = value !== undefined ? value : {}); -})('versions', []).push({ - version: '3.35.1', - mode: IS_PURE ? 'pure' : 'global', - copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)', - license: 'https://github.com/zloirock/core-js/blob/v3.35.1/LICENSE', - source: 'https://github.com/zloirock/core-js' -}); +module.exports = function (key, value) { + return store[key] || (store[key] = value || {}); +}; diff --git a/scripts/update-version.mjs b/scripts/update-version.mjs index fc4b42e6d4d1..2db3218305cd 100644 --- a/scripts/update-version.mjs +++ b/scripts/update-version.mjs @@ -16,7 +16,7 @@ const LICENSE = 'LICENSE'; const README = 'README.md'; const README_COMPAT = 'packages/core-js-compat/README.md'; const README_DENO = 'deno/corejs/README.md'; -const SHARED = 'packages/core-js/internals/shared.js'; +const SHARED = 'packages/core-js/internals/shared-store.js'; const BUILDER_CONFIG = 'packages/core-js-builder/config.js'; const NOW = new Date(); const CURRENT_YEAR = NOW.getFullYear();