Skip to content

Commit

Permalink
3.30.2
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock committed May 6, 2023
1 parent 1b64296 commit a54caa5
Show file tree
Hide file tree
Showing 13 changed files with 85 additions and 46 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
## Changelog
##### Unreleased
- Nothing

##### [3.30.2 - 2023.05.07](https://github.com/zloirock/core-js/releases/tag/v3.30.2)
- Added a fix for a NodeJS 20.0.0 [bug](https://github.com/nodejs/node/issues/47612) with cloning `File` via `structuredClone`
- Added protection from Terser unsafe `String` optimization, [#1242](https://github.com/zloirock/core-js/issues/1242)
- Added a workaround for getting proper global object in Figma plugins, [#1231](https://github.com/zloirock/core-js/issues/1231)
- Compat data improvements:
- Added NodeJS 20.0 compat data mapping
- [`URL.canParse`](https://url.spec.whatwg.org/#dom-url-canparse) marked as supported (fixed) from [NodeJS 20.1.0](https://github.com/nodejs/node/pull/47513) and [Deno 1.33.2](https://github.com/denoland/deno/pull/18896)
- Added Deno 1.33 compat data mapping
- [`URL.canParse`](https://url.spec.whatwg.org/#dom-url-canparse) marked as supported (fixed) from [NodeJS 20.1.0](https://github.com/nodejs/node/pull/47513) and [Deno 1.33.2](https://github.com/denoland/deno/pull/18896)

##### [3.30.1 - 2023.04.14](https://github.com/zloirock/core-js/releases/tag/v3.30.1)
- Added a fix for a NodeJS 19.9.0 `URL.canParse` [bug](https://github.com/nodejs/node/issues/47505)
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,11 +208,11 @@ structuredClone(new Set([1, 2, 3])); // => new Set([1, 2, 3])
### Installation:[](#index)
```sh
// global version
npm install --save core-js@3.30.1
npm install --save core-js@3.30.2
// version without global namespace pollution
npm install --save core-js-pure@3.30.1
npm install --save core-js-pure@3.30.2
// bundled global version
npm install --save core-js-bundle@3.30.1
npm install --save core-js-bundle@3.30.2
```

Or you can use `core-js` [from CDN](https://www.jsdelivr.com/package/npm/core-js-bundle).
Expand Down
2 changes: 1 addition & 1 deletion deno/corejs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

*Example*:
```js
import 'https://deno.land/x/corejs@v3.30.1/index.js'; // <- at the top of your entry point
import 'https://deno.land/x/corejs@v3.30.2/index.js'; // <- at the top of your entry point

Object.hasOwn({ foo: 42 }, 'foo'); // => true

Expand Down
52 changes: 31 additions & 21 deletions deno/corejs/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* core-js 3.30.1
* core-js 3.30.2
* © 2014-2023 Denis Pushkarev (zloirock.ru)
* license: https://github.com/zloirock/core-js/blob/v3.30.1/LICENSE
* license: https://github.com/zloirock/core-js/blob/v3.30.2/LICENSE
* source: https://github.com/zloirock/core-js
*/
!function (undefined) { 'use strict'; /******/ (function(modules) { // webpackBootstrap
Expand Down Expand Up @@ -422,7 +422,7 @@ module.exports =
check(typeof self == 'object' && self) ||
check(typeof global == 'object' && global) ||
// eslint-disable-next-line no-new-func -- fallback
(function () { return this; })() || Function('return this')();
(function () { return this; })() || this || Function('return this')();


/***/ }),
Expand Down Expand Up @@ -791,13 +791,18 @@ module.exports = NATIVE_SYMBOL
/* eslint-disable es/no-symbol -- required for testing */
var V8_VERSION = __webpack_require__(27);
var fails = __webpack_require__(6);
var global = __webpack_require__(3);

var $String = global.String;

// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
module.exports = !!Object.getOwnPropertySymbols && !fails(function () {
var symbol = Symbol();
// Chrome 38 Symbol has incorrect toString conversion
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
// nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,
// of course, fail.
return !$String(symbol) || !(Object(symbol) instanceof Symbol) ||
// Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
!Symbol.sham && V8_VERSION && V8_VERSION < 41;
});
Expand Down Expand Up @@ -944,10 +949,10 @@ var store = __webpack_require__(36);
(module.exports = function (key, value) {
return store[key] || (store[key] = value !== undefined ? value : {});
})('versions', []).push({
version: '3.30.1',
version: '3.30.2',
mode: IS_PURE ? 'pure' : 'global',
copyright: '© 2014-2023 Denis Pushkarev (zloirock.ru)',
license: 'https://github.com/zloirock/core-js/blob/v3.30.1/LICENSE',
license: 'https://github.com/zloirock/core-js/blob/v3.30.2/LICENSE',
source: 'https://github.com/zloirock/core-js'
});

Expand Down Expand Up @@ -13939,6 +13944,11 @@ var throwUnpolyfillable = function (type, action) {
throw new DOMException((action || 'Cloning') + ' of ' + type + ' cannot be properly polyfilled in this engine', DATA_CLONE_ERROR);
};

var tryNativeRestrictedStructuredClone = function (value, type) {
if (!nativeRestrictedStructuredClone) throwUnpolyfillable(type);
return nativeRestrictedStructuredClone(value);
};

var createDataTransfer = function () {
var dataTransfer;
try {
Expand Down Expand Up @@ -14059,21 +14069,28 @@ var structuredCloneInternal = function (value, map) {
structuredCloneInternal(value.p4, map)
);
} catch (error) {
if (nativeRestrictedStructuredClone) {
cloned = nativeRestrictedStructuredClone(value);
} else throwUnpolyfillable(type);
cloned = tryNativeRestrictedStructuredClone(value, type);
}
break;
case 'File':
if (nativeRestrictedStructuredClone) try {
cloned = nativeRestrictedStructuredClone(value);
// NodeJS 20.0.0 bug, https://github.com/nodejs/node/issues/47612
if (classof(cloned) !== type) cloned = undefined;
} catch (error) { /* empty */ }
if (!cloned) try {
cloned = new File([value], value.name, value);
} catch (error) { /* empty */ }
if (!cloned) throwUnpolyfillable(type);
break;
case 'FileList':
dataTransfer = createDataTransfer();
if (dataTransfer) {
for (i = 0, length = lengthOfArrayLike(value); i < length; i++) {
dataTransfer.items.add(structuredCloneInternal(value[i], map));
}
cloned = dataTransfer.files;
} else if (nativeRestrictedStructuredClone) {
cloned = nativeRestrictedStructuredClone(value);
} else throwUnpolyfillable(type);
} else cloned = tryNativeRestrictedStructuredClone(value, type);
break;
case 'ImageData':
// Safari 9 ImageData is a constructor, but typeof ImageData is 'object'
Expand All @@ -14085,9 +14102,7 @@ var structuredCloneInternal = function (value, map) {
{ colorSpace: value.colorSpace }
);
} catch (error) {
if (nativeRestrictedStructuredClone) {
cloned = nativeRestrictedStructuredClone(value);
} else throwUnpolyfillable(type);
cloned = tryNativeRestrictedStructuredClone(value, type);
} break;
default:
if (nativeRestrictedStructuredClone) {
Expand Down Expand Up @@ -14179,12 +14194,6 @@ var structuredCloneInternal = function (value, map) {
} catch (error) {
throwUncloneable(type);
} break;
case 'File':
try {
cloned = new File([value], value.name, value);
} catch (error) {
throwUnpolyfillable(type);
} break;
case 'CropTarget':
case 'CryptoKey':
case 'FileSystemDirectoryHandle':
Expand Down Expand Up @@ -14330,6 +14339,7 @@ var USE_NATIVE_URL = __webpack_require__(443);
var URL = getBuiltIn('URL');

// https://github.com/nodejs/node/issues/47505
// https://github.com/denoland/deno/issues/18893
var THROWS_WITHOUT_ARGUMENTS = USE_NATIVE_URL && fails(function () {
URL.canParse();
});
Expand Down
28 changes: 27 additions & 1 deletion docs/compat/compat-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -1180,6 +1180,7 @@
"edge": "110",
"electron": "23.0",
"ios": "16.0",
"node": "20.0",
"oculus": "26.0",
"opera": "96",
"opera-android": "74",
Expand All @@ -1197,6 +1198,7 @@
"edge": "110",
"electron": "23.0",
"ios": "16.0",
"node": "20.0",
"oculus": "26.0",
"opera": "96",
"opera-android": "74",
Expand All @@ -1214,6 +1216,7 @@
"edge": "110",
"electron": "23.0",
"ios": "16.0",
"node": "20.0",
"oculus": "26.0",
"opera": "96",
"opera-android": "74",
Expand Down Expand Up @@ -1294,6 +1297,7 @@
"edge": "110",
"electron": "23.0",
"ios": "16.0",
"node": "20.0",
"oculus": "26.0",
"opera": "96",
"opera-android": "74",
Expand Down Expand Up @@ -3815,6 +3819,7 @@
"firefox-android": "78",
"hermes": "0.4",
"ios": "11.3",
"node": "20.0",
"opera": "97",
"react-native": "0.69",
"safari": "11.1"
Expand Down Expand Up @@ -5501,6 +5506,7 @@
"edge": "110",
"electron": "23.0",
"ios": "16.0",
"node": "20.0",
"oculus": "26.0",
"opera": "96",
"opera-android": "74",
Expand All @@ -5518,6 +5524,7 @@
"edge": "110",
"electron": "23.0",
"ios": "16.0",
"node": "20.0",
"oculus": "26.0",
"opera": "96",
"opera-android": "74",
Expand Down Expand Up @@ -5557,6 +5564,7 @@
"edge": "110",
"electron": "23.0",
"ios": "16.4",
"node": "20.0",
"oculus": "26.0",
"opera": "96",
"opera-android": "74",
Expand Down Expand Up @@ -5791,6 +5799,7 @@
"edge": "110",
"electron": "23.0",
"ios": "16.0",
"node": "20.0",
"oculus": "26.0",
"opera": "96",
"opera-android": "74",
Expand All @@ -5808,6 +5817,7 @@
"edge": "110",
"electron": "23.0",
"ios": "16.0",
"node": "20.0",
"oculus": "26.0",
"opera": "96",
"opera-android": "74",
Expand All @@ -5825,6 +5835,7 @@
"edge": "110",
"electron": "23.0",
"ios": "16.0",
"node": "20.0",
"oculus": "26.0",
"opera": "96",
"opera-android": "74",
Expand All @@ -5843,6 +5854,7 @@
"edge": "110",
"electron": "23.0",
"ios": "16.0",
"node": "20.0",
"oculus": "26.0",
"opera": "96",
"opera-android": "74",
Expand All @@ -5855,6 +5867,7 @@
"android": "114",
"chrome": "114",
"chrome-android": "114",
"deno": "1.33",
"edge": "114",
"electron": "25.0",
"opera": "100"
Expand All @@ -5863,6 +5876,7 @@
"android": "114",
"chrome": "114",
"chrome-android": "114",
"deno": "1.33",
"edge": "114",
"electron": "25.0",
"opera": "100"
Expand All @@ -5871,6 +5885,7 @@
"android": "114",
"chrome": "114",
"chrome-android": "114",
"deno": "1.33",
"edge": "114",
"electron": "25.0",
"opera": "100"
Expand Down Expand Up @@ -5945,6 +5960,7 @@
"android": "114",
"chrome": "114",
"chrome-android": "114",
"deno": "1.33",
"edge": "114",
"electron": "25.0",
"opera": "100"
Expand All @@ -5953,6 +5969,7 @@
"android": "114",
"chrome": "114",
"chrome-android": "114",
"deno": "1.33",
"edge": "114",
"electron": "25.0",
"opera": "100"
Expand All @@ -5961,6 +5978,7 @@
"android": "114",
"chrome": "114",
"chrome-android": "114",
"deno": "1.33",
"edge": "114",
"electron": "25.0",
"opera": "100"
Expand Down Expand Up @@ -6129,6 +6147,7 @@
"edge": "111",
"electron": "24.0",
"ios": "16.4",
"node": "20.0",
"opera": "97",
"safari": "16.4"
},
Expand Down Expand Up @@ -6185,6 +6204,7 @@
"edge": "111",
"electron": "24.0",
"ios": "16.4",
"node": "20.0",
"opera": "97",
"safari": "16.4"
},
Expand Down Expand Up @@ -6276,6 +6296,7 @@
"edge": "110",
"electron": "23.0",
"ios": "16.0",
"node": "20.0",
"oculus": "26.0",
"opera": "96",
"opera-android": "74",
Expand All @@ -6293,6 +6314,7 @@
"edge": "110",
"electron": "23.0",
"ios": "16.0",
"node": "20.0",
"oculus": "26.0",
"opera": "96",
"opera-android": "74",
Expand All @@ -6312,6 +6334,7 @@
"edge": "110",
"electron": "23.0",
"ios": "16.4",
"node": "20.0",
"oculus": "26.0",
"opera": "96",
"opera-android": "74",
Expand Down Expand Up @@ -6631,7 +6654,10 @@
"safari": "14.0",
"samsung": "9.0"
},
"web.url.can-parse": {},
"web.url.can-parse": {
"deno": "1.33.2",
"node": "20.1.0"
},
"web.url.to-json": {
"android": "71",
"bun": "0.1.1",
Expand Down
Loading

0 comments on commit a54caa5

Please sign in to comment.