core-js 3.37.1 → 3.38.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/promise/index.js +1 -0
- package/actual/promise/try.js +13 -0
- package/actual/regexp/escape.js +5 -0
- package/actual/regexp/index.js +1 -0
- package/actual/typed-array/index.js +2 -0
- package/actual/typed-array/methods.js +2 -0
- package/actual/typed-array/set-from-base64.js +2 -0
- package/actual/typed-array/set-from-hex.js +2 -0
- package/es/global-this.js +1 -1
- package/es/typed-array/float32-array.js +1 -1
- package/es/typed-array/float64-array.js +1 -1
- package/es/typed-array/index.js +1 -1
- package/es/typed-array/int16-array.js +1 -1
- package/es/typed-array/int32-array.js +1 -1
- package/es/typed-array/int8-array.js +1 -1
- package/es/typed-array/uint16-array.js +1 -1
- package/es/typed-array/uint32-array.js +1 -1
- package/es/typed-array/uint8-array.js +1 -1
- package/es/typed-array/uint8-clamped-array.js +1 -1
- package/features/typed-array/set-from-base64.js +2 -0
- package/features/typed-array/set-from-hex.js +2 -0
- package/full/index.js +2 -0
- package/full/promise/index.js +0 -1
- package/full/promise/try.js +2 -11
- package/full/regexp/escape.js +2 -3
- package/full/regexp/index.js +0 -1
- package/full/typed-array/set-from-base64.js +4 -0
- package/full/typed-array/set-from-hex.js +4 -0
- package/internals/array-buffer-byte-length.js +5 -3
- package/internals/array-buffer-is-detached.js +6 -2
- package/internals/array-buffer-not-detached.js +9 -0
- package/internals/array-buffer-transfer.js +6 -7
- package/internals/array-buffer-view-core.js +14 -14
- package/internals/array-buffer.js +7 -7
- package/internals/array-method-has-species-support.js +1 -1
- package/internals/async-iterator-prototype.js +3 -3
- package/internals/collection-strong.js +7 -7
- package/internals/collection-weak.js +2 -2
- package/internals/collection.js +2 -2
- package/internals/define-global-property.js +3 -3
- package/internals/detach-transferable.js +6 -6
- package/internals/document-create-element.js +2 -2
- package/internals/entry-unbind.js +2 -2
- package/internals/entry-virtual.js +2 -2
- package/internals/{engine-ff-version.js → environment-ff-version.js} +1 -1
- package/internals/{engine-is-ie-or-edge.js → environment-is-ie-or-edge.js} +1 -1
- package/internals/{engine-is-ios-pebble.js → environment-is-ios-pebble.js} +1 -1
- package/internals/{engine-is-ios.js → environment-is-ios.js} +1 -1
- package/internals/environment-is-node.js +4 -0
- package/internals/{engine-is-webos-webkit.js → environment-is-webos-webkit.js} +1 -1
- package/internals/environment-user-agent.js +7 -0
- package/internals/{engine-v8-version.js → environment-v8-version.js} +4 -4
- package/internals/{engine-webkit-version.js → environment-webkit-version.js} +1 -1
- package/internals/environment.js +21 -0
- package/internals/export.js +4 -4
- package/internals/get-built-in-node-module.js +15 -0
- package/internals/get-built-in-prototype-method.js +2 -2
- package/internals/get-built-in.js +2 -2
- package/internals/ieee754.js +1 -1
- package/internals/internal-state.js +3 -3
- package/internals/microtask.js +10 -10
- package/internals/number-is-finite.js +2 -2
- package/internals/number-parse-float.js +3 -3
- package/internals/number-parse-int.js +3 -3
- package/internals/object-create.js +2 -1
- package/internals/object-prototype-accessors-forced.js +5 -4
- package/internals/path.js +2 -2
- package/internals/promise-constructor-detection.js +5 -6
- package/internals/promise-native-constructor.js +2 -2
- package/internals/regexp-sticky-helpers.js +2 -2
- package/internals/regexp-unsupported-dot-all.js +2 -2
- package/internals/regexp-unsupported-ncg.js +2 -2
- package/internals/safe-get-built-in.js +3 -3
- package/internals/schedulers-fix.js +6 -6
- package/internals/shared-store.js +3 -3
- package/internals/string-pad-webkit-bug.js +1 -1
- package/internals/structured-clone-proper-transfer.js +5 -7
- package/internals/symbol-constructor-detection.js +3 -3
- package/internals/task.js +16 -16
- package/internals/typed-array-constructor.js +3 -3
- package/internals/typed-array-constructors-require-wrappers.js +4 -4
- package/internals/uint8-from-base64.js +156 -0
- package/internals/uint8-from-hex.js +26 -0
- package/internals/url-constructor-detection.js +5 -5
- package/internals/weak-map-basic-detection.js +2 -2
- package/internals/well-known-symbol.js +2 -2
- package/modules/es.array-buffer.constructor.js +2 -2
- package/modules/es.array.concat.js +1 -1
- package/modules/es.array.iterator.js +1 -1
- package/modules/es.array.reduce-right.js +2 -2
- package/modules/es.array.reduce.js +2 -2
- package/modules/es.array.sort.js +4 -4
- package/modules/es.error.cause.js +2 -2
- package/modules/es.global-this.js +3 -3
- package/modules/es.json.to-string-tag.js +2 -2
- package/modules/es.number.constructor.js +3 -3
- package/modules/es.number.to-exponential.js +2 -6
- package/modules/es.object.group-by.js +1 -1
- package/modules/es.promise.constructor.js +11 -11
- package/modules/es.reflect.to-string-tag.js +2 -2
- package/modules/es.regexp.constructor.js +10 -5
- package/modules/es.regexp.flags.js +2 -2
- package/modules/es.string.at-alternative.js +1 -1
- package/modules/es.string.replace-all.js +3 -7
- package/modules/es.string.to-well-formed.js +1 -1
- package/modules/es.symbol.constructor.js +6 -6
- package/modules/es.symbol.description.js +3 -2
- package/modules/es.typed-array.iterator.js +2 -2
- package/modules/es.typed-array.set.js +3 -3
- package/modules/es.typed-array.sort.js +6 -6
- package/modules/es.typed-array.to-locale-string.js +2 -2
- package/modules/es.typed-array.to-string.js +2 -2
- package/modules/es.weak-map.constructor.js +2 -2
- package/modules/esnext.async-disposable-stack.constructor.js +2 -2
- package/modules/esnext.disposable-stack.constructor.js +2 -2
- package/modules/esnext.iterator.constructor.js +2 -2
- package/modules/esnext.json.parse.js +7 -7
- package/modules/esnext.json.raw-json.js +5 -3
- package/modules/esnext.observable.constructor.js +5 -5
- package/modules/esnext.promise.try.js +14 -2
- package/modules/esnext.regexp.escape.js +56 -11
- package/modules/esnext.string.dedent.js +1 -0
- package/modules/esnext.suppressed-error.constructor.js +1 -1
- package/modules/esnext.symbol.async-dispose.js +2 -2
- package/modules/esnext.symbol.dispose.js +2 -2
- package/modules/esnext.uint8-array.from-base64.js +6 -65
- package/modules/esnext.uint8-array.from-hex.js +4 -19
- package/modules/esnext.uint8-array.set-from-base64.js +19 -0
- package/modules/esnext.uint8-array.set-from-hex.js +19 -0
- package/modules/esnext.uint8-array.to-base64.js +7 -5
- package/modules/esnext.uint8-array.to-hex.js +4 -3
- package/modules/web.atob.js +2 -2
- package/modules/web.btoa.js +2 -2
- package/modules/web.clear-immediate.js +2 -2
- package/modules/web.dom-collections.for-each.js +2 -2
- package/modules/web.dom-collections.iterator.js +2 -2
- package/modules/web.dom-exception.constructor.js +2 -2
- package/modules/web.dom-exception.stack.js +2 -2
- package/modules/web.queue-microtask.js +1 -1
- package/modules/web.self.js +8 -8
- package/modules/web.set-immediate.js +3 -3
- package/modules/web.set-interval.js +3 -3
- package/modules/web.set-timeout.js +3 -3
- package/modules/web.structured-clone.js +18 -18
- package/modules/web.url-search-params.constructor.js +120 -25
- package/modules/web.url.constructor.js +14 -12
- package/package.json +4 -2
- package/proposals/array-buffer-base64.js +2 -0
- package/proposals/global-this.js +2 -2
- package/stage/2.7.js +0 -1
- package/stage/2.js +0 -1
- package/stage/3.js +2 -0
- package/internals/engine-is-browser.js +0 -7
- package/internals/engine-is-bun.js +0 -3
- package/internals/engine-is-deno.js +0 -3
- package/internals/engine-is-node.js +0 -5
- package/internals/engine-user-agent.js +0 -2
- package/internals/try-node-require.js +0 -9
- /package/internals/{global.js → global-this.js} +0 -0
|
@@ -4,7 +4,7 @@ require('../modules/es.string.iterator');
|
|
|
4
4
|
var $ = require('../internals/export');
|
|
5
5
|
var DESCRIPTORS = require('../internals/descriptors');
|
|
6
6
|
var USE_NATIVE_URL = require('../internals/url-constructor-detection');
|
|
7
|
-
var
|
|
7
|
+
var globalThis = require('../internals/global-this');
|
|
8
8
|
var bind = require('../internals/function-bind-context');
|
|
9
9
|
var uncurryThis = require('../internals/function-uncurry-this');
|
|
10
10
|
var defineBuiltIn = require('../internals/define-built-in');
|
|
@@ -27,9 +27,9 @@ var getInternalURLState = InternalStateModule.getterFor('URL');
|
|
|
27
27
|
var URLSearchParams = URLSearchParamsModule.URLSearchParams;
|
|
28
28
|
var getInternalSearchParamsState = URLSearchParamsModule.getState;
|
|
29
29
|
|
|
30
|
-
var NativeURL =
|
|
31
|
-
var TypeError =
|
|
32
|
-
var parseInt =
|
|
30
|
+
var NativeURL = globalThis.URL;
|
|
31
|
+
var TypeError = globalThis.TypeError;
|
|
32
|
+
var parseInt = globalThis.parseInt;
|
|
33
33
|
var floor = Math.floor;
|
|
34
34
|
var pow = Math.pow;
|
|
35
35
|
var charAt = uncurryThis(''.charAt);
|
|
@@ -203,25 +203,25 @@ var findLongestZeroSequence = function (ipv6) {
|
|
|
203
203
|
++currLength;
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
|
-
|
|
207
|
-
maxIndex = currStart;
|
|
208
|
-
maxLength = currLength;
|
|
209
|
-
}
|
|
210
|
-
return maxIndex;
|
|
206
|
+
return currLength > maxLength ? currStart : maxIndex;
|
|
211
207
|
};
|
|
212
208
|
|
|
213
209
|
// https://url.spec.whatwg.org/#host-serializing
|
|
214
210
|
var serializeHost = function (host) {
|
|
215
211
|
var result, index, compress, ignore0;
|
|
212
|
+
|
|
216
213
|
// ipv4
|
|
217
214
|
if (typeof host == 'number') {
|
|
218
215
|
result = [];
|
|
219
216
|
for (index = 0; index < 4; index++) {
|
|
220
217
|
unshift(result, host % 256);
|
|
221
218
|
host = floor(host / 256);
|
|
222
|
-
}
|
|
219
|
+
}
|
|
220
|
+
return join(result, '.');
|
|
221
|
+
}
|
|
222
|
+
|
|
223
223
|
// ipv6
|
|
224
|
-
|
|
224
|
+
if (typeof host == 'object') {
|
|
225
225
|
result = '';
|
|
226
226
|
compress = findLongestZeroSequence(host);
|
|
227
227
|
for (index = 0; index < 8; index++) {
|
|
@@ -236,7 +236,9 @@ var serializeHost = function (host) {
|
|
|
236
236
|
}
|
|
237
237
|
}
|
|
238
238
|
return '[' + result + ']';
|
|
239
|
-
}
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
return host;
|
|
240
242
|
};
|
|
241
243
|
|
|
242
244
|
var C0ControlPercentEncodeSet = {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "core-js",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.38.1",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"description": "Standard library",
|
|
6
6
|
"keywords": [
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"ES2021",
|
|
18
18
|
"ES2022",
|
|
19
19
|
"ES2023",
|
|
20
|
+
"ES2024",
|
|
20
21
|
"ECMAScript 3",
|
|
21
22
|
"ECMAScript 5",
|
|
22
23
|
"ECMAScript 6",
|
|
@@ -30,6 +31,7 @@
|
|
|
30
31
|
"ECMAScript 2021",
|
|
31
32
|
"ECMAScript 2022",
|
|
32
33
|
"ECMAScript 2023",
|
|
34
|
+
"ECMAScript 2024",
|
|
33
35
|
"Map",
|
|
34
36
|
"Set",
|
|
35
37
|
"WeakMap",
|
|
@@ -51,7 +53,7 @@
|
|
|
51
53
|
],
|
|
52
54
|
"repository": {
|
|
53
55
|
"type": "git",
|
|
54
|
-
"url": "https://github.com/zloirock/core-js.git",
|
|
56
|
+
"url": "git+https://github.com/zloirock/core-js.git",
|
|
55
57
|
"directory": "packages/core-js"
|
|
56
58
|
},
|
|
57
59
|
"funding": {
|
|
@@ -2,5 +2,7 @@
|
|
|
2
2
|
// https://github.com/tc39/proposal-arraybuffer-base64
|
|
3
3
|
require('../modules/esnext.uint8-array.from-base64');
|
|
4
4
|
require('../modules/esnext.uint8-array.from-hex');
|
|
5
|
+
require('../modules/esnext.uint8-array.set-from-base64');
|
|
6
|
+
require('../modules/esnext.uint8-array.set-from-hex');
|
|
5
7
|
require('../modules/esnext.uint8-array.to-base64');
|
|
6
8
|
require('../modules/esnext.uint8-array.to-hex');
|
package/proposals/global-this.js
CHANGED
package/stage/2.7.js
CHANGED
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/regexp-escaping');
|
|
9
8
|
require('../proposals/string-dedent');
|
|
10
9
|
require('../proposals/symbol-predicates-v2');
|
|
11
10
|
// TODO: Obsolete versions, remove from `core-js@4`
|
package/stage/3.js
CHANGED
|
@@ -8,6 +8,8 @@ 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/promise-try');
|
|
12
|
+
require('../proposals/regexp-escaping');
|
|
11
13
|
// TODO: Obsolete versions, remove from `core-js@4`
|
|
12
14
|
require('../proposals/array-grouping-stage-3');
|
|
13
15
|
require('../proposals/array-grouping-stage-3-2');
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
var IS_NODE = require('../internals/engine-is-node');
|
|
3
|
-
|
|
4
|
-
module.exports = function (name) {
|
|
5
|
-
try {
|
|
6
|
-
// eslint-disable-next-line no-new-func -- safe
|
|
7
|
-
if (IS_NODE) return Function('return require("' + name + '")')();
|
|
8
|
-
} catch (error) { /* empty */ }
|
|
9
|
-
};
|
|
File without changes
|