core-js-bundle 3.30.0 → 3.30.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.
package/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
- * core-js 3.30.0
2
+ * core-js 3.30.2
3
3
  * © 2014-2023 Denis Pushkarev (zloirock.ru)
4
- * license: https://github.com/zloirock/core-js/blob/v3.30.0/LICENSE
4
+ * license: https://github.com/zloirock/core-js/blob/v3.30.2/LICENSE
5
5
  * source: https://github.com/zloirock/core-js
6
6
  */
7
7
  !function (undefined) { 'use strict'; /******/ (function(modules) { // webpackBootstrap
@@ -868,7 +868,7 @@ module.exports =
868
868
  check(typeof self == 'object' && self) ||
869
869
  check(typeof global == 'object' && global) ||
870
870
  // eslint-disable-next-line no-new-func -- fallback
871
- (function () { return this; })() || Function('return this')();
871
+ (function () { return this; })() || this || Function('return this')();
872
872
 
873
873
 
874
874
  /***/ }),
@@ -1237,13 +1237,18 @@ module.exports = NATIVE_SYMBOL
1237
1237
  /* eslint-disable es/no-symbol -- required for testing */
1238
1238
  var V8_VERSION = __webpack_require__(28);
1239
1239
  var fails = __webpack_require__(7);
1240
+ var global = __webpack_require__(4);
1241
+
1242
+ var $String = global.String;
1240
1243
 
1241
1244
  // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
1242
1245
  module.exports = !!Object.getOwnPropertySymbols && !fails(function () {
1243
1246
  var symbol = Symbol();
1244
1247
  // Chrome 38 Symbol has incorrect toString conversion
1245
1248
  // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
1246
- return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
1249
+ // nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,
1250
+ // of course, fail.
1251
+ return !$String(symbol) || !(Object(symbol) instanceof Symbol) ||
1247
1252
  // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
1248
1253
  !Symbol.sham && V8_VERSION && V8_VERSION < 41;
1249
1254
  });
@@ -1390,10 +1395,10 @@ var store = __webpack_require__(37);
1390
1395
  (module.exports = function (key, value) {
1391
1396
  return store[key] || (store[key] = value !== undefined ? value : {});
1392
1397
  })('versions', []).push({
1393
- version: '3.30.0',
1398
+ version: '3.30.2',
1394
1399
  mode: IS_PURE ? 'pure' : 'global',
1395
1400
  copyright: '© 2014-2023 Denis Pushkarev (zloirock.ru)',
1396
- license: 'https://github.com/zloirock/core-js/blob/v3.30.0/LICENSE',
1401
+ license: 'https://github.com/zloirock/core-js/blob/v3.30.2/LICENSE',
1397
1402
  source: 'https://github.com/zloirock/core-js'
1398
1403
  });
1399
1404
 
@@ -23159,6 +23164,11 @@ var throwUnpolyfillable = function (type, action) {
23159
23164
  throw new DOMException((action || 'Cloning') + ' of ' + type + ' cannot be properly polyfilled in this engine', DATA_CLONE_ERROR);
23160
23165
  };
23161
23166
 
23167
+ var tryNativeRestrictedStructuredClone = function (value, type) {
23168
+ if (!nativeRestrictedStructuredClone) throwUnpolyfillable(type);
23169
+ return nativeRestrictedStructuredClone(value);
23170
+ };
23171
+
23162
23172
  var createDataTransfer = function () {
23163
23173
  var dataTransfer;
23164
23174
  try {
@@ -23279,11 +23289,20 @@ var structuredCloneInternal = function (value, map) {
23279
23289
  structuredCloneInternal(value.p4, map)
23280
23290
  );
23281
23291
  } catch (error) {
23282
- if (nativeRestrictedStructuredClone) {
23283
- cloned = nativeRestrictedStructuredClone(value);
23284
- } else throwUnpolyfillable(type);
23292
+ cloned = tryNativeRestrictedStructuredClone(value, type);
23285
23293
  }
23286
23294
  break;
23295
+ case 'File':
23296
+ if (nativeRestrictedStructuredClone) try {
23297
+ cloned = nativeRestrictedStructuredClone(value);
23298
+ // NodeJS 20.0.0 bug, https://github.com/nodejs/node/issues/47612
23299
+ if (classof(cloned) !== type) cloned = undefined;
23300
+ } catch (error) { /* empty */ }
23301
+ if (!cloned) try {
23302
+ cloned = new File([value], value.name, value);
23303
+ } catch (error) { /* empty */ }
23304
+ if (!cloned) throwUnpolyfillable(type);
23305
+ break;
23287
23306
  case 'FileList':
23288
23307
  dataTransfer = createDataTransfer();
23289
23308
  if (dataTransfer) {
@@ -23291,9 +23310,7 @@ var structuredCloneInternal = function (value, map) {
23291
23310
  dataTransfer.items.add(structuredCloneInternal(value[i], map));
23292
23311
  }
23293
23312
  cloned = dataTransfer.files;
23294
- } else if (nativeRestrictedStructuredClone) {
23295
- cloned = nativeRestrictedStructuredClone(value);
23296
- } else throwUnpolyfillable(type);
23313
+ } else cloned = tryNativeRestrictedStructuredClone(value, type);
23297
23314
  break;
23298
23315
  case 'ImageData':
23299
23316
  // Safari 9 ImageData is a constructor, but typeof ImageData is 'object'
@@ -23305,9 +23322,7 @@ var structuredCloneInternal = function (value, map) {
23305
23322
  { colorSpace: value.colorSpace }
23306
23323
  );
23307
23324
  } catch (error) {
23308
- if (nativeRestrictedStructuredClone) {
23309
- cloned = nativeRestrictedStructuredClone(value);
23310
- } else throwUnpolyfillable(type);
23325
+ cloned = tryNativeRestrictedStructuredClone(value, type);
23311
23326
  } break;
