Skip to content

Commit f44604e

Browse files
committed
3.27.1
1 parent 98995dc commit f44604e

File tree

13 files changed

+73
-26
lines changed

13 files changed

+73
-26
lines changed

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
## Changelog
22
##### Unreleased
3+
- Nothing
4+
5+
##### [3.27.1 - 2022.12.30](https://github.com/zloirock/core-js/releases/tag/v3.27.1)
36
- Fixed a Chakra-based MS Edge (18-) bug that unfreeze (O_o) frozen arrays used as `WeakMap` keys
47
- Fixing of the previous bug also fixes some cases of `String.dedent` in MS Edge
58
- Fixed dependencies of some entries

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -203,11 +203,11 @@ structuredClone(new Set([1, 2, 3])); // => new Set([1, 2, 3])
203203
### Installation:[](#index)
204204
```sh
205205
// global version
206-
npm install --save [email protected].0
206+
npm install --save [email protected].1
207207
// version without global namespace pollution
208-
npm install --save [email protected].0
208+
npm install --save [email protected].1
209209
// bundled global version
210-
npm install --save [email protected].0
210+
npm install --save [email protected].1
211211
```
212212

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

deno/corejs/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

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

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

deno/corejs/index.js

+49-8
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
2-
* core-js 3.27.0
2+
* core-js 3.27.1
33
* © 2014-2022 Denis Pushkarev (zloirock.ru)
4-
* license: https://github.com/zloirock/core-js/blob/v3.27.0/LICENSE
4+
* license: https://github.com/zloirock/core-js/blob/v3.27.1/LICENSE
55
* source: https://github.com/zloirock/core-js
66
*/
77
!function (undefined) { 'use strict'; /******/ (function(modules) { // webpackBootstrap
@@ -939,10 +939,10 @@ var store = __webpack_require__(36);
939939
(module.exports = function (key, value) {
940940
return store[key] || (store[key] = value !== undefined ? value : {});
941941
})('versions', []).push({
942-
version: '3.27.0',
942+
version: '3.27.1',
943943
mode: IS_PURE ? 'pure' : 'global',
944944
copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
945-
license: 'https://github.com/zloirock/core-js/blob/v3.27.0/LICENSE',
945+
license: 'https://github.com/zloirock/core-js/blob/v3.27.1/LICENSE',
946946
source: 'https://github.com/zloirock/core-js'
947947
});
948948

@@ -7831,17 +7831,34 @@ __webpack_require__(242);
78317831

78327832
"use strict";
78337833

7834+
var FREEZING = __webpack_require__(238);
78347835
var global = __webpack_require__(3);
78357836
var uncurryThis = __webpack_require__(13);
78367837
var defineBuiltIns = __webpack_require__(166);
78377838
var InternalMetadataModule = __webpack_require__(232);
78387839
var collection = __webpack_require__(231);
78397840
var collectionWeak = __webpack_require__(243);
78407841
var isObject = __webpack_require__(19);
7841-
var isExtensible = __webpack_require__(236);
78427842
var enforceInternalState = __webpack_require__(51).enforce;
7843+
var fails = __webpack_require__(6);
78437844
var NATIVE_WEAK_MAP = __webpack_require__(52);
78447845

7846+
var $Object = Object;
7847+
// eslint-disable-next-line es/no-array-isarray -- safe
7848+
var isArray = Array.isArray;
7849+
// eslint-disable-next-line es/no-object-isextensible -- safe
7850+
var isExtensible = $Object.isExtensible;
7851+
// eslint-disable-next-line es/no-object-isfrozen -- safe
7852+
var isFrozen = $Object.isFrozen;
7853+
// eslint-disable-next-line es/no-object-issealed -- safe
7854+
var isSealed = $Object.isSealed;
7855+
// eslint-disable-next-line es/no-object-freeze -- safe
7856+
var freeze = $Object.freeze;
7857+
// eslint-disable-next-line es/no-object-seal -- safe
7858+
var seal = $Object.seal;
7859+
7860+
var FROZEN = {};
7861+
var SEALED = {};
78457862
var IS_IE11 = !global.ActiveXObject && 'ActiveXObject' in global;
78467863
var InternalWeakMap;
78477864

@@ -7854,18 +7871,27 @@ var wrapper = function (init) {
78547871
// `WeakMap` constructor
78557872
// https://tc39.es/ecma262/#sec-weakmap-constructor
78567873
var $WeakMap = collection('WeakMap', wrapper, collectionWeak);
7874+
var WeakMapPrototype = $WeakMap.prototype;
7875+
var nativeSet = uncurryThis(WeakMapPrototype.set);
7876+
7877+
// Chakra Edge bug: adding frozen arrays to WeakMap unfreeze them
7878+
var hasMSEdgeFreezingBug = function () {
7879+
return FREEZING && fails(function () {
7880+
var frozenArray = freeze([]);
7881+
nativeSet(new $WeakMap(), frozenArray, 1);
7882+
return !isFrozen(frozenArray);
7883+
});
7884+
};
78577885

78587886
// IE11 WeakMap frozen keys fix
78597887
// We can't use feature detection because it crash some old IE builds
78607888
// https://github.com/zloirock/core-js/issues/485
7861-
if (NATIVE_WEAK_MAP && IS_IE11) {
7889+
if (NATIVE_WEAK_MAP) if (IS_IE11) {
78627890
InternalWeakMap = collectionWeak.getConstructor(wrapper, 'WeakMap', true);
78637891
InternalMetadataModule.enable();
7864-
var WeakMapPrototype = $WeakMap.prototype;
78657892
var nativeDelete = uncurryThis(WeakMapPrototype['delete']);
78667893
var nativeHas = uncurryThis(WeakMapPrototype.has);
78677894
var nativeGet = uncurryThis(WeakMapPrototype.get);
7868-
var nativeSet = uncurryThis(WeakMapPrototype.set);
78697895
defineBuiltIns(WeakMapPrototype, {
78707896
'delete': function (key) {
78717897
if (isObject(key) && !isExtensible(key)) {
@@ -7897,6 +7923,21 @@ if (NATIVE_WEAK_MAP && IS_IE11) {
78977923
return this;
78987924
}
78997925
});
7926+
// Chakra Edge frozen keys fix
7927+
} else if (hasMSEdgeFreezingBug()) {
7928+
defineBuiltIns(WeakMapPrototype, {
7929+
set: function set(key, value) {
7930+
var arrayIntegrityLevel;
7931+
if (isArray(key)) {
7932+
if (isFrozen(key)) arrayIntegrityLevel = FROZEN;
7933+
else if (isSealed(key)) arrayIntegrityLevel = SEALED;
7934+
}
7935+
nativeSet(this, key, value);
7936+
if (arrayIntegrityLevel == FROZEN) freeze(key);
7937+
if (arrayIntegrityLevel == SEALED) seal(key);
7938+
return this;
7939+
}
7940+
});
79007941
}
79017942

79027943

docs/compat/compat-data.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -5465,7 +5465,7 @@
54655465
"chrome": "51",
54665466
"chrome-android": "51",
54675467
"deno": "1.0",
5468-
"edge": "15",
5468+
"edge": "79",
54695469
"electron": "1.2",
54705470
"firefox": "53",
54715471
"firefox-android": "53",
@@ -5486,7 +5486,7 @@
54865486
"chrome": "51",
54875487
"chrome-android": "51",
54885488
"deno": "1.0",
5489-
"edge": "15",
5489+
"edge": "79",
54905490
"electron": "1.2",
54915491
"firefox": "53",
54925492
"firefox-android": "53",

docs/compat/tests.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -1364,7 +1364,7 @@ GLOBAL.tests = {
13641364
return unescape;
13651365
},
13661366
'es.weak-map.constructor': [SAFE_ITERATION_CLOSING_SUPPORT, function () {
1367-
var key = Object.freeze({});
1367+
var key = Object.freeze([]);
13681368
var called = 0;
13691369
var iterable = {
13701370
next: function () {
@@ -1376,10 +1376,13 @@ GLOBAL.tests = {
13761376
};
13771377

13781378
var map = new WeakMap(iterable);
1379+
// MS IE bug
13791380
return map.get(key) == 1
13801381
&& map.get(null) == undefined
13811382
&& map.set({}, 2) == map
1382-
&& map[Symbol.toStringTag];
1383+
&& map[Symbol.toStringTag]
1384+
// MS Edge bug
1385+
&& Object.isFrozen(key);
13831386
}],
13841387
'es.weak-set.constructor': [SAFE_ITERATION_CLOSING_SUPPORT, function () {
13851388
var key = {};

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "3.27.0",
2+
"version": "3.27.1",
33
"repository": {
44
"type": "git",
55
"url": "https://github.com/zloirock/core-js.git"

packages/core-js-builder/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "core-js-builder",
3-
"version": "3.27.0",
3+
"version": "3.27.1",
44
"description": "core-js builder",
55
"repository": {
66
"type": "git",
@@ -20,8 +20,8 @@
2020
"sideEffects": false,
2121
"main": "index.js",
2222
"dependencies": {
23-
"core-js": "3.27.0",
24-
"core-js-compat": "3.27.0",
23+
"core-js": "3.27.1",
24+
"core-js-compat": "3.27.1",
2525
"mkdirp": ">=0.5.5 <1",
2626
"webpack": ">=4.46.0 <5"
2727
},

packages/core-js-bundle/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "core-js-bundle",
3-
"version": "3.27.0",
3+
"version": "3.27.1",
44
"description": "Standard library",
55
"keywords": [
66
"ES3",

packages/core-js-compat/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "core-js-compat",
3-
"version": "3.27.0",
3+
"version": "3.27.1",
44
"description": "core-js compat",
55
"repository": {
66
"type": "git",

packages/core-js-pure/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "core-js-pure",
3-
"version": "3.27.0",
3+
"version": "3.27.1",
44
"description": "Standard library",
55
"keywords": [
66
"ES3",

packages/core-js/internals/shared.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ var store = require('../internals/shared-store');
44
(module.exports = function (key, value) {
55
return store[key] || (store[key] = value !== undefined ? value : {});
66
})('versions', []).push({
7-
version: '3.27.0',
7+
version: '3.27.1',
88
mode: IS_PURE ? 'pure' : 'global',
99
copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
10-
license: 'https://github.com/zloirock/core-js/blob/v3.27.0/LICENSE',
10+
license: 'https://github.com/zloirock/core-js/blob/v3.27.1/LICENSE',
1111
source: 'https://github.com/zloirock/core-js'
1212
});

packages/core-js/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "core-js",
3-
"version": "3.27.0",
3+
"version": "3.27.1",
44
"description": "Standard library",
55
"keywords": [
66
"ES3",

0 commit comments

Comments
 (0)