Skip to content

Commit

Permalink
3.23.2
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock committed Jun 20, 2022
1 parent c1be398 commit 4c29e0a
Show file tree
Hide file tree
Showing 11 changed files with 49 additions and 40 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
## Changelog
##### Unreleased
- Nothing

##### [3.23.2 - 2022.06.21](https://github.com/zloirock/core-js/releases/tag/v3.23.2)
- Avoided creation of extra properties for the handling of `%TypedArray%` constructors in new methods, [#1092 (comment)](https://github.com/zloirock/core-js/issues/1092#issuecomment-1158760512)
- Added Deno 1.23 compat data mapping

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,11 @@ queueMicrotask(() => console.log('called as microtask'));
### Installation:[](#index)
```
// global version
npm install --save core-js@3.23.1
npm install --save core-js@3.23.2
// version without global namespace pollution
npm install --save core-js-pure@3.23.1
npm install --save core-js-pure@3.23.2
// bundled global version
npm install --save core-js-bundle@3.23.1
npm install --save core-js-bundle@3.23.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 @@ -24,7 +24,7 @@

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

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

Expand Down
58 changes: 32 additions & 26 deletions deno/corejs/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* core-js 3.23.1
* core-js 3.23.2
* © 2014-2022 Denis Pushkarev (zloirock.ru)
* license: https://github.com/zloirock/core-js/blob/v3.23.1/LICENSE
* license: https://github.com/zloirock/core-js/blob/v3.23.2/LICENSE
* source: https://github.com/zloirock/core-js
*/
!function (undefined) { 'use strict'; /******/ (function(modules) { // webpackBootstrap
Expand Down Expand Up @@ -879,10 +879,10 @@ var store = __webpack_require__(34);
(module.exports = function (key, value) {
return store[key] || (store[key] = value !== undefined ? value : {});
})('versions', []).push({
version: '3.23.1',
version: '3.23.2',
mode: IS_PURE ? 'pure' : 'global',
copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
license: 'https://github.com/zloirock/core-js/blob/v3.23.1/LICENSE',
license: 'https://github.com/zloirock/core-js/blob/v3.23.2/LICENSE',
source: 'https://github.com/zloirock/core-js'
});

Expand Down Expand Up @@ -3025,7 +3025,10 @@ var getPrototypeOf = __webpack_require__(81);
var setPrototypeOf = __webpack_require__(68);
var wellKnownSymbol = __webpack_require__(31);
var uid = __webpack_require__(38);
var InternalStateModule = __webpack_require__(49);

var enforceInternalState = InternalStateModule.enforce;
var getInternalState = InternalStateModule.get;
var Int8Array = global.Int8Array;
var Int8ArrayPrototype = Int8Array && Int8Array.prototype;
var Uint8ClampedArray = global.Uint8ClampedArray;
Expand All @@ -3037,7 +3040,7 @@ var TypeError = global.TypeError;

var TO_STRING_TAG = wellKnownSymbol('toStringTag');
var TYPED_ARRAY_TAG = uid('TYPED_ARRAY_TAG');
var TYPED_ARRAY_CONSTRUCTOR = uid('TYPED_ARRAY_CONSTRUCTOR');
var TYPED_ARRAY_CONSTRUCTOR = 'TypedArrayConstructor';
// Fixing native typed arrays in Opera Presto crashes the browser, see #595
var NATIVE_ARRAY_BUFFER_VIEWS = NATIVE_ARRAY_BUFFER && !!setPrototypeOf && classof(global.opera) !== 'Opera';
var TYPED_ARRAY_TAG_REQUIRED = false;
Expand Down Expand Up @@ -3068,6 +3071,13 @@ var isView = function isView(it) {
|| hasOwn(BigIntArrayConstructorsList, klass);
};

var getTypedArrayConstructor = function (it) {
var proto = getPrototypeOf(it);
if (!isObject(proto)) return;
var state = getInternalState(proto);
return (state && hasOwn(state, TYPED_ARRAY_CONSTRUCTOR)) ? state[TYPED_ARRAY_CONSTRUCTOR] : getTypedArrayConstructor(proto);
};

var isTypedArray = function (it) {
if (!isObject(it)) return false;
var klass = classof(it);
Expand Down Expand Up @@ -3132,14 +3142,14 @@ var exportTypedArrayStaticMethod = function (KEY, property, forced) {
for (NAME in TypedArrayConstructorsList) {
Constructor = global[NAME];
Prototype = Constructor && Constructor.prototype;
if (Prototype) createNonEnumerableProperty(Prototype, TYPED_ARRAY_CONSTRUCTOR, Constructor);
if (Prototype) enforceInternalState(Prototype)[TYPED_ARRAY_CONSTRUCTOR] = Constructor;
else NATIVE_ARRAY_BUFFER_VIEWS = false;
}

for (NAME in BigIntArrayConstructorsList) {
Constructor = global[NAME];
Prototype = Constructor && Constructor.prototype;
if (Prototype) createNonEnumerableProperty(Prototype, TYPED_ARRAY_CONSTRUCTOR, Constructor);
if (Prototype) enforceInternalState(Prototype)[TYPED_ARRAY_CONSTRUCTOR] = Constructor;
}

// WebKit bug - typed arrays constructors prototype is Object.prototype
Expand Down Expand Up @@ -3177,12 +3187,12 @@ if (DESCRIPTORS && !hasOwn(TypedArrayPrototype, TO_STRING_TAG)) {

module.exports = {
NATIVE_ARRAY_BUFFER_VIEWS: NATIVE_ARRAY_BUFFER_VIEWS,
TYPED_ARRAY_CONSTRUCTOR: TYPED_ARRAY_CONSTRUCTOR,
TYPED_ARRAY_TAG: TYPED_ARRAY_TAG_REQUIRED && TYPED_ARRAY_TAG,
aTypedArray: aTypedArray,
aTypedArrayConstructor: aTypedArrayConstructor,
exportTypedArrayMethod: exportTypedArrayMethod,
exportTypedArrayStaticMethod: exportTypedArrayStaticMethod,
getTypedArrayConstructor: getTypedArrayConstructor,
isView: isView,
isTypedArray: isTypedArray,
TypedArray: TypedArray,
Expand Down Expand Up @@ -7526,12 +7536,10 @@ $({ target: 'Math', stat: true, forced: true }, {

var $ = __webpack_require__(2);

var DEG_PER_RAD = Math.PI / 180;

// `Math.DEG_PER_RAD` constant
// https://rwaldron.github.io/proposal-math-extensions/
$({ target: 'Math', stat: true, nonConfigurable: true, nonWritable: true, forced: Math.DEG_PER_RAD !== DEG_PER_RAD }, {
DEG_PER_RAD: DEG_PER_RAD
$({ target: 'Math', stat: true, nonConfigurable: true, nonWritable: true }, {
DEG_PER_RAD: Math.PI / 180
});


Expand Down Expand Up @@ -7643,12 +7651,10 @@ module.exports = Math.sign || function sign(x) {

var $ = __webpack_require__(2);

var RAD_PER_DEG = 180 / Math.PI;

// `Math.RAD_PER_DEG` constant
// https://rwaldron.github.io/proposal-math-extensions/
$({ target: 'Math', stat: true, nonConfigurable: true, nonWritable: true, forced: Math.RAD_PER_DEG !== RAD_PER_DEG }, {
RAD_PER_DEG: RAD_PER_DEG
$({ target: 'Math', stat: true, nonConfigurable: true, nonWritable: true }, {
RAD_PER_DEG: 180 / Math.PI
});


Expand Down Expand Up @@ -9270,13 +9276,13 @@ module.exports = function (instance, list) {
var ArrayBufferViewCore = __webpack_require__(117);
var speciesConstructor = __webpack_require__(226);

var TYPED_ARRAY_CONSTRUCTOR = ArrayBufferViewCore.TYPED_ARRAY_CONSTRUCTOR;
var aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;
var getTypedArrayConstructor = ArrayBufferViewCore.getTypedArrayConstructor;

// a part of `TypedArraySpeciesCreate` abstract operation
// https://tc39.es/ecma262/#typedarray-species-create
module.exports = function (originalArray) {
return aTypedArrayConstructor(speciesConstructor(originalArray, originalArray[TYPED_ARRAY_CONSTRUCTOR]));
return aTypedArrayConstructor(speciesConstructor(originalArray, getTypedArrayConstructor(originalArray)));
};


Expand Down Expand Up @@ -9313,12 +9319,12 @@ var ArrayBufferViewCore = __webpack_require__(117);

var aTypedArray = ArrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
var TYPED_ARRAY_CONSTRUCTOR = ArrayBufferViewCore.TYPED_ARRAY_CONSTRUCTOR;
var getTypedArrayConstructor = ArrayBufferViewCore.getTypedArrayConstructor;

// `%TypedArray%.prototype.toReversed` method
// https://tc39.es/proposal-change-array-by-copy/#sec-%typedarray%.prototype.toReversed
exportTypedArrayMethod('toReversed', function toReversed() {
return arrayToReversed(aTypedArray(this), this[TYPED_ARRAY_CONSTRUCTOR]);
return arrayToReversed(aTypedArray(this), getTypedArrayConstructor(this));
});


Expand All @@ -9334,16 +9340,16 @@ var aCallable = __webpack_require__(28);
var arrayFromConstructorAndList = __webpack_require__(140);

var aTypedArray = ArrayBufferViewCore.aTypedArray;
var getTypedArrayConstructor = ArrayBufferViewCore.getTypedArrayConstructor;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
var TYPED_ARRAY_CONSTRUCTOR = ArrayBufferViewCore.TYPED_ARRAY_CONSTRUCTOR;
var sort = uncurryThis(ArrayBufferViewCore.TypedArrayPrototype.sort);

// `%TypedArray%.prototype.toSorted` method
// https://tc39.es/proposal-change-array-by-copy/#sec-%typedarray%.prototype.toSorted
exportTypedArrayMethod('toSorted', function toSorted(compareFn) {
if (compareFn !== undefined) aCallable(compareFn);
var O = aTypedArray(this);
var A = arrayFromConstructorAndList(O[TYPED_ARRAY_CONSTRUCTOR], O);
var A = arrayFromConstructorAndList(getTypedArrayConstructor(O), O);
return sort(A, compareFn);
});

Expand All @@ -9359,14 +9365,14 @@ var arraySlice = __webpack_require__(153);
var arrayToSpliced = __webpack_require__(154);

var aTypedArray = ArrayBufferViewCore.aTypedArray;
var getTypedArrayConstructor = ArrayBufferViewCore.getTypedArrayConstructor;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
var TYPED_ARRAY_CONSTRUCTOR = ArrayBufferViewCore.TYPED_ARRAY_CONSTRUCTOR;

// `%TypedArray%.prototype.toSpliced` method
// https://tc39.es/proposal-change-array-by-copy/#sec-%typedarray%.prototype.toSpliced
// eslint-disable-next-line no-unused-vars -- required for .length
exportTypedArrayMethod('toSpliced', function toSpliced(start, deleteCount /* , ...items */) {
return arrayToSpliced(aTypedArray(this), this[TYPED_ARRAY_CONSTRUCTOR], arraySlice(arguments));
return arrayToSpliced(aTypedArray(this), getTypedArrayConstructor(this), arraySlice(arguments));
}, { arity: 2 });


Expand Down Expand Up @@ -9406,8 +9412,8 @@ var classof = __webpack_require__(74);
var uncurryThis = __webpack_require__(13);

var aTypedArray = ArrayBufferViewCore.aTypedArray;
var getTypedArrayConstructor = ArrayBufferViewCore.getTypedArrayConstructor;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
var TYPED_ARRAY_CONSTRUCTOR = ArrayBufferViewCore.TYPED_ARRAY_CONSTRUCTOR;
var slice = uncurryThis(''.slice);

var PROPER_ORDER = !!function () {
Expand All @@ -9427,7 +9433,7 @@ exportTypedArrayMethod('with', { 'with': function (index, value) {
aTypedArray(this);
var relativeIndex = toIntegerOrInfinity(index);
var actualValue = slice(classof(this), 0, 3) === 'Big' ? toBigInt(value) : +value;
return arrayWith(this, this[TYPED_ARRAY_CONSTRUCTOR], relativeIndex, actualValue);
return arrayWith(this, getTypedArrayConstructor(this), relativeIndex, actualValue);
} }['with'], !PROPER_ORDER);


Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "3.23.1",
"version": "3.23.2",
"workspaces": [
"./packages/*"
],
Expand Down
6 changes: 3 additions & 3 deletions packages/core-js-builder/package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"name": "core-js-builder",
"description": "core-js builder",
"version": "3.23.1",
"version": "3.23.2",
"repository": {
"type": "git",
"url": "https://github.com/zloirock/core-js.git",
"directory": "packages/core-js-builder"
},
"main": "index.js",
"dependencies": {
"core-js": "3.23.1",
"core-js-compat": "3.23.1",
"core-js": "3.23.2",
"core-js-compat": "3.23.2",
"mkdirp": ">=0.5.5 <1",
"webpack": ">=4.46.0 <5"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/core-js-bundle/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "core-js-bundle",
"description": "Standard library",
"version": "3.23.1",
"version": "3.23.2",
"repository": {
"type": "git",
"url": "https://github.com/zloirock/core-js.git"
Expand Down
2 changes: 1 addition & 1 deletion packages/core-js-compat/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "core-js-compat",
"description": "core-js compat",
"version": "3.23.1",
"version": "3.23.2",
"repository": {
"type": "git",
"url": "https://github.com/zloirock/core-js.git",
Expand Down
2 changes: 1 addition & 1 deletion packages/core-js-pure/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "core-js-pure",
"description": "Standard library",
"version": "3.23.1",
"version": "3.23.2",
"repository": {
"type": "git",
"url": "https://github.com/zloirock/core-js.git"
Expand Down
4 changes: 2 additions & 2 deletions packages/core-js/internals/shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ var store = require('../internals/shared-store');
(module.exports = function (key, value) {
return store[key] || (store[key] = value !== undefined ? value : {});
})('versions', []).push({
version: '3.23.1',
version: '3.23.2',
mode: IS_PURE ? 'pure' : 'global',
copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
license: 'https://github.com/zloirock/core-js/blob/v3.23.1/LICENSE',
license: 'https://github.com/zloirock/core-js/blob/v3.23.2/LICENSE',
source: 'https://github.com/zloirock/core-js'
});
2 changes: 1 addition & 1 deletion packages/core-js/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "core-js",
"description": "Standard library",
"version": "3.23.1",
"version": "3.23.2",
"repository": {
"type": "git",
"url": "https://github.com/zloirock/core-js.git"
Expand Down

0 comments on commit 4c29e0a

Please sign in to comment.