Skip to content

Commit 454d98c

Browse files
committed
3.36.1
1 parent 87f7a5b commit 454d98c

File tree

14 files changed

+171
-60
lines changed

14 files changed

+171
-60
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
## Changelog
22
##### Unreleased
3+
- Nothing
4+
5+
##### [3.36.1 - 2024.03.19](https://github.com/zloirock/core-js/releases/tag/v3.36.1)
6+
- Changes [v3.36.0...v3.36.1](https://github.com/zloirock/core-js/compare/v3.36.0...v3.36.1)
37
- Fixed some validation cases in `Object.setPrototypeOf`, [#1329](https://github.com/zloirock/core-js/issues/1329), thanks [**@minseok-choe**](https://github.com/minseok-choe)
48
- Fixed the order of validations in `Array.from`, [#1331](https://github.com/zloirock/core-js/pull/1331), thanks [**@minseok-choe**](https://github.com/minseok-choe)
59
- Added a fix of [Bun `queueMicrotask` arity](https://github.com/oven-sh/bun/issues/9249)

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,11 +210,11 @@ structuredClone(new Set([1, 2, 3])); // => new Set([1, 2, 3])
210210
### Installation:[](#index)
211211
```sh
212212
// global version
213-
npm install --save [email protected].0
213+
npm install --save [email protected].1
214214
// version without global namespace pollution
215-
npm install --save [email protected].0
215+
npm install --save [email protected].1
216216
// bundled global version
217-
npm install --save [email protected].0
217+
npm install --save [email protected].1
218218
```
219219

220220
Or you can use `core-js` [from CDN](https://www.jsdelivr.com/package/npm/core-js-bundle).

deno/corejs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
*Example*:
3131
```js
32-
import 'https://deno.land/x/[email protected].0/index.js'; // <- at the top of your entry point
32+
import 'https://deno.land/x/[email protected].1/index.js'; // <- at the top of your entry point
3333

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

deno/corejs/index.js

Lines changed: 36 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
2-
* core-js 3.36.0
2+
* core-js 3.36.1
33
* © 2014-2024 Denis Pushkarev (zloirock.ru)
4-
* license: https://github.com/zloirock/core-js/blob/v3.36.0/LICENSE
4+
* license: https://github.com/zloirock/core-js/blob/v3.36.1/LICENSE
55
* source: https://github.com/zloirock/core-js
66
*/
77
!function (undefined) { 'use strict'; /******/ (function(modules) { // webpackBootstrap
@@ -1025,10 +1025,10 @@ var SHARED = '__core-js_shared__';
10251025
var store = module.exports = globalThis[SHARED] || defineGlobalProperty(SHARED, {});
10261026

10271027
(store.versions || (store.versions = [])).push({
1028-
version: '3.36.0',
1028+
version: '3.36.1',
10291029
mode: IS_PURE ? 'pure' : 'global',
10301030
copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',
1031-
license: 'https://github.com/zloirock/core-js/blob/v3.36.0/LICENSE',
1031+
license: 'https://github.com/zloirock/core-js/blob/v3.36.1/LICENSE',
10321032
source: 'https://github.com/zloirock/core-js'
10331033
});
10341034

@@ -1898,7 +1898,8 @@ module.exports = function (FULL_NAME, wrapper, FORCED, IS_AGGREGATE_ERROR) {
18981898

18991899
/* eslint-disable no-proto -- safe */
19001900
var uncurryThisAccessor = __webpack_require__(70);
1901-
var anObject = __webpack_require__(45);
1901+
var isObject = __webpack_require__(19);
1902+
var requireObjectCoercible = __webpack_require__(15);
19021903
var aPossiblePrototype = __webpack_require__(71);
19031904

19041905
// `Object.setPrototypeOf` method
@@ -1915,8 +1916,9 @@ module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {
19151916
CORRECT_SETTER = test instanceof Array;
19161917
} catch (error) { /* empty */ }
19171918
return function setPrototypeOf(O, proto) {
1918-
anObject(O);
1919+
requireObjectCoercible(O);
19191920
aPossiblePrototype(proto);
1921+
if (!isObject(O)) return O;
19201922
if (CORRECT_SETTER) setter(O, proto);
19211923
else O.__proto__ = proto;
19221924
return O;
@@ -5798,6 +5800,7 @@ module.exports = function (argument) {
57985800
"use strict";
57995801

58005802
var $ = __webpack_require__(2);
5803+
var globalThis = __webpack_require__(3);
58015804
var isPrototypeOf = __webpack_require__(23);
58025805
var getPrototypeOf = __webpack_require__(85);
58035806
var setPrototypeOf = __webpack_require__(69);
@@ -5808,15 +5811,30 @@ var createPropertyDescriptor = __webpack_require__(10);
58085811
var installErrorStack = __webpack_require__(80);
58095812
var normalizeStringArgument = __webpack_require__(75);
58105813
var wellKnownSymbol = __webpack_require__(32);
5814+
var fails = __webpack_require__(6);
5815+
var IS_PURE = __webpack_require__(35);
58115816

5817+
var NativeSuppressedError = globalThis.SuppressedError;
58125818
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
58135819
var $Error = Error;
58145820

5821+
// https://github.com/oven-sh/bun/issues/9282
5822+
var WRONG_ARITY = !!NativeSuppressedError && NativeSuppressedError.length !== 3;
5823+
5824+
// https://github.com/oven-sh/bun/issues/9283
5825+
var EXTRA_ARGS_SUPPORT = !!NativeSuppressedError && fails(function () {
5826+
return NativeSuppressedError(1, 2, 3, { cause: 4 }).cause === 4;
5827+
});
5828+
5829+
var PATCH = WRONG_ARITY || EXTRA_ARGS_SUPPORT;
5830+
58155831
var $SuppressedError = function SuppressedError(error, suppressed, message) {
58165832
var isInstance = isPrototypeOf(SuppressedErrorPrototype, this);
58175833
var that;
58185834
if (setPrototypeOf) {
5819-
that = setPrototypeOf(new $Error(), isInstance ? getPrototypeOf(this) : SuppressedErrorPrototype);
5835+
that = PATCH && (!isInstance || getPrototypeOf(this) === SuppressedErrorPrototype)
5836+
? new NativeSuppressedError()
5837+
: setPrototypeOf(new $Error(), isInstance ? getPrototypeOf(this) : SuppressedErrorPrototype);
58205838
} else {
58215839
that = isInstance ? this : create(SuppressedErrorPrototype);
58225840
createNonEnumerableProperty(that, TO_STRING_TAG, 'Error');
@@ -5831,15 +5849,17 @@ var $SuppressedError = function SuppressedError(error, suppressed, message) {
58315849
if (setPrototypeOf) setPrototypeOf($SuppressedError, $Error);
58325850
else copyConstructorProperties($SuppressedError, $Error, { name: true });
58335851

5834-
var SuppressedErrorPrototype = $SuppressedError.prototype = create($Error.prototype, {
5852+
var SuppressedErrorPrototype = $SuppressedError.prototype = PATCH ? NativeSuppressedError.prototype : create($Error.prototype, {
58355853
constructor: createPropertyDescriptor(1, $SuppressedError),
58365854
message: createPropertyDescriptor(1, ''),
58375855
name: createPropertyDescriptor(1, 'SuppressedError')
58385856
});
58395857

5858+
if (PATCH && !IS_PURE) SuppressedErrorPrototype.constructor = $SuppressedError;
5859+
58405860
// `SuppressedError` constructor
58415861
// https://github.com/tc39/proposal-explicit-resource-management
5842-
$({ global: true, constructor: true, arity: 3 }, {
5862+
$({ global: true, constructor: true, arity: 3, forced: PATCH }, {
58435863
SuppressedError: $SuppressedError
58445864
});
58455865

@@ -15741,9 +15761,15 @@ var THROWS_WITHOUT_ARGUMENTS = USE_NATIVE_URL && fails(function () {
1574115761
URL.canParse();
1574215762
});
1574315763

15764+
// Bun ~ 1.0.30 bug
15765+
// https://github.com/oven-sh/bun/issues/9250
15766+
var WRONG_ARITY = fails(function () {
15767+
return URL.canParse.length !== 1;
15768+
});
15769+
1574415770
// `URL.canParse` method
1574515771
// https://url.spec.whatwg.org/#dom-url-canparse
15746-
$({ target: 'URL', stat: true, forced: !THROWS_WITHOUT_ARGUMENTS }, {
15772+
$({ target: 'URL', stat: true, forced: !THROWS_WITHOUT_ARGUMENTS || WRONG_ARITY }, {
1574715773
canParse: function canParse(url) {
1574815774
var length = validateArgumentsLength(arguments.length, 1);
1574915775
var urlString = toString(url);

0 commit comments

Comments
 (0)