core-js 3.19.0 → 3.19.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.
@@ -0,0 +1,10 @@
1
+ // FF26- bug: ArrayBuffers are non-extensible, but Object.isExtensible does not report it
2
+ var fails = require('../internals/fails');
3
+
4
+ module.exports = fails(function () {
5
+ if (typeof ArrayBuffer == 'function') {
6
+ var buffer = new ArrayBuffer(8);
7
+ // eslint-disable-next-line es/no-object-isextensible, es/no-object-defineproperty -- safe
8
+ if (Object.isExtensible(buffer)) Object.defineProperty(buffer, 'a', { value: 8 });
9
+ }
10
+ });
@@ -6,6 +6,7 @@ var hasOwn = require('../internals/has-own-property');
6
6
  var defineProperty = require('../internals/object-define-property').f;
7
7
  var getOwnPropertyNamesModule = require('../internals/object-get-own-property-names');
8
8
  var getOwnPropertyNamesExternalModule = require('../internals/object-get-own-property-names-external');
9
+ var isExtensible = require('../internals/object-is-extensible');
9
10
  var uid = require('../internals/uid');
10
11
  var FREEZING = require('../internals/freezing');
11
12
 
@@ -13,11 +14,6 @@ var REQUIRED = false;
13
14
  var METADATA = uid('meta');
14
15
  var id = 0;
15
16
 
