Skip to content

Commit

Permalink
3.35.1
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock committed Jan 20, 2024
1 parent d3b1a03 commit 02c96bf
Show file tree
Hide file tree
Showing 13 changed files with 145 additions and 58 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.35.1 - 2024.01.21](https://github.com/zloirock/core-js/releases/tag/v3.35.1)
- Fixed internal `ToLength` operation with bigints, [#1318](https://github.com/zloirock/core-js/issues/1318)
- Removed significant redundant code from `String#split` polyfill
- Fixed setting names of methods with symbol keys in some old engines
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
32 changes: 13 additions & 19 deletions deno/corejs/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* core-js 3.35.0
* © 2014-2023 Denis Pushkarev (zloirock.ru)
* license: https://github.com/zloirock/core-js/blob/v3.35.0/LICENSE
* core-js 3.35.1
* © 2014-2024 Denis Pushkarev (zloirock.ru)
* license: https://github.com/zloirock/core-js/blob/v3.35.1/LICENSE
* source: https://github.com/zloirock/core-js
*/
!function (undefined) { 'use strict'; /******/ (function(modules) { // webpackBootstrap
Expand Down Expand Up @@ -403,7 +403,7 @@ module.exports = function (options, source) {
} else if (STATIC) {
target = global[TARGET] || defineGlobalProperty(TARGET, {});
} else {
target = (global[TARGET] || {}).prototype;
target = global[TARGET] && global[TARGET].prototype;
}
if (target) for (key in source) {
sourceProperty = source[key];
Expand Down Expand Up @@ -1010,10 +1010,10 @@ var store = __webpack_require__(35);
(module.exports = function (key, value) {
return store[key] || (store[key] = value !== undefined ? value : {});
})('versions', []).push({
version: '3.35.0',
version: '3.35.1',
mode: IS_PURE ? 'pure' : 'global',
copyright: '© 2014-2023 Denis Pushkarev (zloirock.ru)',
license: 'https://github.com/zloirock/core-js/blob/v3.35.0/LICENSE',
copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',
license: 'https://github.com/zloirock/core-js/blob/v3.35.1/LICENSE',
source: 'https://github.com/zloirock/core-js'
});

Expand Down Expand Up @@ -1326,7 +1326,7 @@ var TEMPLATE = String(String).split('String');

var makeBuiltIn = module.exports = function (value, name, options) {
if (stringSlice($String(name), 0, 7) === 'Symbol(') {
name = '[' + replace($String(name), /^Symbol\(([^)]*)\)/, '$1') + ']';
name = '[' + replace($String(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
}
if (options && options.getter) name = 'get ' + name;
if (options && options.setter) name = 'set ' + name;
Expand Down Expand Up @@ -1736,7 +1736,8 @@ var min = Math.min;
// `ToLength` abstract operation
// https://tc39.es/ecma262/#sec-tolength
module.exports = function (argument) {
return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
var len = toIntegerOrInfinity(argument);
return len > 0 ? min(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
};


Expand Down Expand Up @@ -3738,7 +3739,6 @@ var getBuiltIn = __webpack_require__(22);
var inspectSource = __webpack_require__(49);

var noop = function () { /* empty */ };
var empty = [];
var construct = getBuiltIn('Reflect', 'construct');
var constructorRegExp = /^\s*(?:class|function)\b/;
var exec = uncurryThis(constructorRegExp.exec);
Expand All @@ -3747,7 +3747,7 @@ var INCORRECT_TO_STRING = !constructorRegExp.test(noop);
var isConstructorModern = function isConstructor(argument) {
if (!isCallable(argument)) return false;
try {
construct(noop, empty, argument);
construct(noop, [], argument);
return true;
} catch (error) {
return false;
Expand Down Expand Up @@ -4868,12 +4868,6 @@ var replace = uncurryThis(''.replace);
var stringSlice = uncurryThis(''.slice);
var max = Math.max;

var stringIndexOf = function (string, searchValue, fromIndex) {
if (fromIndex > string.length) return -1;
if (searchValue === '') return fromIndex;
return indexOf(string, searchValue, fromIndex);
};

// `String.prototype.replaceAll` method
// https://tc39.es/ecma262/#sec-string.prototype.replaceall
$({ target: 'String', proto: true }, {
Expand Down Expand Up @@ -4902,14 +4896,14 @@ $({ target: 'String', proto: true }, {
if (!functionalReplace) replaceValue = toString(replaceValue);
searchLength = searchString.length;
advanceBy = max(1, searchLength);
position = stringIndexOf(string, searchString, 0);
position = indexOf(string, searchString);
while (position !== -1) {
replacement = functionalReplace
? toString(replaceValue(searchString, position, string))
: getSubstitution(searchString, string, position, [], undefined, replaceValue);
result += stringSlice(string, endOfLastMatch, position) + replacement;
endOfLastMatch = position + searchLength;
position = stringIndexOf(string, searchString, position + advanceBy);
position = position + advanceBy > string.length ? -1 : indexOf(string, searchString, position + advanceBy);
}
if (endOfLastMatch < string.length) {
result += stringSlice(string, endOfLastMatch);
Expand Down
122 changes: 106 additions & 16 deletions docs/compat/compat-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -994,6 +994,7 @@
"chrome": "122",
"chrome-android": "122",
"edge": "122",
"electron": "29.0",
"firefox": "55",
"firefox-android": "55",
"hermes": "0.2",
Expand Down Expand Up @@ -3502,9 +3503,11 @@
"electron": "28.0",
"firefox": "121",
"firefox-android": "121",
"oculus": "31.0",
"opera": "105",
"opera-android": "79",
"opera_mobile": "79"
"opera_mobile": "79",
"quest": "31.0"
},
"es.reflect.apply": {
"android": "49",
Expand Down Expand Up @@ -5830,7 +5833,9 @@
"safari": "14.0",
"samsung": "14.0"
},
"esnext.suppressed-error.constructor": {},
"esnext.suppressed-error.constructor": {
"bun": "1.0.23"
},
"esnext.array.from-async": {
"android": "121",
"bun": "0.3.0",
Expand Down Expand Up @@ -6108,47 +6113,125 @@
"samsung": "10.0"
},
"esnext.iterator.constructor": {
"deno": "1.37"
"android": "122",
"chrome": "122",
"chrome-android": "122",
"deno": "1.37",
"edge": "122",
"electron": "29.0",
"opera": "108"
},
"esnext.iterator.as-indexed-pairs": {},
"esnext.iterator.dispose": {},
"esnext.iterator.drop": {
"deno": "1.37"
"android": "122",
"chrome": "122",
"chrome-android": "122",
"deno": "1.37",
"edge": "122",
"electron": "29.0",
"opera": "108"
},
"esnext.iterator.every": {
"deno": "1.37"
"android": "122",
"chrome": "122",
"chrome-android": "122",
"deno": "1.37",
"edge": "122",
"electron": "29.0",
"opera": "108"
},
"esnext.iterator.filter": {
"deno": "1.37"
"android": "122",
"chrome": "122",
"chrome-android": "122",
"deno": "1.37",
"edge": "122",
"electron": "29.0",
"opera": "108"
},
"esnext.iterator.find": {
"deno": "1.37"
"android": "122",
"chrome": "122",
"chrome-android": "122",
"deno": "1.37",
"edge": "122",
"electron": "29.0",
"opera": "108"
},
"esnext.iterator.flat-map": {
"deno": "1.37"
"android": "122",
"chrome": "122",
"chrome-android": "122",
"deno": "1.37",
"edge": "122",
"electron": "29.0",
"opera": "108"
},
"esnext.iterator.for-each": {
"deno": "1.37"
"android": "122",
"chrome": "122",
"chrome-android": "122",
"deno": "1.37",
"edge": "122",
"electron": "29.0",
"opera": "108"
},
"esnext.iterator.from": {
"deno": "1.37"
"android": "122",
"chrome": "122",
"chrome-android": "122",
"deno": "1.37",
"edge": "122",
"electron": "29.0",
"opera": "108"
},
"esnext.iterator.indexed": {},
"esnext.iterator.map": {
"deno": "1.37"
"android": "122",
"chrome": "122",
"chrome-android": "122",
"deno": "1.37",
"edge": "122",
"electron": "29.0",
"opera": "108"
},
"esnext.iterator.range": {},
"esnext.iterator.reduce": {
"deno": "1.37"
"android": "122",
"chrome": "122",
"chrome-android": "122",
"deno": "1.37",
"edge": "122",
"electron": "29.0",
"opera": "108"
},
"esnext.iterator.some": {
"deno": "1.37"
"android": "122",
"chrome": "122",
"chrome-android": "122",
"deno": "1.37",
"edge": "122",
"electron": "29.0",
"opera": "108"
},
"esnext.iterator.take": {
"deno": "1.37"
"android": "122",
"chrome": "122",
"chrome-android": "122",
"deno": "1.37",
"edge": "122",
"electron": "29.0",
"opera": "108"
},
"esnext.iterator.to-array": {
"deno": "1.37"
"android": "122",
"chrome": "122",
"chrome-android": "122",
"deno": "1.37",
"edge": "122",
"electron": "29.0",
"opera": "108"
},
"esnext.iterator.to-async": {},
"esnext.json.is-raw-json": {
Expand Down Expand Up @@ -6347,9 +6430,11 @@
"electron": "28.0",
"firefox": "121",
"firefox-android": "121",
"oculus": "31.0",
"opera": "105",
"opera-android": "79",
"opera_mobile": "79"
"opera_mobile": "79",
"quest": "31.0"
},
"esnext.reflect.define-metadata": {},
"esnext.reflect.delete-metadata": {},
Expand Down Expand Up @@ -6475,10 +6560,12 @@
"samsung": "22.0"
},
"esnext.symbol.async-dispose": {
"bun": "1.0.23",
"deno": "1.38",
"node": "20.5.0"
},
"esnext.symbol.dispose": {
"bun": "1.0.23",
"deno": "1.38",
"node": "20.5.0"
},
Expand Down Expand Up @@ -6801,6 +6888,7 @@
},
"web.self": {
"android": "86",
"bun": "1.0.22",
"chrome": "86",
"chrome-android": "86",
"deno": "1.29.3",
Expand Down Expand Up @@ -6950,9 +7038,11 @@
"firefox-android": "115",
"ios": "17.0",
"node": "20.1.0",
"oculus": "31.0",
"opera": "106",
"opera-android": "80",
"opera_mobile": "80",
"quest": "31.0",
"safari": "17.0"
},
"web.url.to-json": {
Expand Down
Loading

0 comments on commit 02c96bf

Please sign in to comment.