core-js 3.6.2 → 3.7.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.
- package/es/aggregate-error.js +6 -0
- package/es/index.js +33 -29
- package/es/object/index.js +2 -1
- package/es/object/to-string.js +3 -2
- package/es/promise/any.js +12 -0
- package/es/promise/index.js +4 -2
- package/es/reflect/index.js +1 -0
- package/es/reflect/to-string-tag.js +3 -0
- package/es/string/index.js +1 -0
- package/es/string/replace-all.js +4 -0
- package/es/string/virtual/index.js +1 -0
- package/es/string/virtual/replace-all.js +4 -0
- package/es/symbol/index.js +2 -1
- package/es/symbol/to-string-tag.js +2 -1
- package/features/aggregate-error.js +4 -4
- package/features/map/emplace.js +5 -0
- package/features/map/index.js +2 -0
- package/features/promise/any.js +4 -9
- package/features/reflect/to-string-tag.js +3 -0
- package/features/string/replace-all.js +4 -2
- package/features/string/virtual/replace-all.js +4 -2
- package/features/weak-map/emplace.js +5 -0
- package/features/weak-map/index.js +2 -0
- package/internals/array-last-index-of.js +2 -1
- package/internals/array-method-uses-to-length.js +5 -8
- package/internals/async-iterator-iteration.js +25 -6
- package/internals/call-with-safe-iteration-closing.js +2 -2
- package/internals/collection-from.js +5 -5
- package/internals/collection-strong.js +1 -1
- package/internals/collection-weak.js +1 -1
- package/internals/collection.js +1 -1
- package/internals/correct-is-regexp-logic.js +2 -2
- package/internals/engine-is-node.js +4 -0
- package/internals/fix-regexp-well-known-symbol-logic.js +18 -2
- package/internals/global.js +1 -1
- package/internals/internal-state.js +4 -1
- package/internals/iterate.js +26 -11
- package/internals/iterator-close.js +8 -0
- package/internals/map-emplace.js +13 -0
- package/internals/microtask.js +8 -8
- package/internals/redefine.js +8 -2
- package/internals/shared.js +1 -1
- package/internals/task.js +9 -3
- package/modules/es.aggregate-error.js +31 -0
- package/modules/es.array.reduce-right.js +8 -2
- package/modules/es.array.reduce.js +6 -1
- package/modules/es.object.from-entries.js +1 -1
- package/modules/es.promise.all-settled.js +2 -2
- package/modules/es.promise.any.js +46 -0
- package/modules/es.promise.js +27 -25
- package/modules/es.reflect.set.js +3 -2
- package/modules/es.reflect.to-string-tag.js +9 -0
- package/modules/es.string.replace-all.js +50 -0
- package/modules/es.string.replace.js +8 -1
- package/modules/esnext.aggregate-error.js +2 -45
- package/modules/esnext.async-iterator.take.js +12 -3
- package/modules/esnext.iterator.every.js +3 -3
- package/modules/esnext.iterator.find.js +3 -3
- package/modules/esnext.iterator.flat-map.js +21 -15
- package/modules/esnext.iterator.for-each.js +1 -1
- package/modules/esnext.iterator.reduce.js +1 -1
- package/modules/esnext.iterator.some.js +3 -3
- package/modules/esnext.iterator.take.js +4 -2
- package/modules/esnext.iterator.to-array.js +1 -1
- package/modules/esnext.map.emplace.js +10 -0
- package/modules/esnext.map.every.js +3 -3
- package/modules/esnext.map.filter.js +1 -1
- package/modules/esnext.map.find-key.js +3 -3
- package/modules/esnext.map.find.js +3 -3
- package/modules/esnext.map.includes.js +3 -3
- package/modules/esnext.map.key-of.js +3 -3
- package/modules/esnext.map.map-keys.js +1 -1
- package/modules/esnext.map.map-values.js +1 -1
- package/modules/esnext.map.merge.js +1 -1
- package/modules/esnext.map.reduce.js +1 -1
- package/modules/esnext.map.some.js +3 -3
- package/modules/esnext.map.update-or-insert.js +1 -1
- package/modules/esnext.map.upsert.js +2 -1
- package/modules/esnext.observable.js +3 -3
- package/modules/esnext.promise.any.js +2 -46
- package/modules/esnext.reflect.get-metadata-keys.js +1 -1
- package/modules/esnext.set.every.js +3 -3
- package/modules/esnext.set.filter.js +1 -1
- package/modules/esnext.set.find.js +3 -3
- package/modules/esnext.set.is-disjoint-from.js +3 -3
- package/modules/esnext.set.is-subset-of.js +3 -3
- package/modules/esnext.set.is-superset-of.js +3 -3
- package/modules/esnext.set.join.js +1 -1
- package/modules/esnext.set.map.js +1 -1
- package/modules/esnext.set.reduce.js +1 -1
- package/modules/esnext.set.some.js +3 -3
- package/modules/esnext.set.union.js +1 -1
- package/modules/esnext.string.replace-all.js +2 -50
- package/modules/esnext.weak-map.emplace.js +10 -0
- package/modules/esnext.weak-map.upsert.js +3 -2
- package/modules/web.queue-microtask.js +2 -3
- package/modules/web.url-search-params.js +1 -1
- package/modules/web.url.js +1 -1
- package/package.json +1 -1
- package/postinstall.js +3 -1
- package/proposals/efficient-64-bit-arithmetic.js +1 -0
- package/proposals/map-upsert.js +4 -0
- package/proposals/object-iteration.js +1 -0
- package/stable/aggregate-error.js +6 -0
- package/stable/promise/any.js +3 -0
- package/stable/reflect/to-string-tag.js +3 -0
- package/stable/string/replace-all.js +3 -0
- package/stable/string/virtual/replace-all.js +3 -0
- package/stage/3.js +0 -2
- package/stage/4.js +2 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
var $ = require('../internals/export');
|
|
3
|
+
var IS_PURE = require('../internals/is-pure');
|
|
4
|
+
var $emplace = require('../internals/map-emplace');
|
|
5
|
+
|
|
6
|
+
// `WeakMap.prototype.emplace` method
|
|
7
|
+
// https://github.com/tc39/proposal-upsert
|
|
8
|
+
$({ target: 'WeakMap', proto: true, real: true, forced: IS_PURE }, {
|
|
9
|
+
emplace: $emplace
|
|
10
|
+
});
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
+
// TODO: remove from `core-js@4`
|
|
2
3
|
var $ = require('../internals/export');
|
|
3
4
|
var IS_PURE = require('../internals/is-pure');
|
|
4
5
|
var $upsert = require('../internals/map-upsert');
|
|
5
6
|
|
|
6
|
-
// `WeakMap.prototype.upsert` method
|
|
7
|
-
// https://github.com/
|
|
7
|
+
// `WeakMap.prototype.upsert` method (replaced by `WeakMap.prototype.emplace`)
|
|
8
|
+
// https://github.com/tc39/proposal-upsert
|
|
8
9
|
$({ target: 'WeakMap', proto: true, real: true, forced: IS_PURE }, {
|
|
9
10
|
upsert: $upsert
|
|
10
11
|
});
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
var $ = require('../internals/export');
|
|
2
2
|
var global = require('../internals/global');
|
|
3
3
|
var microtask = require('../internals/microtask');
|
|
4
|
-
var
|
|
4
|
+
var IS_NODE = require('../internals/engine-is-node');
|
|
5
5
|
|
|
6
6
|
var process = global.process;
|
|
7
|
-
var isNode = classof(process) == 'process';
|
|
8
7
|
|
|
9
8
|
// `queueMicrotask` method
|
|
10
9
|
// https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-queuemicrotask
|
|
11
10
|
$({ global: true, enumerable: true, noTargetGet: true }, {
|
|
12
11
|
queueMicrotask: function queueMicrotask(fn) {
|
|
13
|
-
var domain =
|
|
12
|
+
var domain = IS_NODE && process.domain;
|
|
14
13
|
microtask(domain ? domain.bind(fn) : fn);
|
|
15
14
|
}
|
|
16
15
|
});
|
|
@@ -162,7 +162,7 @@ var URLSearchParamsConstructor = function URLSearchParams(/* init */) {
|
|
|
162
162
|
var URLSearchParamsPrototype = URLSearchParamsConstructor.prototype;
|
|
163
163
|
|
|
164
164
|
redefineAll(URLSearchParamsPrototype, {
|
|
165
|
-
// `URLSearchParams.prototype.
|
|
165
|
+
// `URLSearchParams.prototype.append` method
|
|
166
166
|
// https://url.spec.whatwg.org/#dom-urlsearchparams-append
|
|
167
167
|
append: function append(name, value) {
|
|
168
168
|
validateArgumentsLength(arguments.length, 2);
|
package/modules/web.url.js
CHANGED
package/package.json
CHANGED
package/postinstall.js
CHANGED
|
@@ -8,6 +8,7 @@ var ADBLOCK = is(env.ADBLOCK);
|
|
|
8
8
|
var COLOR = is(env.npm_config_color);
|
|
9
9
|
var DISABLE_OPENCOLLECTIVE = is(env.DISABLE_OPENCOLLECTIVE);
|
|
10
10
|
var SILENT = ['silent', 'error', 'warn'].indexOf(env.npm_config_loglevel) !== -1;
|
|
11
|
+
var OPEN_SOURCE_CONTRIBUTOR = is(env.OPEN_SOURCE_CONTRIBUTOR);
|
|
11
12
|
var MINUTE = 60 * 1000;
|
|
12
13
|
|
|
13
14
|
// you could add a PR with an env variable for your CI detection
|
|
@@ -15,6 +16,7 @@ var CI = [
|
|
|
15
16
|
'BUILD_NUMBER',
|
|
16
17
|
'CI',
|
|
17
18
|
'CONTINUOUS_INTEGRATION',
|
|
19
|
+
'DRONE',
|
|
18
20
|
'RUN_ID'
|
|
19
21
|
].some(function (it) { return is(env[it]); });
|
|
20
22
|
|
|
@@ -29,7 +31,7 @@ function is(it) {
|
|
|
29
31
|
}
|
|
30
32
|
|
|
31
33
|
function isBannerRequired() {
|
|
32
|
-
if (ADBLOCK || CI || DISABLE_OPENCOLLECTIVE || SILENT) return false;
|
|
34
|
+
if (ADBLOCK || CI || DISABLE_OPENCOLLECTIVE || SILENT || OPEN_SOURCE_CONTRIBUTOR) return false;
|
|
33
35
|
var file = path.join(os.tmpdir(), 'core-js-banners');
|
|
34
36
|
var banners = [];
|
|
35
37
|
try {
|
package/proposals/map-upsert.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
// https://github.com/thumbsupep/proposal-upsert
|
|
2
|
+
require('../modules/esnext.map.emplace');
|
|
2
3
|
// TODO: remove from `core-js@4`
|
|
3
4
|
require('../modules/esnext.map.update-or-insert');
|
|
5
|
+
// TODO: remove from `core-js@4`
|
|
4
6
|
require('../modules/esnext.map.upsert');
|
|
7
|
+
require('../modules/esnext.weak-map.emplace');
|
|
8
|
+
// TODO: remove from `core-js@4`
|
|
5
9
|
require('../modules/esnext.weak-map.upsert');
|
package/stage/3.js
CHANGED
package/stage/4.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
require('../proposals/global-this');
|
|
2
2
|
require('../proposals/promise-all-settled');
|
|
3
|
+
require('../proposals/promise-any');
|
|
3
4
|
require('../proposals/string-match-all');
|
|
5
|
+
require('../proposals/string-replace-all');
|
|
4
6
|
var path = require('../internals/path');
|
|
5
7
|
|
|
6
8
|
module.exports = path;
|