core-js-pure 3.4.4 → 3.4.5

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.
@@ -0,0 +1,7 @@
1
+ var shared = require('../internals/shared');
2
+
3
+ var functionToString = Function.toString;
4
+
5
+ module.exports = shared('inspectSource', function (it) {
6
+ return functionToString.call(it);
7
+ });
@@ -1,6 +1,6 @@
1
1
  var global = require('../internals/global');
2
- var nativeFunctionToString = require('../internals/function-to-string');
2
+ var inspectSource = require('../internals/inspect-source');
3
3
 
4
4
  var WeakMap = global.WeakMap;
5
5
 
6
- module.exports = typeof WeakMap === 'function' && /native code/.test(nativeFunctionToString.call(WeakMap));
6
+ module.exports = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));
@@ -8,11 +8,22 @@ var toObject = require('../internals/to-object');
8
8
  var IndexedObject = require('../internals/indexed-object');
9
9
 
10
10
  var nativeAssign = Object.assign;
11
+ var defineProperty = Object.defineProperty;
11
12
 
12
13
  // `Object.assign` method
13
14
  // https://tc39.github.io/ecma262/#sec-object.assign
14
- // should work with symbols and should have deterministic property order (V8 bug)
15
15
  module.exports = !nativeAssign || fails(function () {
16
+ // should have correct order of operations (Edge bug)
17
+ if (DESCRIPTORS && nativeAssign({ b: 1 }, nativeAssign(defineProperty({}, 'a', {
18
+ enumerable: true,
19
+ get: function () {
20
+ defineProperty(this, 'b', {
21
+ value: 3,
22
+ enumerable: false
23
+ });
24
+ }
25
+ }), { b: 2 })).b !== 1) return true;
26
+ // should work with symbols and should have deterministic property order (V8 bug)
16
27
  var A = {};
17
28
  var B = {};
18
29
  // eslint-disable-next-line no-undef
@@ -4,7 +4,7 @@ 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.4.4',
7
+ version: '3.4.5',
8
8
  mode: IS_PURE ? 'pure' : 'global',
9
9
  copyright: '© 2019 Denis Pushkarev (zloirock.ru)'
10
10
  });
@@ -1,12 +1,19 @@
1
1
  'use strict';
2
2
  var $ = require('../internals/export');
3
3
  var $filter = require('../internals/array-iteration').filter;
4
+ var fails = require('../internals/fails');
4
5
  var arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');
5
6
 
7
+ var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');
8
+ // Edge 14- issue
9
+ var USES_TO_LENGTH = HAS_SPECIES_SUPPORT && !fails(function () {
10
+ [].filter.call({ length: -1, 0: 1 }, function (it) { throw it; });
11
+ });
12
+
6
13
  // `Array.prototype.filter` method
7
14
  // https://tc39.github.io/ecma262/#sec-array.prototype.filter
8
15
  // with adding support of @@species
9
- $({ target: 'Array', proto: true, forced: !arrayMethodHasSpeciesSupport('filter') }, {
16
+ $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, {
10
17
  filter: function filter(callbackfn /* , thisArg */) {
11
18
  return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
12
19
  }
@@ -1,12 +1,19 @@
1
1
  'use strict';
2
2
  var $ = require('../internals/export');
3
3
  var $map = require('../internals/array-iteration').map;
4
+ var fails = require('../internals/fails');
4
5
  var arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');
5
6
 
7
+ var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map');
8
+ // FF49- issue
9
+ var USES_TO_LENGTH = HAS_SPECIES_SUPPORT && !fails(function () {
10
+ [].map.call({ length: -1, 0: 1 }, function (it) { throw it; });
11
+ });
12
+
6
13
  // `Array.prototype.map` method
7
14
  // https://tc39.github.io/ecma262/#sec-array.prototype.map
8
15
  // with adding support of @@species
9
- $({ target: 'Array', proto: true, forced: !arrayMethodHasSpeciesSupport('map') }, {
16
+ $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, {
10
17
  map: function map(callbackfn /* , thisArg */) {
11
18
  return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
12
19
  }
@@ -6,13 +6,13 @@ var getBuiltIn = require('../internals/get-built-in');
6
6
  var NativePromise = require('../internals/native-promise-constructor');
7
7
  var redefine = require('../internals/redefine');
8
8
  var redefineAll = require('../internals/redefine-all');
9
- var shared = require('../internals/shared');
10
9
  var setToStringTag = require('../internals/set-to-string-tag');
11
10
  var setSpecies = require('../internals/set-species');
12
11
  var isObject = require('../internals/is-object');
13
12
  var aFunction = require('../internals/a-function');
14
13
  var anInstance = require('../internals/an-instance');
15
14
  var classof = require('../internals/classof-raw');
15
+ var inspectSource = require('../internals/inspect-source');
16
16
  var iterate = require('../internals/iterate');
17
17
  var checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');
18
18
  var speciesConstructor = require('../internals/species-constructor');
@@ -36,7 +36,6 @@ var PromiseConstructor = NativePromise;
36
36
  var TypeError = global.TypeError;
37
37
  var document = global.document;
38
38
  var process = global.process;
39
- var inspectSource = shared('inspectSource');
40
39
  var $fetch = getBuiltIn('fetch');
41
40
  var newPromiseCapability = newPromiseCapabilityModule.f;
42
41
  var newGenericPromiseCapability = newPromiseCapability;
@@ -2,6 +2,7 @@ var $ = require('../internals/export');
2
2
  var anObject = require('../internals/an-object');
3
3
  var isObject = require('../internals/is-object');
4
4
  var has = require('../internals/has');
5
+ var fails = require('../internals/fails');
5
6
  var definePropertyModule = require('../internals/object-define-property');
6
7
  var getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');
7
8
  var getPrototypeOf = require('../internals/object-get-prototype-of');
@@ -31,6 +32,14 @@ function set(target, propertyKey, V /* , receiver */) {
31
32
  return ownDescriptor.set === undefined ? false : (ownDescriptor.set.call(receiver, V), true);
32
33
  }
33
34
 
34
- $({ target: 'Reflect', stat: true }, {
35
+ // MS Edge 17-18 Reflect.set allows setting the property to object
36
+ // with non-writable property on the prototype
37
+ var MS_EDGE_BUG = fails(function () {
38
+ var object = definePropertyModule.f({}, 'a', { configurable: true });
39
+ // eslint-disable-next-line no-undef
40
+ return Reflect.set(getPrototypeOf(object), 'a', 1, object) !== false;
41
+ });
42
+
43
+ $({ target: 'Reflect', stat: true, forced: MS_EDGE_BUG }, {
35
44
  set: set
36
45
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "core-js-pure",
3
3
  "description": "Standard library",
4
- "version": "3.4.4",
4
+ "version": "3.4.5",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/zloirock/core-js.git"
@@ -1,3 +0,0 @@
1
- var shared = require('../internals/shared');
2
-
3
- module.exports = shared('native-function-to-string', Function.toString);