core-js 3.33.2 → 3.33.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,3 @@
1
1
  'use strict';
2
- /* global Bun -- Deno case */
2
+ /* global Bun -- Bun case */
3
3
  module.exports = typeof Bun == 'function' && Bun && typeof Bun.version == 'string';
@@ -11,5 +11,6 @@ module.exports =
11
11
  // eslint-disable-next-line no-restricted-globals -- safe
12
12
  check(typeof self == 'object' && self) ||
13
13
  check(typeof global == 'object' && global) ||
14
+ check(typeof this == 'object' && this) ||
14
15
  // eslint-disable-next-line no-new-func -- fallback
15
- (function () { return this; })() || this || Function('return this')();
16
+ (function () { return this; })() || Function('return this')();
@@ -5,9 +5,9 @@ var store = require('../internals/shared-store');
5
5
  (module.exports = function (key, value) {
6
6
  return store[key] || (store[key] = value !== undefined ? value : {});
7
7
  })('versions', []).push({
8
- version: '3.33.2',
8
+ version: '3.33.3',
9
9
  mode: IS_PURE ? 'pure' : 'global',
10
10
  copyright: '© 2014-2023 Denis Pushkarev (zloirock.ru)',
11
- license: 'https://github.com/zloirock/core-js/blob/v3.33.2/LICENSE',
11
+ license: 'https://github.com/zloirock/core-js/blob/v3.33.3/LICENSE',
12
12
  source: 'https://github.com/zloirock/core-js'
13
13
  });
@@ -2,13 +2,13 @@
2
2
  var $ = require('../internals/export');
3
3
  var uncurryThis = require('../internals/function-uncurry-this');
4
4
  var toIntegerOrInfinity = require('../internals/to-integer-or-infinity');
5
- var parseInt = require('../internals/number-parse-int');
6
5
 
7
6
  var INVALID_NUMBER_REPRESENTATION = 'Invalid number representation';
8
7
  var INVALID_RADIX = 'Invalid radix';
9
8
  var $RangeError = RangeError;
10
9
  var $SyntaxError = SyntaxError;
11
10
  var $TypeError = TypeError;
11
+ var $parseInt = parseInt;
12
12
  var pow = Math.pow;
13
13
  var valid = /^[\d.a-z]+$/;
14
14
  var charAt = uncurryThis(''.charAt);
@@ -33,8 +33,8 @@ $({ target: 'Number', stat: true, forced: true }, {
33
33
  if (R < 2 || R > 36) throw new $RangeError(INVALID_RADIX);
34
34
  if (!exec(valid, string)) throw new $SyntaxError(INVALID_NUMBER_REPRESENTATION);
35
35
  var parts = split(string, '.');
36
- var mathNum = parseInt(parts[0], R);
37
- if (parts.length > 1) mathNum += parseInt(parts[1], R) / pow(R, parts[1].length);
36
+ var mathNum = $parseInt(parts[0], R);
37
+ if (parts.length > 1) mathNum += $parseInt(parts[1], R) / pow(R, parts[1].length);
38
38
  if (numberToString(mathNum, R) !== string) throw new $SyntaxError(INVALID_NUMBER_REPRESENTATION);
39
39
  return sign * mathNum;
40
40
  }
@@ -1,8 +1,6 @@
1
1
  'use strict';
2
2
  var FREEZING = require('../internals/freezing');
3
3
  var $ = require('../internals/export');
4
- var shared = require('../internals/shared');
5
- var getBuiltIn = require('../internals/get-built-in');
6
4
  var makeBuiltIn = require('../internals/make-built-in');
7
5
  var uncurryThis = require('../internals/function-uncurry-this');
8
6
  var apply = require('../internals/function-apply');
@@ -12,18 +10,15 @@ var isCallable = require('../internals/is-callable');
12
10
  var lengthOfArrayLike = require('../internals/length-of-array-like');
13
11
  var defineProperty = require('../internals/object-define-property').f;
14
12
  var createArrayFromList = require('../internals/array-slice-simple');
13
+ var WeakMapHelpers = require('../internals/weak-map-helpers');
15
14
  var cooked = require('../internals/string-cooked');
16
15
  var parse = require('../internals/string-parse');
17
16
  var whitespaces = require('../internals/whitespaces');
18
17
 
19
- var WeakMap = getBuiltIn('WeakMap');
20
- var globalDedentRegistry = shared('GlobalDedentRegistry', new WeakMap());
21
-
22
- /* eslint-disable no-self-assign -- prototype methods protection */
23
- globalDedentRegistry.has = globalDedentRegistry.has;
24
- globalDedentRegistry.get = globalDedentRegistry.get;
25
- globalDedentRegistry.set = globalDedentRegistry.set;
26
- /* eslint-enable no-self-assign -- prototype methods protection */
18
+ var DedentMap = new WeakMapHelpers.WeakMap();
19
+ var weakMapGet = WeakMapHelpers.get;
20
+ var weakMapHas = WeakMapHelpers.has;
21
+ var weakMapSet = WeakMapHelpers.set;
27
22
 
28
23
  var $Array = Array;
29
24
  var $TypeError = TypeError;
@@ -48,14 +43,14 @@ var dedentTemplateStringsArray = function (template) {
48
43
  var rawInput = template.raw;
49
44
  // https://github.com/tc39/proposal-string-dedent/issues/75
50
45
  if (FREEZING && !isFrozen(rawInput)) throw new $TypeError('Raw template should be frozen');
51
- if (globalDedentRegistry.has(rawInput)) return globalDedentRegistry.get(rawInput);
46
+ if (weakMapHas(DedentMap, rawInput)) return weakMapGet(DedentMap, rawInput);
52
47
  var raw = dedentStringsArray(rawInput);
53
48
  var cookedArr = cookStrings(raw);
54
49
  defineProperty(cookedArr, 'raw', {
55
50
  value: freeze(raw)
56
51
  });
57
52
  freeze(cookedArr);
58
- globalDedentRegistry.set(rawInput, cookedArr);
53
+ weakMapSet(DedentMap, rawInput, cookedArr);
59
54
  return cookedArr;
60
55
  };
61
56
 
@@ -160,6 +160,7 @@ var cloneBuffer = function (value, map, $type) {
160
160
  } else {
161
161
  length = value.byteLength;
162
162
  options = 'maxByteLength' in value ? { maxByteLength: value.maxByteLength } : undefined;
163
+ // eslint-disable-next-line es/no-resizable-and-growable-arraybuffers -- safe
163
164
  clone = new ArrayBuffer(length, options);
164
165
  source = new DataView(value);
165
166
  target = new DataView(clone);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "core-js",
3
- "version": "3.33.2",
3
+ "version": "3.33.3",
4
4
  "type": "commonjs",
5
5
  "description": "Standard library",
6
6
  "keywords": [
@@ -1,3 +1,4 @@
1
1
  'use strict';
2
+ // https://github.com/tc39/proposal-is-usv-string
2
3
  require('../modules/esnext.string.is-well-formed');
3
4
  require('../modules/esnext.string.to-well-formed');