core-js 3.36.0 → 3.37.0

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.
Files changed (77) hide show
  1. package/actual/set/difference.js +2 -3
  2. package/actual/set/intersection.js +2 -3
  3. package/actual/set/is-disjoint-from.js +2 -3
  4. package/actual/set/is-subset-of.js +2 -3
  5. package/actual/set/is-superset-of.js +2 -3
  6. package/actual/set/symmetric-difference.js +2 -3
  7. package/actual/set/union.js +2 -3
  8. package/actual/url/parse.js +4 -0
  9. package/es/index.js +7 -0
  10. package/es/set/difference.js +6 -0
  11. package/es/set/index.js +7 -0
  12. package/es/set/intersection.js +6 -0
  13. package/es/set/is-disjoint-from.js +6 -0
  14. package/es/set/is-subset-of.js +6 -0
  15. package/es/set/is-superset-of.js +6 -0
  16. package/es/set/symmetric-difference.js +6 -0
  17. package/es/set/union.js +6 -0
  18. package/features/math/sum-precise.js +2 -0
  19. package/features/symbol/custom-matcher.js +2 -0
  20. package/features/url/parse.js +2 -0
  21. package/full/index.js +10 -0
  22. package/full/math/index.js +2 -0
  23. package/full/math/sum-precise.js +6 -0
  24. package/full/symbol/custom-matcher.js +5 -0
  25. package/full/symbol/index.js +2 -1
  26. package/full/url/parse.js +4 -0
  27. package/internals/add-disposable-resource.js +1 -0
  28. package/internals/array-from.js +1 -1
  29. package/internals/object-set-prototype-of.js +4 -2
  30. package/internals/shared-store.js +2 -2
  31. package/modules/es.map.group-by.js +8 -1
  32. package/modules/es.object.group-by.js +10 -1
  33. package/modules/es.set.difference.v2.js +10 -0
  34. package/modules/es.set.intersection.v2.js +16 -0
  35. package/modules/es.set.is-disjoint-from.v2.js +10 -0
  36. package/modules/es.set.is-subset-of.v2.js +10 -0
  37. package/modules/es.set.is-superset-of.v2.js +10 -0
  38. package/modules/es.set.symmetric-difference.v2.js +10 -0
  39. package/modules/es.set.union.v2.js +10 -0
  40. package/modules/esnext.array.from-async.js +13 -1
  41. package/modules/esnext.async-disposable-stack.constructor.js +2 -2
  42. package/modules/esnext.disposable-stack.constructor.js +2 -2
  43. package/modules/esnext.math.sum-precise.js +151 -0
  44. package/modules/esnext.promise.try.js +8 -2
  45. package/modules/esnext.regexp.escape.js +6 -1
  46. package/modules/esnext.set.difference.v2.js +2 -9
  47. package/modules/esnext.set.intersection.v2.js +2 -15
  48. package/modules/esnext.set.is-disjoint-from.v2.js +2 -9
  49. package/modules/esnext.set.is-subset-of.v2.js +2 -9
  50. package/modules/esnext.set.is-superset-of.v2.js +2 -9
  51. package/modules/esnext.set.symmetric-difference.v2.js +2 -9
  52. package/modules/esnext.set.union.v2.js +2 -9
  53. package/modules/esnext.suppressed-error.constructor.js +21 -3
  54. package/modules/esnext.symbol.custom-matcher.js +6 -0
  55. package/modules/web.queue-microtask.js +12 -1
  56. package/modules/web.url.can-parse.js +7 -1
  57. package/modules/web.url.parse.js +22 -0
  58. package/package.json +1 -1
  59. package/proposals/extractors.js +3 -0
  60. package/proposals/math-sum.js +3 -0
  61. package/proposals/pattern-matching-v2.js +3 -0
  62. package/stable/index.js +8 -0
  63. package/stable/set/difference.js +4 -0
  64. package/stable/set/intersection.js +4 -0
  65. package/stable/set/is-disjoint-from.js +4 -0
  66. package/stable/set/is-subset-of.js +4 -0
  67. package/stable/set/is-superset-of.js +4 -0
  68. package/stable/set/symmetric-difference.js +4 -0
  69. package/stable/set/union.js +4 -0
  70. package/stable/url/parse.js +6 -0
  71. package/stage/1.js +3 -1
  72. package/stage/2.7.js +2 -1
  73. package/stage/2.js +0 -1
  74. package/stage/3.js +0 -1
  75. package/stage/4.js +1 -0
  76. package/web/index.js +1 -0
  77. package/web/url.js +1 -0
@@ -1,6 +1,5 @@
1
1
  'use strict';
2
- require('../../modules/es.set');
2
+ var parent = require('../../stable/set/difference');
3
3
  require('../../modules/esnext.set.difference.v2');
4
- var entryUnbind = require('../../internals/entry-unbind');
5
4
 
6
- module.exports = entryUnbind('Set', 'difference');
5
+ module.exports = parent;
@@ -1,6 +1,5 @@
1
1
  'use strict';
2
- require('../../modules/es.set');
2
+ var parent = require('../../stable/set/intersection');
3
3
  require('../../modules/esnext.set.intersection.v2');
4
- var entryUnbind = require('../../internals/entry-unbind');
5
4
 
6
- module.exports = entryUnbind('Set', 'intersection');
5
+ module.exports = parent;
@@ -1,6 +1,5 @@
1
1
  'use strict';
2
- require('../../modules/es.set');
2
+ var parent = require('../../stable/set/is-disjoint-from');
3
3
  require('../../modules/esnext.set.is-disjoint-from.v2');
4
- var entryUnbind = require('../../internals/entry-unbind');
5
4
 
6
- module.exports = entryUnbind('Set', 'isDisjointFrom');
5
+ module.exports = parent;
@@ -1,6 +1,5 @@
1
1
  'use strict';
2
- require('../../modules/es.set');
2
+ var parent = require('../../stable/set/is-subset-of');
3
3
  require('../../modules/esnext.set.is-subset-of.v2');
4
- var entryUnbind = require('../../internals/entry-unbind');
5
4
 
6
- module.exports = entryUnbind('Set', 'isSubsetOf');
5
+ module.exports = parent;
@@ -1,6 +1,5 @@
1
1
  'use strict';
2
- require('../../modules/es.set');
2
+ var parent = require('../../stable/set/is-superset-of');
3
3
  require('../../modules/esnext.set.is-superset-of.v2');
4
- var entryUnbind = require('../../internals/entry-unbind');
5
4
 
6
- module.exports = entryUnbind('Set', 'isSupersetOf');
5
+ module.exports = parent;
@@ -1,6 +1,5 @@
1
1
  'use strict';
2
- require('../../modules/es.set');
2
+ var parent = require('../../stable/set/symmetric-difference');
3
3
  require('../../modules/esnext.set.symmetric-difference.v2');
4
- var entryUnbind = require('../../internals/entry-unbind');
5
4
 
