core-js-pure 3.10.1 → 3.10.2

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.
@@ -7,6 +7,7 @@ var shared = require('../internals/shared-store');
7
7
  var sharedKey = require('../internals/shared-key');
8
8
  var hiddenKeys = require('../internals/hidden-keys');
9
9
 
10
+ var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
10
11
  var WeakMap = global.WeakMap;
11
12
  var set, get, has;
12
13
 
@@ -29,6 +30,7 @@ if (NATIVE_WEAK_MAP) {
29
30
  var wmhas = store.has;
30
31
  var wmset = store.set;
31
32
  set = function (it, metadata) {
33
+ if (wmhas.call(store, it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);
32
34
  metadata.facade = it;
33
35
  wmset.call(store, it, metadata);
34
36
  return metadata;
@@ -43,6 +45,7 @@ if (NATIVE_WEAK_MAP) {
43
45
  var STATE = sharedKey('state');
44
46
  hiddenKeys[STATE] = true;
45
47
  set = function (it, metadata) {
48
+ if (objectHas(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);
46
49
  metadata.facade = it;
47
50
  createNonEnumerableProperty(it, STATE, metadata);
48
51
  return metadata;
@@ -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.10.1',
7
+ version: '3.10.2',
8
8
  mode: IS_PURE ? 'pure' : 'global',
9
9
  copyright: '© 2021 Denis Pushkarev (zloirock.ru)'
10
10
  });
@@ -800,7 +800,7 @@ var getOrigin = function () {
800
800
  var scheme = url.scheme;
801
801
  var port = url.port;
802
802
  if (scheme == 'blob') try {
803
- return new URL(scheme.path[0]).origin;
803
+ return new URLConstructor(scheme.path[0]).origin;
804
804
  } catch (error) {
805
805
  return 'null';
806
806
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "core-js-pure",
3
3
  "description": "Standard library",
4
- "version": "3.10.1",
4
+ "version": "3.10.2",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/zloirock/core-js.git",
@@ -55,5 +55,5 @@
55
55
  "scripts": {
56
56
  "postinstall": "node -e \"try{require('./postinstall')}catch(e){}\""
57
57
  },
58
- "gitHead": "dfa44ca9098d22d057f3a516940a0f5e35617830"
58
+ "gitHead": "871050326809b302c67e4fb4e0e4007a2db7b8e8"
59
59
  }