Skip to content

Commit

Permalink
add debugging info in some missed cases
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock committed Feb 5, 2024
1 parent 80a5444 commit 661eab7
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 14 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions packages/core-js-pure/override/internals/export.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
13 changes: 10 additions & 3 deletions packages/core-js/internals/shared-store.js
Original file line number Diff line number Diff line change
@@ -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'
});
13 changes: 3 additions & 10 deletions packages/core-js/internals/shared.js
Original file line number Diff line number Diff line change
@@ -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 || {});
};
2 changes: 1 addition & 1 deletion scripts/update-version.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 661eab7

Please sign in to comment.