6
- module.exports = entryUnbind('Set', 'symmetricDifference');
5
+ module.exports = parent;
@@ -1,6 +1,5 @@
1
1
  'use strict';
2
- require('../../modules/es.set');
2
+ var parent = require('../../stable/set/union');
3
3
  require('../../modules/esnext.set.union.v2');
4
- var entryUnbind = require('../../internals/entry-unbind');
5
4
 
6
- module.exports = entryUnbind('Set', 'union');
5
+ module.exports = parent;
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+ var parent = require('../../stable/url/parse');
3
+
4
+ module.exports = parent;
package/es/index.js CHANGED
@@ -168,6 +168,13 @@ require('../modules/es.regexp.sticky');
168
168
  require('../modules/es.regexp.test');
169
169
  require('../modules/es.regexp.to-string');
170
170
  require('../modules/es.set');
171
+ require('../modules/es.set.difference.v2');
172
+ require('../modules/es.set.intersection.v2');
173
+ require('../modules/es.set.is-disjoint-from.v2');
174
+ require('../modules/es.set.is-subset-of.v2');
175
+ require('../modules/es.set.is-superset-of.v2');
176
+ require('../modules/es.set.symmetric-difference.v2');
177
+ require('../modules/es.set.union.v2');
171
178
  require('../modules/es.string.at-alternative');
172
179
  require('../modules/es.string.code-point-at');
173
180
  require('../modules/es.string.ends-with');
@@ -0,0 +1,6 @@
1
+ 'use strict';
2
+ require('../../modules/es.set');
3
+ require('../../modules/es.set.difference.v2');
4
+ var entryUnbind = require('../../internals/entry-unbind');
5
+
6
+ module.exports = entryUnbind('Set', 'difference');
package/es/set/index.js CHANGED
@@ -2,6 +2,13 @@
2
2
  require('../../modules/es.array.iterator');
3
3
  require('../../modules/es.object.to-string');
4
4
  require('../../modules/es.set');
5
+ require('../../modules/es.set.difference.v2');
6
+ require('../../modules/es.set.intersection.v2');
7
+ require('../../modules/es.set.is-disjoint-from.v2');
8
+ require('../../modules/es.set.is-subset-of.v2');
9
+ require('../../modules/es.set.is-superset-of.v2');
10
+ require('../../modules/es.set.symmetric-difference.v2');
11
+ require('../../modules/es.set.union.v2');
5
12
  require('../../modules/es.string.iterator');
6
13
  var path = require('../../internals/path');
7
14
 
@@ -0,0 +1,6 @@
1
+ 'use strict';
2
+ require('../../modules/es.set');
3
+ require('../../modules/es.set.intersection.v2');
4
+ var entryUnbind = require('../../internals/entry-unbind');
5
+
6
+ module.exports = entryUnbind('Set', 'intersection');
@@ -0,0 +1,6 @@
1
+ 'use strict';
2
+ require('../../modules/es.set');
3
+ require('../../modules/es.set.is-disjoint-from.v2');
4
+ var entryUnbind = require('../../internals/entry-unbind');
5
+
6
+ module.exports = entryUnbind('Set', 'isDisjointFrom');
@@ -0,0 +1,6 @@
1
+ 'use strict';
2
+ require('../../modules/es.set');
3
+ require('../../modules/es.set.is-subset-of.v2');
4
+ var entryUnbind = require('../../internals/entry-unbind');
5
+
6
+ module.exports = entryUnbind('Set', 'isSubsetOf');
@@ -0,0 +1,6 @@
1
+ 'use strict';
2
+ require('../../modules/es.set');
3
+ require('../../modules/es.set.is-superset-of.v2');
4
+ var entryUnbind = require('../../internals/entry-unbind');
5
+
6
+ module.exports = entryUnbind('Set', 'isSupersetOf');
@@ -0,0 +1,6 @@
1
+ 'use strict';
2
+ require('../../modules/es.set');
3
+ require('../../modules/es.set.symmetric-difference.v2');
4
+ var entryUnbind = require('../../internals/entry-unbind');
5
+
6
+ module.exports = entryUnbind('Set', 'symmetricDifference');
@@ -0,0 +1,6 @@
1
+ 'use strict';
2
+ require('../../modules/es.set');
3
+ require('../../modules/es.set.union.v2');
4
+ var entryUnbind = require('../../internals/entry-unbind');
5
+
6
+ module.exports = entryUnbind('Set', 'union');
@@ -0,0 +1,2 @@
1
+ 'use strict';
2
+ module.exports = require('../../full/math/sum-precise');
@@ -0,0 +1,2 @@
1
+ 'use strict';
2
+ module.exports = require('../../full/symbol/custom-matcher');
@@ -0,0 +1,2 @@
1
+ 'use strict';
2
+ module.exports = require('../../full/url/parse');
package/full/index.js CHANGED
@@ -168,6 +168,13 @@ require('../modules/es.regexp.sticky');
168
168
  require('../modules/es.regexp.test');
169
169
  require('../modules/es.regexp.to-string');
170
170
  require('../modules/es.set');
171
+ require('../modules/es.set.difference.v2');
172
+ require('../modules/es.set.intersection.v2');
173
+ require('../modules/es.set.is-disjoint-from.v2');
174
+ require('../modules/es.set.is-subset-of.v2');
175
+ require('../modules/es.set.is-superset-of.v2');
176
+ require('../modules/es.set.symmetric-difference.v2');
177
+ require('../modules/es.set.union.v2');
171
178
  require('../modules/es.string.at-alternative');
172
179
  require('../modules/es.string.code-point-at');
173
180
  require('../modules/es.string.ends-with');
@@ -355,6 +362,7 @@ require('../modules/esnext.math.radians');
355
362
  require('../modules/esnext.math.scale');
356
363
  require('../modules/esnext.math.seeded-prng');
357
364
  require('../modules/esnext.math.signbit');
365
+ require('../modules/esnext.math.sum-precise');
358
366
  require('../modules/esnext.math.umulh');
359
367
  require('../modules/esnext.number.from-string');
360
368
  require('../modules/esnext.number.range');
@@ -412,6 +420,7 @@ require('../modules/esnext.string.match-all');
412
420
  require('../modules/esnext.string.replace-all');
413
421
  require('../modules/esnext.string.to-well-formed');
414
422
  require('../modules/esnext.symbol.async-dispose');
423
+ require('../modules/esnext.symbol.custom-matcher');
415
424
  require('../modules/esnext.symbol.dispose');
416
425
  require('../modules/esnext.symbol.is-registered-symbol');
417
426
  require('../modules/esnext.symbol.is-registered');
@@ -462,6 +471,7 @@ require('../modules/web.structured-clone');
462
471
  require('../modules/web.timers');
463
472
  require('../modules/web.url');
464
473
  require('../modules/web.url.can-parse');
474
+ require('../modules/web.url.parse');
465
475
  require('../modules/web.url.to-json');
466
476
  require('../modules/web.url-search-params');
