Skip to content

Commit 661eab7

Browse files
committed
add debugging info in some missed cases
1 parent 80a5444 commit 661eab7

File tree

5 files changed

+17
-14
lines changed

5 files changed

+17
-14
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
- Dropped context workaround from collection static methods entries since with current methods semantic it's no longer required
77
- Added instance methods polyfills to entries of collections static methods that produce collection instances
88
- Added missed `Date#toJSON` to `JSON.stringify` entries dependencies
9+
- Added debugging info in some missed cases
910
- Compat data improvements:
1011
- [`{ 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)
1112
- [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

packages/core-js-pure/override/internals/export.js

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ var path = require('../internals/path');
99
var bind = require('../internals/function-bind-context');
1010
var createNonEnumerableProperty = require('../internals/create-non-enumerable-property');
1111
var hasOwn = require('../internals/has-own-property');
12+
// add debugging info
13+
require('../internals/shared-store');
1214

1315
var wrapConstructor = function (NativeConstructor) {
1416
var Wrapper = function (a, b, c) {
+10-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
'use strict';
2-
var global = require('../internals/global');
2+
var IS_PURE = require('../internals/is-pure');
3+
var globalThis = require('../internals/global');
34
var defineGlobalProperty = require('../internals/define-global-property');
45

56
var SHARED = '__core-js_shared__';
6-
var store = global[SHARED] || defineGlobalProperty(SHARED, {});
7+
var store = module.exports = globalThis[SHARED] || defineGlobalProperty(SHARED, {});
78

8-
module.exports = store;
9+
(store.versions || (store.versions = [])).push({
10+
version: '3.35.1',
11+
mode: IS_PURE ? 'pure' : 'global',
12+
copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',
13+
license: 'https://github.com/zloirock/core-js/blob/v3.35.1/LICENSE',
14+
source: 'https://github.com/zloirock/core-js'
15+
});

packages/core-js/internals/shared.js

+3-10
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
'use strict';
2-
var IS_PURE = require('../internals/is-pure');
32
var store = require('../internals/shared-store');
43

5-
(module.exports = function (key, value) {
6-
return store[key] || (store[key] = value !== undefined ? value : {});
7-
})('versions', []).push({
8-
version: '3.35.1',
9-
mode: IS_PURE ? 'pure' : 'global',
10-
copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',
11-
license: 'https://github.com/zloirock/core-js/blob/v3.35.1/LICENSE',
12-
source: 'https://github.com/zloirock/core-js'
13-
});
4+
module.exports = function (key, value) {
5+
return store[key] || (store[key] = value || {});
6+
};

scripts/update-version.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const LICENSE = 'LICENSE';
1616
const README = 'README.md';
1717
const README_COMPAT = 'packages/core-js-compat/README.md';
1818
const README_DENO = 'deno/corejs/README.md';
19-
const SHARED = 'packages/core-js/internals/shared.js';
19+
const SHARED = 'packages/core-js/internals/shared-store.js';
2020
const BUILDER_CONFIG = 'packages/core-js-builder/config.js';
2121
const NOW = new Date();
2222
const CURRENT_YEAR = NOW.getFullYear();

0 commit comments

Comments
 (0)