core-js 3.27.0 → 3.27.1
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.
- package/actual/async-iterator/from.js +11 -0
- package/actual/disposable-stack/constructor.js +2 -0
- package/actual/disposable-stack/index.js +2 -0
- package/actual/iterator/from.js +14 -0
- package/actual/suppressed-error.js +1 -0
- package/full/async-disposable-stack/constructor.js +3 -0
- package/full/async-disposable-stack/index.js +3 -0
- package/internals/shared.js +2 -2
- package/modules/es.weak-map.constructor.js +45 -4
- package/package.json +1 -1
|
@@ -3,7 +3,18 @@ require('../../modules/es.object.to-string');
|
|
|
3
3
|
require('../../modules/es.promise');
|
|
4
4
|
require('../../modules/es.string.iterator');
|
|
5
5
|
require('../../modules/esnext.async-iterator.constructor');
|
|
6
|
+
require('../../modules/esnext.async-iterator.drop');
|
|
7
|
+
require('../../modules/esnext.async-iterator.every');
|
|
8
|
+
require('../../modules/esnext.async-iterator.filter');
|
|
9
|
+
require('../../modules/esnext.async-iterator.find');
|
|
10
|
+
require('../../modules/esnext.async-iterator.flat-map');
|
|
11
|
+
require('../../modules/esnext.async-iterator.for-each');
|
|
6
12
|
require('../../modules/esnext.async-iterator.from');
|
|
13
|
+
require('../../modules/esnext.async-iterator.map');
|
|
14
|
+
require('../../modules/esnext.async-iterator.reduce');
|
|
15
|
+
require('../../modules/esnext.async-iterator.some');
|
|
16
|
+
require('../../modules/esnext.async-iterator.take');
|
|
17
|
+
require('../../modules/esnext.async-iterator.to-array');
|
|
7
18
|
require('../../modules/web.dom-collections.iterator');
|
|
8
19
|
|
|
9
20
|
var path = require('../../internals/path');
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
require('../../modules/es.error.cause');
|
|
2
|
+
require('../../modules/es.error.to-string');
|
|
2
3
|
require('../../modules/es.object.to-string');
|
|
3
4
|
require('../../modules/esnext.suppressed-error.constructor');
|
|
4
5
|
require('../../modules/esnext.disposable-stack.constructor');
|
|
6
|
+
require('../../modules/esnext.iterator.dispose');
|
|
5
7
|
var path = require('../../internals/path');
|
|
6
8
|
|
|
7
9
|
module.exports = path.DisposableStack;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
require('../../modules/es.error.cause');
|
|
2
|
+
require('../../modules/es.error.to-string');
|
|
2
3
|
require('../../modules/es.object.to-string');
|
|
3
4
|
require('../../modules/esnext.suppressed-error.constructor');
|
|
4
5
|
require('../../modules/esnext.disposable-stack.constructor');
|
|
6
|
+
require('../../modules/esnext.iterator.dispose');
|
|
5
7
|
var path = require('../../internals/path');
|
|
6
8
|
|
|
7
9
|
module.exports = path.DisposableStack;
|
package/actual/iterator/from.js
CHANGED
|
@@ -1,8 +1,22 @@
|
|
|
1
1
|
require('../../modules/es.array.iterator');
|
|
2
2
|
require('../../modules/es.object.to-string');
|
|
3
|
+
require('../../modules/es.promise');
|
|
3
4
|
require('../../modules/es.string.iterator');
|
|
4
5
|
require('../../modules/esnext.iterator.constructor');
|
|
6
|
+
require('../../modules/esnext.iterator.dispose');
|
|
7
|
+
require('../../modules/esnext.iterator.drop');
|
|
8
|
+
require('../../modules/esnext.iterator.every');
|
|
9
|
+
require('../../modules/esnext.iterator.filter');
|
|
10
|
+
require('../../modules/esnext.iterator.find');
|
|
11
|
+
require('../../modules/esnext.iterator.flat-map');
|
|
12
|
+
require('../../modules/esnext.iterator.for-each');
|
|
5
13
|
require('../../modules/esnext.iterator.from');
|
|
14
|
+
require('../../modules/esnext.iterator.map');
|
|
15
|
+
require('../../modules/esnext.iterator.reduce');
|
|
16
|
+
require('../../modules/esnext.iterator.some');
|
|
17
|
+
require('../../modules/esnext.iterator.take');
|
|
18
|
+
require('../../modules/esnext.iterator.to-array');
|
|
19
|
+
require('../../modules/esnext.iterator.to-async');
|
|
6
20
|
require('../../modules/web.dom-collections.iterator');
|
|
7
21
|
|
|
8
22
|
var path = require('../../internals/path');
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
require('../../modules/es.error.cause');
|
|
2
|
+
require('../../modules/es.error.to-string');
|
|
2
3
|
require('../../modules/es.object.to-string');
|
|
3
4
|
require('../../modules/es.promise');
|
|
4
5
|
require('../../modules/esnext.suppressed-error.constructor');
|
|
5
6
|
require('../../modules/esnext.async-disposable-stack.constructor');
|
|
7
|
+
require('../../modules/esnext.async-iterator.async-dispose');
|
|
8
|
+
require('../../modules/esnext.iterator.dispose');
|
|
6
9
|
var path = require('../../internals/path');
|
|
7
10
|
|
|
8
11
|
module.exports = path.AsyncDisposableStack;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
require('../../modules/es.error.cause');
|
|
2
|
+
require('../../modules/es.error.to-string');
|
|
2
3
|
require('../../modules/es.object.to-string');
|
|
3
4
|
require('../../modules/es.promise');
|
|
4
5
|
require('../../modules/esnext.suppressed-error.constructor');
|
|
5
6
|
require('../../modules/esnext.async-disposable-stack.constructor');
|
|
7
|
+
require('../../modules/esnext.async-iterator.async-dispose');
|
|
8
|
+
require('../../modules/esnext.iterator.dispose');
|
|
6
9
|
var path = require('../../internals/path');
|
|
7
10
|
|
|
8
11
|
module.exports = path.AsyncDisposableStack;
|
package/internals/shared.js
CHANGED
|
@@ -4,9 +4,9 @@ var store = require('../internals/shared-store');
|
|
|
4
4
|
(module.exports = function (key, value) {
|
|
5
5
|
return store[key] || (store[key] = value !== undefined ? value : {});
|
|
6
6
|
})('versions', []).push({
|
|
7
|
-
version: '3.27.
|
|
7
|
+
version: '3.27.1',
|
|
8
8
|
mode: IS_PURE ? 'pure' : 'global',
|
|
9
9
|
copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
|
|
10
|
-
license: 'https://github.com/zloirock/core-js/blob/v3.27.
|
|
10
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.27.1/LICENSE',
|
|
11
11
|
source: 'https://github.com/zloirock/core-js'
|
|
12
12
|
});
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
+
var FREEZING = require('../internals/freezing');
|
|
2
3
|
var global = require('../internals/global');
|
|
3
4
|
var uncurryThis = require('../internals/function-uncurry-this');
|
|
4
5
|
var defineBuiltIns = require('../internals/define-built-ins');
|
|
@@ -6,10 +7,26 @@ var InternalMetadataModule = require('../internals/internal-metadata');
|
|
|
6
7
|
var collection = require('../internals/collection');
|
|
7
8
|
var collectionWeak = require('../internals/collection-weak');
|
|
8
9
|
var isObject = require('../internals/is-object');
|
|
9
|
-
var isExtensible = require('../internals/object-is-extensible');
|
|
10
10
|
var enforceInternalState = require('../internals/internal-state').enforce;
|
|
11
|
+
var fails = require('../internals/fails');
|
|
11
12
|
var NATIVE_WEAK_MAP = require('../internals/weak-map-basic-detection');
|
|
12
13
|
|
|
14
|
+
var $Object = Object;
|
|
15
|
+
// eslint-disable-next-line es/no-array-isarray -- safe
|
|
16
|
+
var isArray = Array.isArray;
|
|
17
|
+
// eslint-disable-next-line es/no-object-isextensible -- safe
|
|
18
|
+
var isExtensible = $Object.isExtensible;
|
|
19
|
+
// eslint-disable-next-line es/no-object-isfrozen -- safe
|
|
20
|
+
var isFrozen = $Object.isFrozen;
|
|
21
|
+
// eslint-disable-next-line es/no-object-issealed -- safe
|
|
22
|
+
var isSealed = $Object.isSealed;
|
|
23
|
+
// eslint-disable-next-line es/no-object-freeze -- safe
|
|
24
|
+
var freeze = $Object.freeze;
|
|
25
|
+
// eslint-disable-next-line es/no-object-seal -- safe
|
|
26
|
+
var seal = $Object.seal;
|
|
27
|
+
|
|
28
|
+
var FROZEN = {};
|
|
29
|
+
var SEALED = {};
|
|
13
30
|
var IS_IE11 = !global.ActiveXObject && 'ActiveXObject' in global;
|
|
14
31
|
var InternalWeakMap;
|
|
15
32
|
|
|
@@ -22,18 +39,27 @@ var wrapper = function (init) {
|
|
|
22
39
|
// `WeakMap` constructor
|
|
23
40
|
// https://tc39.es/ecma262/#sec-weakmap-constructor
|
|
24
41
|
var $WeakMap = collection('WeakMap', wrapper, collectionWeak);
|
|
42
|
+
var WeakMapPrototype = $WeakMap.prototype;
|
|
43
|
+
var nativeSet = uncurryThis(WeakMapPrototype.set);
|
|
44
|
+
|
|
45
|
+
// Chakra Edge bug: adding frozen arrays to WeakMap unfreeze them
|
|
46
|
+
var hasMSEdgeFreezingBug = function () {
|
|
47
|
+
return FREEZING && fails(function () {
|
|
48
|
+
var frozenArray = freeze([]);
|
|
49
|
+
nativeSet(new $WeakMap(), frozenArray, 1);
|
|
50
|
+
return !isFrozen(frozenArray);
|
|
51
|
+
});
|
|
52
|
+
};
|
|
25
53
|
|
|
26
54
|
// IE11 WeakMap frozen keys fix
|
|
27
55
|
// We can't use feature detection because it crash some old IE builds
|
|
28
56
|
// https://github.com/zloirock/core-js/issues/485
|
|
29
|
-
if (NATIVE_WEAK_MAP
|
|
57
|
+
if (NATIVE_WEAK_MAP) if (IS_IE11) {
|
|
30
58
|
InternalWeakMap = collectionWeak.getConstructor(wrapper, 'WeakMap', true);
|
|
31
59
|
InternalMetadataModule.enable();
|
|
32
|
-
var WeakMapPrototype = $WeakMap.prototype;
|
|
33
60
|
var nativeDelete = uncurryThis(WeakMapPrototype['delete']);
|
|
34
61
|
var nativeHas = uncurryThis(WeakMapPrototype.has);
|
|
35
62
|
var nativeGet = uncurryThis(WeakMapPrototype.get);
|
|
36
|
-
var nativeSet = uncurryThis(WeakMapPrototype.set);
|
|
37
63
|
defineBuiltIns(WeakMapPrototype, {
|
|
38
64
|
'delete': function (key) {
|
|
39
65
|
if (isObject(key) && !isExtensible(key)) {
|
|
@@ -65,4 +91,19 @@ if (NATIVE_WEAK_MAP && IS_IE11) {
|
|
|
65
91
|
return this;
|
|
66
92
|
}
|
|
67
93
|
});
|
|
94
|
+
// Chakra Edge frozen keys fix
|
|
95
|
+
} else if (hasMSEdgeFreezingBug()) {
|
|
96
|
+
defineBuiltIns(WeakMapPrototype, {
|
|
97
|
+
set: function set(key, value) {
|
|
98
|
+
var arrayIntegrityLevel;
|
|
99
|
+
if (isArray(key)) {
|
|
100
|
+
if (isFrozen(key)) arrayIntegrityLevel = FROZEN;
|
|
101
|
+
else if (isSealed(key)) arrayIntegrityLevel = SEALED;
|
|
102
|
+
}
|
|
103
|
+
nativeSet(this, key, value);
|
|
104
|
+
if (arrayIntegrityLevel == FROZEN) freeze(key);
|
|
105
|
+
if (arrayIntegrityLevel == SEALED) seal(key);
|
|
106
|
+
return this;
|
|
107
|
+
}
|
|
108
|
+
});
|
|
68
109
|
}
|