467
477
  require('../modules/web.url-search-params.delete');
@@ -1,5 +1,6 @@
1
1
  'use strict';
2
2
  var parent = require('../../actual/math');
3
+ require('../../modules/es.array.iterator');
3
4
  require('../../modules/esnext.math.clamp');
4
5
  require('../../modules/esnext.math.deg-per-rad');
5
6
  require('../../modules/esnext.math.degrees');
@@ -9,6 +10,7 @@ require('../../modules/esnext.math.radians');
9
10
  require('../../modules/esnext.math.scale');
10
11
  require('../../modules/esnext.math.seeded-prng');
11
12
  require('../../modules/esnext.math.signbit');
13
+ require('../../modules/esnext.math.sum-precise');
12
14
  // TODO: Remove from `core-js@4`
13
15
  require('../../modules/esnext.math.iaddh');
14
16
  require('../../modules/esnext.math.isubh');
@@ -0,0 +1,6 @@
1
+ 'use strict';
2
+ require('../../modules/es.array.iterator');
3
+ require('../../modules/esnext.math.sum-precise');
4
+ var path = require('../../internals/path');
5
+
6
+ module.exports = path.Math.sumPrecise;
@@ -0,0 +1,5 @@
1
+ 'use strict';
2
+ require('../../modules/esnext.symbol.custom-matcher');
3
+ var WrappedWellKnownSymbolModule = require('../../internals/well-known-symbol-wrapped');
4
+
5
+ module.exports = WrappedWellKnownSymbolModule.f('customMatcher');
@@ -2,11 +2,12 @@
2
2
  var parent = require('../../actual/symbol');
3
3
  require('../../modules/esnext.symbol.is-registered-symbol');
4
4
  require('../../modules/esnext.symbol.is-well-known-symbol');
5
- require('../../modules/esnext.symbol.matcher');
5
+ require('../../modules/esnext.symbol.custom-matcher');
6
6
  require('../../modules/esnext.symbol.observable');
7
7
  // TODO: Remove from `core-js@4`
8
8
  require('../../modules/esnext.symbol.is-registered');
9
9
  require('../../modules/esnext.symbol.is-well-known');
10
+ require('../../modules/esnext.symbol.matcher');
10
11
  require('../../modules/esnext.symbol.metadata-key');
11
12
  require('../../modules/esnext.symbol.pattern-match');