23312
23327
  default:
23313
23328
  if (nativeRestrictedStructuredClone) {
@@ -23399,12 +23414,6 @@ var structuredCloneInternal = function (value, map) {
23399
23414
  } catch (error) {
23400
23415
  throwUncloneable(type);
23401
23416
  } break;
23402
- case 'File':
23403
- try {
23404
- cloned = new File([value], value.name, value);
23405
- } catch (error) {
23406
- throwUnpolyfillable(type);
23407
- } break;
23408
23417
  case 'CropTarget':
23409
23418
  case 'CryptoKey':
23410
23419
  case 'FileSystemDirectoryHandle':
@@ -25286,14 +25295,22 @@ module.exports = {
25286
25295
 
25287
25296
  var $ = __webpack_require__(3);
25288
25297
  var getBuiltIn = __webpack_require__(24);
25298
+ var fails = __webpack_require__(7);
25289
25299
  var validateArgumentsLength = __webpack_require__(328);
25290
25300
  var toString = __webpack_require__(69);
25301
+ var USE_NATIVE_URL = __webpack_require__(745);
25291
25302
 
25292
25303
  var URL = getBuiltIn('URL');
25293
25304
 
25305
+ // https://github.com/nodejs/node/issues/47505
25306
+ // https://github.com/denoland/deno/issues/18893
25307
+ var THROWS_WITHOUT_ARGUMENTS = USE_NATIVE_URL && fails(function () {
25308
+ URL.canParse();
25309
+ });
25310
+
25294
25311
  // `URL.canParse` method
25295
25312
  // https://url.spec.whatwg.org/#dom-url-canparse
25296
- $({ target: 'URL', stat: true }, {
25313
+ $({ target: 'URL', stat: true, forced: !THROWS_WITHOUT_ARGUMENTS }, {
25297
25314
  canParse: function canParse(url) {
25298
25315
  var length = validateArgumentsLength(arguments.length, 1);
25299
25316
  var urlString = toString(url);