16
- // eslint-disable-next-line es/no-object-isextensible -- safe
17
- var isExtensible = Object.isExtensible || function () {
18
- return true;
19
- };
20
-
21
17
  var setMetadata = function (it) {
22
18
  defineProperty(it, METADATA, { value: {
23
19
  objectID: 'O' + id++, // object ID
@@ -0,0 +1,16 @@
1
+ var fails = require('../internals/fails');
2
+ var isObject = require('../internals/is-object');
3
+ var classof = require('../internals/classof-raw');
4
+ var ARRAY_BUFFER_NON_EXTENSIBLE = require('../internals/array-buffer-non-extensible');
5
+
6
+ // eslint-disable-next-line es/no-object-isextensible -- safe
7
+ var $isExtensible = Object.isExtensible;
8
+ var FAILS_ON_PRIMITIVES = fails(function () { $isExtensible(1); });
9
+
10
+ // `Object.isExtensible` method
11
+ // https://tc39.es/ecma262/#sec-object.isextensible
12
+ module.exports = (FAILS_ON_PRIMITIVES || ARRAY_BUFFER_NON_EXTENSIBLE) ? function isExtensible(it) {
13
+ if (!isObject(it)) return false;
14
+ if (ARRAY_BUFFER_NON_EXTENSIBLE && classof(it) == 'ArrayBuffer') return false;
15
+ return $isExtensible ? $isExtensible(it) : true;
16
+ } : $isExtensible;
@@ -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.19.0',
7
+ version: '3.19.1',
8
8
  mode: IS_PURE ? 'pure' : 'global',
9
9
  copyright: '© 2021 Denis Pushkarev (zloirock.ru)'
10
10
  });
@@ -12,16 +12,22 @@ var clearErrorStack = require('../internals/clear-error-stack');
12
12
  var installErrorCause = require('../internals/install-error-cause');
13
13
  var iterate = require('../internals/iterate');
14
14
  var normalizeStringArgument = require('../internals/normalize-string-argument');
15
+ var wellKnownSymbol = require('../internals/well-known-symbol');
15
16
  var ERROR_STACK_INSTALLABLE = require('../internals/error-stack-installable');
16
17
 
18
+ var TO_STRING_TAG = wellKnownSymbol('toStringTag');
17
19
  var Error = global.Error;
18
20
  var push = [].push;
19
21
 
20
22
  var $AggregateError = function AggregateError(errors, message /* , options */) {
21
- var that = isPrototypeOf(AggregateErrorPrototype, this) ? this : create(AggregateErrorPrototype);
22
23
  var options = arguments.length > 2 ? arguments[2] : undefined;
24
+ var isInstance = isPrototypeOf(AggregateErrorPrototype, this);
25
+ var that;
23
26
  if (setPrototypeOf) {
24
- that = setPrototypeOf(new Error(undefined), getPrototypeOf(that));
27
+ that = setPrototypeOf(new Error(undefined), isInstance ? getPrototypeOf(this) : AggregateErrorPrototype);
28
+ } else {
29
+ that = isInstance ? this : create(AggregateErrorPrototype);
30
+ createNonEnumerableProperty(that, TO_STRING_TAG, 'Error');
25
31
  }
26
32
  createNonEnumerableProperty(that, 'message', normalizeStringArgument(message, ''));
27
33
  if (ERROR_STACK_INSTALLABLE) createNonEnumerableProperty(that, 'stack', clearErrorStack(that.stack, 1));
@@ -1,15 +1,9 @@
1
1
  var $ = require('../internals/export');
2
- var fails = require('../internals/fails');
3
- var isObject = require('../internals/is-object');
4
-
5
- // eslint-disable-next-line es/no-object-isextensible -- safe
6
- var $isExtensible = Object.isExtensible;
7
- var FAILS_ON_PRIMITIVES = fails(function () { $isExtensible(1); });
2
+ var $isExtensible = require('../internals/object-is-extensible');
8
3
 
9
4
  // `Object.isExtensible` method
10
5
  // https://tc39.es/ecma262/#sec-object.isextensible
11
- $({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
12
- isExtensible: function isExtensible(it) {
13
- return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false;
14
- }
6
+ // eslint-disable-next-line es/no-object-isextensible -- safe
7
+ $({ target: 'Object', stat: true, forced: Object.isExtensible !== $isExtensible }, {
8
+ isExtensible: $isExtensible
15
9
  });
@@ -1,6 +1,8 @@
1
1
  var $ = require('../internals/export');
2
2
  var fails = require('../internals/fails');
3
3
  var isObject = require('../internals/is-object');
4
+ var classof = require('../internals/classof-raw');
5
+ var ARRAY_BUFFER_NON_EXTENSIBLE = require('../internals/array-buffer-non-extensible');
4
6
 
5
7
  // eslint-disable-next-line es/no-object-isfrozen -- safe
6
8
  var $isFrozen = Object.isFrozen;
@@ -8,8 +10,10 @@ var FAILS_ON_PRIMITIVES = fails(function () { $isFrozen(1); });
8
10
 
9
11
  // `Object.isFrozen` method
10
12
  // https://tc39.es/ecma262/#sec-object.isfrozen
11
- $({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
13
+ $({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES || ARRAY_BUFFER_NON_EXTENSIBLE }, {
12
14
  isFrozen: function isFrozen(it) {
13
- return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true;
15
+ if (!isObject(it)) return true;
16
+ if (ARRAY_BUFFER_NON_EXTENSIBLE && classof(it) == 'ArrayBuffer') return true;
17
+ return $isFrozen ? $isFrozen(it) : false;
14
18
  }
15
19
  });
@@ -1,6 +1,8 @@
1
1
  var $ = require('../internals/export');
2
2
  var fails = require('../internals/fails');
3
3
  var isObject = require('../internals/is-object');
4
+ var classof = require('../internals/classof-raw');
5
+ var ARRAY_BUFFER_NON_EXTENSIBLE = require('../internals/array-buffer-non-extensible');
4
6
 
5
7
  // eslint-disable-next-line es/no-object-issealed -- safe
6
8
  var $isSealed = Object.isSealed;
@@ -8,8 +10,10 @@ var FAILS_ON_PRIMITIVES = fails(function () { $isSealed(1); });
8
10
 
9
11
  // `Object.isSealed` method
10
12
  // https://tc39.es/ecma262/#sec-object.issealed
11
- $({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
13
+ $({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES || ARRAY_BUFFER_NON_EXTENSIBLE }, {
12
14
  isSealed: function isSealed(it) {
13
- return isObject(it) ? $isSealed ? $isSealed(it) : false : true;
15
+ if (!isObject(it)) return true;
16
+ if (ARRAY_BUFFER_NON_EXTENSIBLE && classof(it) == 'ArrayBuffer') return true;
17
+ return $isSealed ? $isSealed(it) : false;
14
18
  }
15
19
  });
@@ -1,14 +1,12 @@
1
1
  var $ = require('../internals/export');
2
2
  var anObject = require('../internals/an-object');
3
-
4
- // eslint-disable-next-line es/no-object-isextensible -- safe
5
- var objectIsExtensible = Object.isExtensible;
3
+ var $isExtensible = require('../internals/object-is-extensible');
6
4
 
7
5
  // `Reflect.isExtensible` method
8
6
  // https://tc39.es/ecma262/#sec-reflect.isextensible
9
7
  $({ target: 'Reflect', stat: true }, {
10
8
  isExtensible: function isExtensible(target) {
11
9
  anObject(target);
12
- return objectIsExtensible ? objectIsExtensible(target) : true;
10
+ return $isExtensible(target);
13
11
  }
14
12
  });
@@ -6,12 +6,11 @@ var InternalMetadataModule = require('../internals/internal-metadata');
6
6
  var collection = require('../internals/collection');
7
7
  var collectionWeak = require('../internals/collection-weak');
8
8
  var isObject = require('../internals/is-object');
9
+ var isExtensible = require('../internals/object-is-extensible');
9
10
  var enforceIternalState = require('../internals/internal-state').enforce;
10
11
  var NATIVE_WEAK_MAP = require('../internals/native-weak-map');
11
12
 
12
13
  var IS_IE11 = !global.ActiveXObject && 'ActiveXObject' in global;
13
- // eslint-disable-next-line es/no-object-isextensible -- safe
14
- var isExtensible = Object.isExtensible;
15
14
  var InternalWeakMap;
16
15
 
17
16
  var wrapper = function (init) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "core-js",
3
3
  "description": "Standard library",
4
- "version": "3.19.0",
4
+ "version": "3.19.1",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/zloirock/core-js.git"
@@ -54,5 +54,5 @@
54
54
  "scripts": {
55
55
  "postinstall": "node -e \"try{require('./postinstall')}catch(e){}\""
56
56
  },
57
- "gitHead": "6123ff17d26eddf3ba8d456feb97decab3a9e9f6"
57
+ "gitHead": "1f16f36fa2807bbe793b9da852a110e6c6077693"
58
58
  }