12
13
  require('../../modules/esnext.symbol.replace-all');
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+ var parent = require('../../actual/url/parse');
3
+
4
+ module.exports = parent;
@@ -20,6 +20,7 @@ var getDisposeMethod = function (V, hint) {
20
20
  var method = getMethod(V, ASYNC_DISPOSE);
21
21
  if (method !== undefined) return method;
22
22
  method = getMethod(V, DISPOSE);
23
+ if (method === undefined) return method;
23
24
  return function () {
24
25
  call(method, this);
25
26
  };
@@ -26,9 +26,9 @@ module.exports = function from(arrayLike /* , mapfn = undefined, thisArg = undef
26
26
  var length, result, step, iterator, next, value;
27
27
  // if the target is not iterable or it's an array with the default iterator - use a simple case
28
28
  if (iteratorMethod && !(this === $Array && isArrayIteratorMethod(iteratorMethod))) {
29
+ result = IS_CONSTRUCTOR ? new this() : [];
29
30
  iterator = getIterator(O, iteratorMethod);
30
31
  next = iterator.next;
31
- result = IS_CONSTRUCTOR ? new this() : [];
32
32
  for (;!(step = call(next, iterator)).done; index++) {
33
33
  value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value;
34
34
  createProperty(result, index, value);
@@ -1,7 +1,8 @@
1
1
  'use strict';
2
2
  /* eslint-disable no-proto -- safe */
3
3
  var uncurryThisAccessor = require('../internals/function-uncurry-this-accessor');
4
- var anObject = require('../internals/an-object');
4
+ var isObject = require('../internals/is-object');
5
+ var requireObjectCoercible = require('../internals/require-object-coercible');
5
6
  var aPossiblePrototype = require('../internals/a-possible-prototype');
6
7
 
7
8
  // `Object.setPrototypeOf` method
@@ -18,8 +19,9 @@ module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {
18
19
  CORRECT_SETTER = test instanceof Array;
19
20
  } catch (error) { /* empty */ }
20
21
  return function setPrototypeOf(O, proto) {
21
- anObject(O);
22
+ requireObjectCoercible(O);
22
23
  aPossiblePrototype(proto);
24
+ if (!isObject(O)) return O;
23
25
  if (CORRECT_SETTER) setter(O, proto);
24
26
  else O.__proto__ = proto;
25
27
  return O;
@@ -7,9 +7,9 @@ var SHARED = '__core-js_shared__';
7
7
  var store = module.exports = globalThis[SHARED] || defineGlobalProperty(SHARED, {});
8
8
 
9
9
  (store.versions || (store.versions = [])).push({
10
- version: '3.36.0',
10
+ version: '3.37.0',
11
11
  mode: IS_PURE ? 'pure' : 'global',
12
12
  copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',
13
- license: 'https://github.com/zloirock/core-js/blob/v3.36.0/LICENSE',
13
+ license: 'https://github.com/zloirock/core-js/blob/v3.37.0/LICENSE',
14
14
  source: 'https://github.com/zloirock/core-js'
15
15
  });
@@ -6,6 +6,7 @@ var requireObjectCoercible = require('../internals/require-object-coercible');
6
6
  var iterate = require('../internals/iterate');
7
7
  var MapHelpers = require('../internals/map-helpers');
8
8
  var IS_PURE = require('../internals/is-pure');
9
+ var fails = require('../internals/fails');
9
10
 
10
11
  var Map = MapHelpers.Map;
11
12
  var has = MapHelpers.has;
@@ -13,9 +14,15 @@ var get = MapHelpers.get;
13
14
  var set = MapHelpers.set;
14
15
  var push = uncurryThis([].push);
15
16
 
17
+ var DOES_NOT_WORK_WITH_PRIMITIVES = IS_PURE || fails(function () {
18
+ return Map.groupBy('ab', function (it) {
19
+ return it;
20
+ }).get('a').length !== 1;
21
+ });
22
+
16
23
  // `Map.groupBy` method
17
24
  // https://github.com/tc39/proposal-array-grouping
18
- $({ target: 'Map', stat: true, forced: IS_PURE }, {
25
+ $({ target: 'Map', stat: true, forced: IS_PURE || DOES_NOT_WORK_WITH_PRIMITIVES }, {
19
26
  groupBy: function groupBy(items, callbackfn) {
20
27
  requireObjectCoercible(items);
21
28
  aCallable(callbackfn);
@@ -6,13 +6,22 @@ var aCallable = require('../internals/a-callable');
6
6
  var requireObjectCoercible = require('../internals/require-object-coercible');
7
7
  var toPropertyKey = require('../internals/to-property-key');
8
8
  var iterate = require('../internals/iterate');
9
+ var fails = require('../internals/fails');
9
10
 
11
+ // eslint-disable-next-line es/no-object-map-groupby -- testing
12
+ var nativeGroupBy = Object.groupBy;
10
13
  var create = getBuiltIn('Object', 'create');
11
14
  var push = uncurryThis([].push);
12
15
 
16
+ var DOES_NOT_WORK_WITH_PRIMITIVES = !nativeGroupBy || fails(function () {
17
+ return nativeGroupBy('ab', function (it) {
18
+ return it;
19
+ }).a.length !== 1;
20
+ });
21
+
13
22
  // `Object.groupBy` method
14
23
  // https://github.com/tc39/proposal-array-grouping
15
- $({ target: 'Object', stat: true }, {
24
+ $({ target: 'Object', stat: true, forced: DOES_NOT_WORK_WITH_PRIMITIVES }, {
16
25
  groupBy: function groupBy(items, callbackfn) {
17
26
  requireObjectCoercible(items);
18
27
  aCallable(callbackfn);
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+ var $ = require('../internals/export');
3
+ var difference = require('../internals/set-difference');
4
+ var setMethodAcceptSetLike = require('../internals/set-method-accept-set-like');
5
+
6
+ // `Set.prototype.difference` method
7
+ // https://github.com/tc39/proposal-set-methods
8
+ $({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike('difference') }, {
9
+ difference: difference
10
+ });
@@ -0,0 +1,16 @@
1
+ 'use strict';
2
+ var $ = require('../internals/export');
3
+ var fails = require('../internals/fails');
4
+ var intersection = require('../internals/set-intersection');
5
+ var setMethodAcceptSetLike = require('../internals/set-method-accept-set-like');
6
+
7
+ var INCORRECT = !setMethodAcceptSetLike('intersection') || fails(function () {
8
+ // eslint-disable-next-line es/no-array-from, es/no-set -- testing
9
+ return String(Array.from(new Set([1, 2, 3]).intersection(new Set([3, 2])))) !== '3,2';
10
+ });
11
+
12
+ // `Set.prototype.intersection` method
13
+ // https://github.com/tc39/proposal-set-methods
14
+ $({ target: 'Set', proto: true, real: true, forced: INCORRECT }, {
15
+ intersection: intersection
16
+ });
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+ var $ = require('../internals/export');
3
+ var isDisjointFrom = require('../internals/set-is-disjoint-from');
4
+ var setMethodAcceptSetLike = require('../internals/set-method-accept-set-like');
5
+
6
+ // `Set.prototype.isDisjointFrom` method
7
+ // https://github.com/tc39/proposal-set-methods
8
+ $({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike('isDisjointFrom') }, {
9
+ isDisjointFrom: isDisjointFrom
10
+ });
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+ var $ = require('../internals/export');
3
+ var isSubsetOf = require('../internals/set-is-subset-of');
4
+ var setMethodAcceptSetLike = require('../internals/set-method-accept-set-like');
5
+
6
+ // `Set.prototype.isSubsetOf` method
7
+ // https://github.com/tc39/proposal-set-methods
8
+ $({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike('isSubsetOf') }, {
9
+ isSubsetOf: isSubsetOf
10
+ });
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+ var $ = require('../internals/export');
3
+ var isSupersetOf = require('../internals/set-is-superset-of');
4
+ var setMethodAcceptSetLike = require('../internals/set-method-accept-set-like');
5
+
6
+ // `Set.prototype.isSupersetOf` method
7
+ // https://github.com/tc39/proposal-set-methods
8
+ $({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike('isSupersetOf') }, {
9
+ isSupersetOf: isSupersetOf
10
+ });
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+ var $ = require('../internals/export');
3
+ var symmetricDifference = require('../internals/set-symmetric-difference');
4
+ var setMethodAcceptSetLike = require('../internals/set-method-accept-set-like');
5
+
6
+ // `Set.prototype.symmetricDifference` method
7
+ // https://github.com/tc39/proposal-set-methods
8
+ $({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike('symmetricDifference') }, {
9
+ symmetricDifference: symmetricDifference
10
+ });
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+ var $ = require('../internals/export');
3
+ var union = require('../internals/set-union');
4
+ var setMethodAcceptSetLike = require('../internals/set-method-accept-set-like');
5
+
6
+ // `Set.prototype.union` method
7
+ // https://github.com/tc39/proposal-set-methods
8
+ $({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike('union') }, {
9
+ union: union
10
+ });
@@ -1,9 +1,21 @@
1
1
  'use strict';
2
2
  var $ = require('../internals/export');
3
3
  var fromAsync = require('../internals/array-from-async');
4
+ var fails = require('../internals/fails');
5
+
6
+ var nativeFromAsync = Array.fromAsync;
7
+ // https://bugs.webkit.org/show_bug.cgi?id=271703
8
+ var INCORRECT_CONSTRUCTURING = !nativeFromAsync || fails(function () {
9
+ var counter = 0;
10
+ nativeFromAsync.call(function () {
11
+ counter++;
12
+ return [];
13
+ }, { length: 0 });
14
+ return counter !== 1;
15
+ });
4
16
 
5
17
  // `Array.fromAsync` method
6
18
  // https://github.com/tc39/proposal-array-from-async
7
- $({ target: 'Array', stat: true }, {
19
+ $({ target: 'Array', stat: true, forced: INCORRECT_CONSTRUCTURING }, {
8
20
  fromAsync: fromAsync
9
21
  });
@@ -72,14 +72,14 @@ defineBuiltIns(AsyncDisposableStackPrototype, {
72
72
  var loop = function () {
73
73
  if (i) {
74
74
  var disposeMethod = stack[--i];
75
- stack[i] = null;
75
+ stack[i] = undefined;
76
76
  try {
77
77
  Promise.resolve(disposeMethod()).then(loop, handleError);
78
78
  } catch (error) {
79
79
  handleError(error);
80
80
  }
81
81
  } else {
82
- internalState.stack = null;
82
+ internalState.stack = undefined;
83
83
  thrown ? reject(suppressed) : resolve(undefined);
84
84
  }
85
85
  };
@@ -56,7 +56,7 @@ defineBuiltIns(DisposableStackPrototype, {
56
56
  var suppressed;
57
57
  while (i) {
58
58
  var disposeMethod = stack[--i];
59
- stack[i] = null;
59
+ stack[i] = undefined;
60
60
  try {
61
61
  disposeMethod();
62
62
  } catch (errorResult) {
@@ -68,7 +68,7 @@ defineBuiltIns(DisposableStackPrototype, {
68
68
  }
69
69
  }
70
70
  }
71
- internalState.stack = null;
71
+ internalState.stack = undefined;
72
72
  if (thrown) throw suppressed;
73
73
  },
74
74
  use: function use(value) {
@@ -0,0 +1,151 @@
1
+ 'use strict';
2
+ // based on Shewchuk's algorithm for exactly floating point addition
3
+ // adapted from https://github.com/tc39/proposal-math-sum/blob/3513d58323a1ae25560e8700aa5294500c6c9287/polyfill/polyfill.mjs
4
+ var $ = require('../internals/export');
5
+ var uncurryThis = require('../internals/function-uncurry-this');
6
+ var iterate = require('../internals/iterate');
7
+
8
+ var $RangeError = RangeError;
9
+ var $TypeError = TypeError;
10
+ var $Infinity = Infinity;
11
+ var $NaN = NaN;
12
+ var abs = Math.abs;
13
+ var pow = Math.pow;
14
+ var push = uncurryThis([].push);
15
+
16
+ var POW_2_1023 = pow(2, 1023);
17
+ var MAX_SAFE_INTEGER = pow(2, 53) - 1; // 2 ** 53 - 1 === 9007199254740992
18
+ var MAX_DOUBLE = Number.MAX_VALUE; // 2 ** 1024 - 2 ** (1023 - 52) === 1.79769313486231570815e+308
19
+ var MAX_ULP = pow(2, 971); // 2 ** (1023 - 52) === 1.99584030953471981166e+292
20
+
21
+ var NOT_A_NUMBER = {};
22
+ var MINUS_INFINITY = {};
23
+ var PLUS_INFINITY = {};
24
+ var MINUS_ZERO = {};
25
+ var FINITE = {};
26
+
27
+ // prerequisite: abs(x) >= abs(y)
28
+ var twosum = function (x, y) {
29
+ var hi = x + y;
30
+ var lo = y - (hi - x);
31
+ return { hi: hi, lo: lo };
32
+ };
33
+
34
+ // `Math.sumPrecise` method
35
+ // https://github.com/tc39/proposal-math-sum
36
+ $({ target: 'Math', stat: true, forced: true }, {
37
+ // eslint-disable-next-line max-statements -- ok
38
+ sumPrecise: function sumPrecise(items) {
39
+ var numbers = [];
40
+ var count = 0;
41
+ var state = MINUS_ZERO;
42
+
43
+ iterate(items, function (n) {
44
+ if (++count >= MAX_SAFE_INTEGER) throw new $RangeError('Maximum allowed index exceeded');
45
+ if (typeof n != 'number') throw new $TypeError('Value is not a number');
46
+ if (state !== NOT_A_NUMBER) {
47
+ // eslint-disable-next-line no-self-compare -- NaN check
48
+ if (n !== n) state = NOT_A_NUMBER;
49
+ else if (n === $Infinity) state = state === MINUS_INFINITY ? NOT_A_NUMBER : PLUS_INFINITY;
50
+ else if (n === -$Infinity) state = state === PLUS_INFINITY ? NOT_A_NUMBER : MINUS_INFINITY;
51
+ else if ((n !== 0 || (1 / n) === $Infinity) && (state === MINUS_ZERO || state === FINITE)) {
52
+ state = FINITE;
53
+ push(numbers, n);
54
+ }
55
+ }
56
+ });
57
+
58
+ switch (state) {
59
+ case NOT_A_NUMBER: return $NaN;
60
+ case MINUS_INFINITY: return -$Infinity;
61
+ case PLUS_INFINITY: return $Infinity;
62
+ case MINUS_ZERO: return -0;
63
+ }
64
+
65
+ var partials = [];
66
+ var overflow = 0; // conceptually 2 ** 1024 times this value; the final partial is biased by this amount
67
+ var x, y, sum, hi, lo, tmp;
68
+
69
+ for (var i = 0; i < numbers.length; i++) {
70
+ x = numbers[i];
71
+ var actuallyUsedPartials = 0;
72
+ for (var j = 0; j < partials.length; j++) {
73
+ y = partials[j];
74
+ if (abs(x) < abs(y)) {
75
+ tmp = x;
76
+ x = y;
77
+ y = tmp;
78
+ }
79
+ sum = twosum(x, y);
80
+ hi = sum.hi;
81
+ lo = sum.lo;
82
+ if (abs(hi) === $Infinity) {
83
+ var sign = hi === $Infinity ? 1 : -1;
84
+ overflow += sign;
85
+
86
+ x = (x - (sign * POW_2_1023)) - (sign * POW_2_1023);
87
+ if (abs(x) < abs(y)) {
88
+ tmp = x;
89
+ x = y;
90
+ y = tmp;
91
+ }
92
+ sum = twosum(x, y);
93
+ hi = sum.hi;
94
+ lo = sum.lo;
95
+ }
96
+ if (lo !== 0) partials[actuallyUsedPartials++] = lo;
97
+ x = hi;
98
+ }
99
+ partials.length = actuallyUsedPartials;
100
+ if (x !== 0) push(partials, x);
101
+ }
102
+
103
+ // compute the exact sum of partials, stopping once we lose precision
104
+ var n = partials.length - 1;
105
+ hi = 0;
106
+ lo = 0;
107
+
108
+ if (overflow !== 0) {
109
+ var next = n >= 0 ? partials[n] : 0;
110
+ n--;
111
+ if (abs(overflow) > 1 || (overflow > 0 && next > 0) || (overflow < 0 && next < 0)) {
112
+ return overflow > 0 ? $Infinity : -$Infinity;
113
+ }
114
+ // here we actually have to do the arithmetic
115
+ // drop a factor of 2 so we can do it without overflow
116
+ // assert(abs(overflow) === 1)
117
+ sum = twosum(overflow * POW_2_1023, next / 2);
118
+ hi = sum.hi;
119
+ lo = sum.lo;
120
+ lo *= 2;
121
+ if (abs(2 * hi) === $Infinity) {
122
+ // rounding to the maximum value
123
+ if (hi > 0) {
124
+ return (hi === POW_2_1023 && lo === -(MAX_ULP / 2) && n >= 0 && partials[n] < 0) ? MAX_DOUBLE : $Infinity;
125
+ } return (hi === -POW_2_1023 && lo === (MAX_ULP / 2) && n >= 0 && partials[n] > 0) ? -MAX_DOUBLE : -$Infinity;
126
+ }
127
+
128
+ if (lo !== 0) {
129
+ partials[++n] = lo;
130
+ lo = 0;
131
+ }
132
+
133
+ hi *= 2;
134
+ }
135
+
136
+ while (n >= 0) {
137
+ sum = twosum(hi, partials[n--]);
138
+ hi = sum.hi;
139
+ lo = sum.lo;
140
+ if (lo !== 0) break;
141
+ }
142
+
143
+ if (n >= 0 && ((lo < 0 && partials[n] < 0) || (lo > 0 && partials[n] > 0))) {
144
+ y = lo * 2;
145
+ x = hi + y;
146
+ if (y === x - hi) hi = x;
147
+ }
148
+
149
+ return hi;
150
+ }
151
+ });
@@ -1,14 +1,20 @@
1
1
  'use strict';
2
2
  var $ = require('../internals/export');
3
+ var apply = require('../internals/function-apply');
4
+ var slice = require('../internals/array-slice');
3
5
  var newPromiseCapabilityModule = require('../internals/new-promise-capability');
6
+ var aCallable = require('../internals/a-callable');
4
7
  var perform = require('../internals/perform');
5
8
 
6
9
  // `Promise.try` method
7
10
  // https://github.com/tc39/proposal-promise-try
8
11
  $({ target: 'Promise', stat: true, forced: true }, {
9
- 'try': function (callbackfn) {
12
+ 'try': function (callbackfn /* , ...args */) {
13
+ var args = slice(arguments, 1);
10
14
  var promiseCapability = newPromiseCapabilityModule.f(this);
11
- var result = perform(callbackfn);
15
+ var result = perform(function () {
16
+ return apply(aCallable(callbackfn), undefined, args);
17
+ });
12
18
  (result.error ? promiseCapability.reject : promiseCapability.resolve)(result.value);
13
19
  return promiseCapability.promise;
14
20
  }
@@ -2,10 +2,12 @@
2
2
  var $ = require('../internals/export');
3
3
  var uncurryThis = require('../internals/function-uncurry-this');
4
4
  var toString = require('../internals/to-string');
5
+ var padStart = require('../internals/string-pad').start;
5
6
  var WHITESPACES = require('../internals/whitespaces');
6
7
 
7
8
  var charCodeAt = uncurryThis(''.charCodeAt);
8
9
  var replace = uncurryThis(''.replace);
10
+ var numberToString = uncurryThis(1.1.toString);
9
11
  var NEED_ESCAPING = RegExp('[!"#$%&\'()*+,\\-./:;<=>?@[\\\\\\]^`{|}~' + WHITESPACES + ']', 'g');
10
12
 
11
13
  // `RegExp.escape` method
@@ -15,6 +17,9 @@ $({ target: 'RegExp', stat: true, forced: true }, {
15
17
  var str = toString(S);
16
18
  var firstCode = charCodeAt(str, 0);
17
19
  // escape first DecimalDigit
18
- return (firstCode > 47 && firstCode < 58 ? '\\x3' : '') + replace(str, NEED_ESCAPING, '\\$&');
20
+ return (firstCode > 47 && firstCode < 58 ? '\\x3' : '') + replace(str, NEED_ESCAPING, function (match) {
21
+ var hex = numberToString(charCodeAt(match, 0), 16);
22
+ return hex.length < 3 ? '\\x' + padStart(hex, 2, '0') : '\\u' + padStart(hex, 4, '0');
23
+ });
19
24
  }
20
25
  });
@@ -1,10 +1,3 @@
1
1
  'use strict';
2
- var $ = require('../internals/export');
3
- var difference = require('../internals/set-difference');
4
- var setMethodAcceptSetLike = require('../internals/set-method-accept-set-like');
5
-
6
- // `Set.prototype.difference` method
7
- // https://github.com/tc39/proposal-set-methods
8
- $({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike('difference') }, {
9
- difference: difference
10
- });
2
+ // TODO: Remove from `core-js@4`
3
+ require('../modules/es.set.difference.v2');
@@ -1,16 +1,3 @@
1
1
  'use strict';
2
- var $ = require('../internals/export');
3
- var fails = require('../internals/fails');
4
- var intersection = require('../internals/set-intersection');
5
- var setMethodAcceptSetLike = require('../internals/set-method-accept-set-like');
6
-
7
- var INCORRECT = !setMethodAcceptSetLike('intersection') || fails(function () {
8
- // eslint-disable-next-line es/no-array-from, es/no-set -- testing
9
- return String(Array.from(new Set([1, 2, 3]).intersection(new Set([3, 2])))) !== '3,2';
10
- });
11
-
12
- // `Set.prototype.intersection` method
13
- // https://github.com/tc39/proposal-set-methods
14
- $({ target: 'Set', proto: true, real: true, forced: INCORRECT }, {
15
- intersection: intersection
16
- });
2
+ // TODO: Remove from `core-js@4`
3
+ require('../modules/es.set.intersection.v2');
@@ -1,10 +1,3 @@
1
1
  'use strict';
2
- var $ = require('../internals/export');
3
- var isDisjointFrom = require('../internals/set-is-disjoint-from');
4
- var setMethodAcceptSetLike = require('../internals/set-method-accept-set-like');
5
-
6
- // `Set.prototype.isDisjointFrom` method
7
- // https://github.com/tc39/proposal-set-methods
8
- $({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike('isDisjointFrom') }, {
9
- isDisjointFrom: isDisjointFrom
10
- });
2
+ // TODO: Remove from `core-js@4`
3
+ require('../modules/es.set.is-disjoint-from.v2');
@@ -1,10 +1,3 @@
1
1
  'use strict';
2
- var $ = require('../internals/export');
3
- var isSubsetOf = require('../internals/set-is-subset-of');
4
- var setMethodAcceptSetLike = require('../internals/set-method-accept-set-like');
5
-
6
- // `Set.prototype.isSubsetOf` method
7
- // https://github.com/tc39/proposal-set-methods
8
- $({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike('isSubsetOf') }, {
9
- isSubsetOf: isSubsetOf
10
- });
2
+ // TODO: Remove from `core-js@4`
3
+ require('../modules/es.set.is-subset-of.v2');
@@ -1,10 +1,3 @@
1
1
  'use strict';
2
- var $ = require('../internals/export');
3
- var isSupersetOf = require('../internals/set-is-superset-of');
4
- var setMethodAcceptSetLike = require('../internals/set-method-accept-set-like');
5
-
6
- // `Set.prototype.isSupersetOf` method
7
- // https://github.com/tc39/proposal-set-methods
8
- $({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike('isSupersetOf') }, {
9
- isSupersetOf: isSupersetOf
10
- });
2
+ // TODO: Remove from `core-js@4`
3
+ require('../modules/es.set.is-superset-of.v2');
@@ -1,10 +1,3 @@
1
1
  'use strict';
2
- var $ = require('../internals/export');
3
- var symmetricDifference = require('../internals/set-symmetric-difference');
4
- var setMethodAcceptSetLike = require('../internals/set-method-accept-set-like');
5
-
6
- // `Set.prototype.symmetricDifference` method
7
- // https://github.com/tc39/proposal-set-methods
8
- $({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike('symmetricDifference') }, {
9
- symmetricDifference: symmetricDifference
10
- });
2
+ // TODO: Remove from `core-js@4`
3
+ require('../modules/es.set.symmetric-difference.v2');
@@ -1,10 +1,3 @@
1
1
  'use strict';
2
- var $ = require('../internals/export');
3
- var union = require('../internals/set-union');
4
- var setMethodAcceptSetLike = require('../internals/set-method-accept-set-like');
5
-
6
- // `Set.prototype.union` method
7
- // https://github.com/tc39/proposal-set-methods
8
- $({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike('union') }, {
9
- union: union
10
- });
2
+ // TODO: Remove from `core-js@4`
3
+ require('../modules/es.set.union.v2');
@@ -1,5 +1,6 @@
1
1
  'use strict';
2
2
  var $ = require('../internals/export');
3
+ var globalThis = require('../internals/global');
3
4
  var isPrototypeOf = require('../internals/object-is-prototype-of');
4
5
  var getPrototypeOf = require('../internals/object-get-prototype-of');
5
6
  var setPrototypeOf = require('../internals/object-set-prototype-of');
@@ -10,15 +11,30 @@ var createPropertyDescriptor = require('../internals/create-property-descriptor'
10
11
  var installErrorStack = require('../internals/error-stack-install');
11
12
  var normalizeStringArgument = require('../internals/normalize-string-argument');
12
13
  var wellKnownSymbol = require('../internals/well-known-symbol');
14
+ var fails = require('../internals/fails');
15
+ var IS_PURE = require('../internals/is-pure');
13
16
 
17
+ var NativeSuppressedError = globalThis.SuppressedError;
14
18
  var TO_STRING_TAG = wellKnownSymbol('toStringTag');
15
19
  var $Error = Error;
16
20
 
21
+ // https://github.com/oven-sh/bun/issues/9282
22
+ var WRONG_ARITY = !!NativeSuppressedError && NativeSuppressedError.length !== 3;
23
+
24
+ // https://github.com/oven-sh/bun/issues/9283
25
+ var EXTRA_ARGS_SUPPORT = !!NativeSuppressedError && fails(function () {
26
+ return NativeSuppressedError(1, 2, 3, { cause: 4 }).cause === 4;
27
+ });
28
+
29
+ var PATCH = WRONG_ARITY || EXTRA_ARGS_SUPPORT;
30
+
17
31
  var $SuppressedError = function SuppressedError(error, suppressed, message) {
18
32
  var isInstance = isPrototypeOf(SuppressedErrorPrototype, this);
19
33
  var that;
20
34
  if (setPrototypeOf) {
21
- that = setPrototypeOf(new $Error(), isInstance ? getPrototypeOf(this) : SuppressedErrorPrototype);
35
+ that = PATCH && (!isInstance || getPrototypeOf(this) === SuppressedErrorPrototype)
36
+ ? new NativeSuppressedError()
37
+ : setPrototypeOf(new $Error(), isInstance ? getPrototypeOf(this) : SuppressedErrorPrototype);
22
38
  } else {
23
39
  that = isInstance ? this : create(SuppressedErrorPrototype);
24
40
  createNonEnumerableProperty(that, TO_STRING_TAG, 'Error');
@@ -33,14 +49,16 @@ var $SuppressedError = function SuppressedError(error, suppressed, message) {
33
49
  if (setPrototypeOf) setPrototypeOf($SuppressedError, $Error);
34
50
  else copyConstructorProperties($SuppressedError, $Error, { name: true });
35
51
 
36
- var SuppressedErrorPrototype = $SuppressedError.prototype = create($Error.prototype, {
52
+ var SuppressedErrorPrototype = $SuppressedError.prototype = PATCH ? NativeSuppressedError.prototype : create($Error.prototype, {
37
53
  constructor: createPropertyDescriptor(1, $SuppressedError),
38
54
  message: createPropertyDescriptor(1, ''),
39
55
  name: createPropertyDescriptor(1, 'SuppressedError')
40
56
  });
41
57
 
58
+ if (PATCH && !IS_PURE) SuppressedErrorPrototype.constructor = $SuppressedError;
59
+
42
60
  // `SuppressedError` constructor
43
61
  // https://github.com/tc39/proposal-explicit-resource-management
44
- $({ global: true, constructor: true, arity: 3 }, {
62
+ $({ global: true, constructor: true, arity: 3, forced: PATCH }, {
45
63
  SuppressedError: $SuppressedError
46
64
  });
@@ -0,0 +1,6 @@
1
+ 'use strict';
2
+ var defineWellKnownSymbol = require('../internals/well-known-symbol-define');
3
+
4
+ // `Symbol.customMatcher` well-known symbol
5
+ // https://github.com/tc39/proposal-pattern-matching
6
+ defineWellKnownSymbol('customMatcher');
@@ -1,12 +1,23 @@
1
1
  'use strict';
2
2
  var $ = require('../internals/export');
3
+ var globalThis = require('../internals/global');
3
4
  var microtask = require('../internals/microtask');
4
5
  var aCallable = require('../internals/a-callable');
5
6
  var validateArgumentsLength = require('../internals/validate-arguments-length');
7
+ var fails = require('../internals/fails');
8
+ var DESCRIPTORS = require('../internals/descriptors');
9
+
10
+ // Bun ~ 1.0.30 bug
11
+ // https://github.com/oven-sh/bun/issues/9249
12
+ var WRONG_ARITY = fails(function () {
13
+ // getOwnPropertyDescriptor for prevent experimental warning in Node 11
14
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
15
+ return DESCRIPTORS && Object.getOwnPropertyDescriptor(globalThis, 'queueMicrotask').value.length !== 1;
16
+ });
6
17
 
7
18
  // `queueMicrotask` method
8
19
  // https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-queuemicrotask
9
- $({ global: true, enumerable: true, dontCallGetSet: true }, {
20
+ $({ global: true, enumerable: true, dontCallGetSet: true, forced: WRONG_ARITY }, {
10
21
  queueMicrotask: function queueMicrotask(fn) {
11
22
  validateArgumentsLength(arguments.length, 1);
12
23
  microtask(aCallable(fn));
@@ -14,9 +14,15 @@ var THROWS_WITHOUT_ARGUMENTS = USE_NATIVE_URL && fails(function () {
14
14
  URL.canParse();
15
15
  });
16
16
 
17
+ // Bun ~ 1.0.30 bug
18
+ // https://github.com/oven-sh/bun/issues/9250
19
+ var WRONG_ARITY = fails(function () {
20
+ return URL.canParse.length !== 1;
21
+ });
22
+
17
23
  // `URL.canParse` method
18
24
  // https://url.spec.whatwg.org/#dom-url-canparse
19
- $({ target: 'URL', stat: true, forced: !THROWS_WITHOUT_ARGUMENTS }, {
25
+ $({ target: 'URL', stat: true, forced: !THROWS_WITHOUT_ARGUMENTS || WRONG_ARITY }, {
20
26
  canParse: function canParse(url) {
21
27
  var length = validateArgumentsLength(arguments.length, 1);
22
28
  var urlString = toString(url);
@@ -0,0 +1,22 @@
1
+ 'use strict';
2
+ var $ = require('../internals/export');
3
+ var getBuiltIn = require('../internals/get-built-in');
4
+ var validateArgumentsLength = require('../internals/validate-arguments-length');
5
+ var toString = require('../internals/to-string');
6
+
7
+ var URL = getBuiltIn('URL');
8
+
9
+ // `URL.parse` method
10
+ // https://url.spec.whatwg.org/#dom-url-canparse
11
+ $({ target: 'URL', stat: true }, {
12
+ parse: function parse(url) {
13
+ var length = validateArgumentsLength(arguments.length, 1);
14
+ var urlString = toString(url);
15
+ var base = length < 2 || arguments[1] === undefined ? undefined : toString(arguments[1]);
16
+ try {
17
+ return new URL(urlString, base);
18
+ } catch (error) {
19
+ return null;
20
+ }
21
+ }
22
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "core-js",
3
- "version": "3.36.0",
3
+ "version": "3.37.0",
4
4
  "type": "commonjs",
5
5
  "description": "Standard library",
6
6
  "keywords": [
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+ // https://github.com/tc39/proposal-extractors
3
+ require('../modules/esnext.symbol.custom-matcher');
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+ // https://github.com/tc39/proposal-math-sum
3
+ require('../modules/esnext.math.sum-precise');
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+ // https://github.com/tc39/proposal-pattern-matching
3
+ require('../modules/esnext.symbol.custom-matcher');
package/stable/index.js CHANGED
@@ -168,6 +168,13 @@ require('../modules/es.regexp.sticky');
168
168
  require('../modules/es.regexp.test');
169
169
  require('../modules/es.regexp.to-string');
170
170
  require('../modules/es.set');
171
+ require('../modules/es.set.difference.v2');
172
+ require('../modules/es.set.intersection.v2');
173
+ require('../modules/es.set.is-disjoint-from.v2');
174
+ require('../modules/es.set.is-subset-of.v2');
175
+ require('../modules/es.set.is-superset-of.v2');
176
+ require('../modules/es.set.symmetric-difference.v2');
177
+ require('../modules/es.set.union.v2');
171
178
  require('../modules/es.string.at-alternative');
172
179
  require('../modules/es.string.code-point-at');
173
180
  require('../modules/es.string.ends-with');
@@ -261,6 +268,7 @@ require('../modules/web.structured-clone');
261
268
  require('../modules/web.timers');
262
269
  require('../modules/web.url');
263
270
  require('../modules/web.url.can-parse');
271
+ require('../modules/web.url.parse');
264
272
  require('../modules/web.url.to-json');
265
273
  require('../modules/web.url-search-params');
266
274
  require('../modules/web.url-search-params.delete');
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+ var parent = require('../../es/set/difference');
3
+
4
+ module.exports = parent;
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+ var parent = require('../../es/set/intersection');
3
+
4
+ module.exports = parent;
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+ var parent = require('../../es/set/is-disjoint-from');
3
+
4
+ module.exports = parent;
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+ var parent = require('../../es/set/is-subset-of');
3
+
4
+ module.exports = parent;
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+ var parent = require('../../es/set/is-superset-of');
3
+
4
+ module.exports = parent;
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+ var parent = require('../../es/set/symmetric-difference');
3
+
4
+ module.exports = parent;
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+ var parent = require('../../es/set/union');
3
+
4
+ module.exports = parent;
@@ -0,0 +1,6 @@
1
+ 'use strict';
2
+ require('../../modules/web.url');
3
+ require('../../modules/web.url.parse');
4
+ var path = require('../../internals/path');
5
+
6
+ module.exports = path.URL.parse;
package/stage/1.js CHANGED
@@ -7,13 +7,14 @@ require('../proposals/array-unique');
7
7
  require('../proposals/collection-methods');
8
8
  require('../proposals/collection-of-from');
9
9
  require('../proposals/data-view-get-set-uint8-clamped');
10
+ require('../proposals/extractors');
10
11
  require('../proposals/keys-composition');
11
12
  require('../proposals/math-extensions');
12
13
  require('../proposals/math-signbit');
13
14
  require('../proposals/number-from-string');
14
15
  require('../proposals/object-iteration');
15
16
  require('../proposals/observable');
16
- require('../proposals/pattern-matching');
17
+ require('../proposals/pattern-matching-v2');
17
18
  require('../proposals/seeded-random');
18
19
  require('../proposals/string-code-points');
19
20
  require('../proposals/string-cooked');
@@ -21,6 +22,7 @@ require('../proposals/string-cooked');
21
22
  require('../proposals/array-from-async');
22
23
  require('../proposals/map-upsert');
23
24
  require('../proposals/number-range');
25
+ require('../proposals/pattern-matching');
24
26
  require('../proposals/string-replace-all');
25
27
 
26
28
  module.exports = parent;
package/stage/2.7.js CHANGED
@@ -1,6 +1,7 @@
1
1
  'use strict';
2
2
  var parent = require('./3');
3
3
 
4
- // nothing
4
+ require('../proposals/math-sum');
5
+ require('../proposals/promise-try');
5
6
 
6
7
  module.exports = parent;
package/stage/2.js CHANGED
@@ -5,7 +5,6 @@ require('../proposals/array-is-template-object');
5
5
  require('../proposals/async-iterator-helpers');
6
6
  require('../proposals/iterator-range');
7
7
  require('../proposals/map-upsert-stage-2');
8
- require('../proposals/promise-try');
9
8
  require('../proposals/regexp-escaping');
10
9
  require('../proposals/string-dedent');
11
10
  require('../proposals/symbol-predicates-v2');
package/stage/3.js CHANGED
@@ -8,7 +8,6 @@ require('../proposals/explicit-resource-management');
8
8
  require('../proposals/float16');
9
9
  require('../proposals/iterator-helpers-stage-3-2');
10
10
  require('../proposals/json-parse-with-source');
11
- require('../proposals/set-methods-v2');
12
11
  // TODO: Obsolete versions, remove from `core-js@4`
13
12
  require('../proposals/array-grouping-stage-3');
14
13
  require('../proposals/array-grouping-stage-3-2');
package/stage/4.js CHANGED
@@ -11,6 +11,7 @@ require('../proposals/promise-all-settled');
11
11
  require('../proposals/promise-any');
12
12
  require('../proposals/promise-with-resolvers');
13
13
  require('../proposals/relative-indexing-method');
14
+ require('../proposals/set-methods-v2');
14
15
  require('../proposals/string-match-all');
15
16
  require('../proposals/string-replace-all-stage-4');
16
17
  require('../proposals/well-formed-unicode-strings');
package/web/index.js CHANGED
@@ -13,6 +13,7 @@ require('../modules/web.structured-clone');
13
13
  require('../modules/web.timers');
14
14
  require('../modules/web.url');
15
15
  require('../modules/web.url.can-parse');
16
+ require('../modules/web.url.parse');
16
17
  require('../modules/web.url.to-json');
17
18
  require('../modules/web.url-search-params');
18
19
  require('../modules/web.url-search-params.delete');
package/web/url.js CHANGED
@@ -2,6 +2,7 @@
2
2
  require('./url-search-params');
3
3
  require('../modules/web.url');
4
4
  require('../modules/web.url.can-parse');
5
+ require('../modules/web.url.parse');
5
6
  require('../modules/web.url.to-json');
6
7
  var path = require('../internals/path');
7
8