Skip to content

Commit

Permalink
3.36.1
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock committed Mar 19, 2024
1 parent 87f7a5b commit 454d98c
Show file tree
Hide file tree
Showing 14 changed files with 171 additions and 60 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## Changelog
##### Unreleased
- Nothing

##### [3.36.1 - 2024.03.19](https://github.com/zloirock/core-js/releases/tag/v3.36.1)
- Changes [v3.36.0...v3.36.1](https://github.com/zloirock/core-js/compare/v3.36.0...v3.36.1)
- Fixed some validation cases in `Object.setPrototypeOf`, [#1329](https://github.com/zloirock/core-js/issues/1329), thanks [**@minseok-choe**](https://github.com/minseok-choe)
- 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)
- Added a fix of [Bun `queueMicrotask` arity](https://github.com/oven-sh/bun/issues/9249)
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,11 +210,11 @@ structuredClone(new Set([1, 2, 3])); // => new Set([1, 2, 3])
### Installation:[](#index)
```sh
// global version
npm install --save [email protected].0
npm install --save [email protected].1
// version without global namespace pollution
npm install --save [email protected].0
npm install --save [email protected].1
// bundled global version
npm install --save [email protected].0
npm install --save [email protected].1
```

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/[email protected].0/index.js'; // <- at the top of your entry point
import 'https://deno.land/x/[email protected].1/index.js'; // <- at the top of your entry point

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

Expand Down
46 changes: 36 additions & 10 deletions deno/corejs/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* core-js 3.36.0
* core-js 3.36.1
* © 2014-2024 Denis Pushkarev (zloirock.ru)
* license: https://github.com/zloirock/core-js/blob/v3.36.0/LICENSE
* license: https://github.com/zloirock/core-js/blob/v3.36.1/LICENSE
* source: https://github.com/zloirock/core-js
*/
!function (undefined) { 'use strict'; /******/ (function(modules) { // webpackBootstrap
Expand Down Expand Up @@ -1025,10 +1025,10 @@ var SHARED = '__core-js_shared__';
var store = module.exports = globalThis[SHARED] || defineGlobalProperty(SHARED, {});

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

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

/* eslint-disable no-proto -- safe */
var uncurryThisAccessor = __webpack_require__(70);
var anObject = __webpack_require__(45);
var isObject = __webpack_require__(19);
var requireObjectCoercible = __webpack_require__(15);
var aPossiblePrototype = __webpack_require__(71);

// `Object.setPrototypeOf` method
Expand All @@ -1915,8 +1916,9 @@ module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {
CORRECT_SETTER = test instanceof Array;
} catch (error) { /* empty */ }
return function setPrototypeOf(O, proto) {
anObject(O);
requireObjectCoercible(O);
aPossiblePrototype(proto);
if (!isObject(O)) return O;
if (CORRECT_SETTER) setter(O, proto);
else O.__proto__ = proto;
return O;
Expand Down Expand Up @@ -5798,6 +5800,7 @@ module.exports = function (argument) {
"use strict";

var $ = __webpack_require__(2);
var globalThis = __webpack_require__(3);
var isPrototypeOf = __webpack_require__(23);
var getPrototypeOf = __webpack_require__(85);
var setPrototypeOf = __webpack_require__(69);
Expand All @@ -5808,15 +5811,30 @@ var createPropertyDescriptor = __webpack_require__(10);
var installErrorStack = __webpack_require__(80);
var normalizeStringArgument = __webpack_require__(75);
var wellKnownSymbol = __webpack_require__(32);
var fails = __webpack_require__(6);
var IS_PURE = __webpack_require__(35);

var NativeSuppressedError = globalThis.SuppressedError;
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
var $Error = Error;

// https://github.com/oven-sh/bun/issues/9282
var WRONG_ARITY = !!NativeSuppressedError && NativeSuppressedError.length !== 3;

// https://github.com/oven-sh/bun/issues/9283
var EXTRA_ARGS_SUPPORT = !!NativeSuppressedError && fails(function () {
return NativeSuppressedError(1, 2, 3, { cause: 4 }).cause === 4;
});

var PATCH = WRONG_ARITY || EXTRA_ARGS_SUPPORT;

var $SuppressedError = function SuppressedError(error, suppressed, message) {
var isInstance = isPrototypeOf(SuppressedErrorPrototype, this);
var that;
if (setPrototypeOf) {
that = setPrototypeOf(new $Error(), isInstance ? getPrototypeOf(this) : SuppressedErrorPrototype);
that = PATCH && (!isInstance || getPrototypeOf(this) === SuppressedErrorPrototype)
? new NativeSuppressedError()
: setPrototypeOf(new $Error(), isInstance ? getPrototypeOf(this) : SuppressedErrorPrototype);
} else {
that = isInstance ? this : create(SuppressedErrorPrototype);
createNonEnumerableProperty(that, TO_STRING_TAG, 'Error');
Expand All @@ -5831,15 +5849,17 @@ var $SuppressedError = function SuppressedError(error, suppressed, message) {
if (setPrototypeOf) setPrototypeOf($SuppressedError, $Error);
else copyConstructorProperties($SuppressedError, $Error, { name: true });

var SuppressedErrorPrototype = $SuppressedError.prototype = create($Error.prototype, {
var SuppressedErrorPrototype = $SuppressedError.prototype = PATCH ? NativeSuppressedError.prototype : create($Error.prototype, {
constructor: createPropertyDescriptor(1, $SuppressedError),
message: createPropertyDescriptor(1, ''),
name: createPropertyDescriptor(1, 'SuppressedError')
});

if (PATCH && !IS_PURE) SuppressedErrorPrototype.constructor = $SuppressedError;

// `SuppressedError` constructor
// https://github.com/tc39/proposal-explicit-resource-management
$({ global: true, constructor: true, arity: 3 }, {
$({ global: true, constructor: true, arity: 3, forced: PATCH }, {
SuppressedError: $SuppressedError
});

Expand Down Expand Up @@ -15741,9 +15761,15 @@ var THROWS_WITHOUT_ARGUMENTS = USE_NATIVE_URL && fails(function () {
URL.canParse();
});

// Bun ~ 1.0.30 bug
// https://github.com/oven-sh/bun/issues/9250
var WRONG_ARITY = fails(function () {
return URL.canParse.length !== 1;
});

// `URL.canParse` method
// https://url.spec.whatwg.org/#dom-url-canparse
$({ target: 'URL', stat: true, forced: !THROWS_WITHOUT_ARGUMENTS }, {
$({ target: 'URL', stat: true, forced: !THROWS_WITHOUT_ARGUMENTS || WRONG_ARITY }, {
canParse: function canParse(url) {
var length = validateArgumentsLength(arguments.length, 1);
var urlString = toString(url);
Expand Down
Loading

0 comments on commit 454d98c

Please sign in to comment.