Added missed detection of native DataView constructor accepting a negative byteLength and rejecting a non-integer byteOffset in V8 ~ Chrome 50-53
Added missed detection of native ArrayBuffer.prototype.slice returning an empty buffer for a detached one instead of throwing in V8 ~ Chrome < 52 and Safari < 14.1
Fixed ArrayBuffer.prototype.slice polyfill: the receiver is checked before the conversion of arguments, an own byteLength property of a buffer no longer replaces its length, a detached buffer is rejected instead of returning an empty one in FF45
ArrayBuffer.prototype.slice polyfill passes calls with an explicit end to the native method too where it exists, instead of copying byte by byte, which makes it faster by orders of magnitude on large buffers
Fixed DataView.prototype.{ getFloat16, setFloat16, getUint8Clamped, setUint8Clamped } polyfills and ArrayBuffer.prototype.slice without arguments or with undefined as the end in NodeJS 0.11.0 - 0.11.3, where native methods of ArrayBuffer and DataView are own properties of instances
Fixed %TypedArray%.prototype.{ set, slice, subarray } polyfills shadowed by own native methods of typed array instances in NodeJS 0.11.0 - 0.11.3
Array.from, Array.fromAsync and { Map, Object }.groupBy polyfills check the maximum allowed index before requesting the next value and no longer allow the index 2 ** 53 - 1
Fixed symbol keys of groups leaking out to for-in and Object.keys in obsolete Array.prototype.{ group, groupBy } and %TypedArray%.prototype.groupBy together with Symbol polyfill, like it was fixed for Object.groupBy
Fixed a misleading error message of Map, Set, WeakMap and WeakSet methods called on null in the pure version
Added missed detection of native Array.prototype.fill reading the length of array-likes without ToLength in V8 ~ Chrome 45-47
Fixed Array.prototype.{ concat, filter, flat, flatMap, map, slice, splice } polyfills ignoring a redefined Array[@@species] of the current realm and @@species of constructors with an array as .prototype; they no longer run IsConstructor on each call, which makes them faster on small arrays
Added missed detection of native Array.prototype.{ flat, flatMap } without @@species support in Hermes and Rhino < 1.9, like for the rest of Array.prototype methods creating arrays
Added missed detection of native Array.prototype.unshift reading the length of array-likes without ToLength in FF < 55 and IE and moving elements on a call without arguments in IE
The Array.prototype.unshift polyfill passes arrays with arguments to the native method where it handles them properly, which makes it faster by orders of magnitude on large arrays
Fixed the polyfilled array iterator (Array.prototype.{ entries, keys, values, @@iterator }) reading the length of array-likes without ToLength: endless iteration with a missing or non-numeric length and of primitives, an extra step with a fractional one; an error on reading length no longer skips an element
Fixed Object.{ assign, entries, values } polyfills ignoring properties that become enumerable during iteration, except in old V8 where collecting all keys breaks property order
Added missed detection of native Reflect.construct ignoring newTarget.prototype for built-in constructors in FF44, fixing transpiled subclassing of constructors like Array
Fixed the Reflect.construct polyfill reading arguments after newTarget.prototype and reading the argument list length twice, which could lose arguments
Added missed detection of native Array.from and %TypedArray%.from accepting primitive iterator results after warmup in Safari 14
Fixed String.dedent line splitting, CR / CRLF normalization, validation of raw templates with large lengths, and vertical tab escapes in old IE; documented its frozen raw requirement
Fixed receiver validation in the self polyfill and added detection of native getters accepting invalid receivers in Bun and Deno; the polyfilled setter now accepts null and undefined as the global object
Replaced an unused export option in the self fallback for IE8-
Fixed an ordinary assignment to self with the polyfilled setter in FF < 12, where it left undefined instead of the assigned value
Stopped replacing the native Promise in Deno < 1.24 solely for unhandledrejection support, fixing broken Web Streams and timers; this emulation remains available in the pure version
Fixed falsely detected ArrayBuffer transfer support in Deno 1.13, preventing installation of unusable transfer methods and loss of MessagePorts in failed mixed transfers
Fixed detection of detached ArrayBuffer in ArrayBuffer.prototype.detached, structuredClone and Uint8Array.prototype.{ toBase64, toHex, setFromBase64, setFromHex } polyfills
Fixed structuredClone preserving length-tracking views of resizable and growable shared buffers and throwing DataCloneError for out-of-bounds views
Fixed structuredClone transferring platform objects before validating the transfer list and cloning the value, and processing mixed transfer lists out of order
Fixed structuredClone and ArrayBuffer.prototype.{ transfer, transferToFixedLength } polyfills relying on a non-native structuredClone installed before core-js in modern engines: ArrayBuffers were left attached, and structuredClone accepted invalid transfer lists and returned untransferred platform objects
Fixed structuredClone replacing buffer and view cloning errors with unrelated DataCloneError exceptions, and accepting detached views when their buffers had already been cloned
Fixed structuredClone with getters that modify the source: Map / Set entries are snapshotted before recursive cloning, and deleted own properties of objects and arrays are skipped
Fixed lost error messages in the structuredClone polyfill in old Firefox
Fixed structuredClone cloning URL and URLSearchParams as empty objects instead of throwing a DataCloneError: polyfilled instances and native ones in NodeJS <= 20 and Deno <= 2.8
Fixed detection of detached WebAssembly buffers in old V8 without MessageChannel, including incorrect structuredClone errors in NodeJS 8
Fixed a memory leak in ArrayBuffer.prototype.{ transfer, transferToFixedLength } and structuredClone with transfer polyfills in engines without a proper native structuredClone transfer
Fixed ArrayBuffer.prototype.{ transfer, transferToFixedLength } polyfills losing the source on allocation failure, using species, ignoring changes during length coercion, and accepting non-detachable buffers; transfer preserves the original maximum length
Fixed native ArrayBuffer.prototype.{ transfer, transferToFixedLength } crashing on allocation failure in NodeJS 21 and 22.0-22.3
Avoided reading the value of a done result in Iterator.{ zip, zipKeyed } polyfills, including the Iterator.zip padding iterator
Fixed Iterator.zip closing the input iterator when reading an input result's value throws
Fixed Iterator.prototype.flatMap polyfill closing the source iterator when reading its result's value throws
Fixed non-boolean done values in results of AsyncIterator.from and Iterator.prototype.toAsync when adapting sync iterators
Fixed and updated Iterator.range (and obsolete Number.range and BigInt.range): the iterator tag, read-only accessors, validation of NaN steps, yielding infinite endpoints and error messages for legacy methods
Fixed Array.fromAsync polyfill constructing the result before opening the iterator, handling array-like inputs through an iterator instead of using their initial length, and skipping await for primitive mapper results
Fixed Iterator.prototype.chunks polyfill calling next and return on an exhausted source after yielding the final partial chunk
Improved error messages for invalid iterator window sizes and different iterator lengths in strict Iterator.{ zip, zipKeyed } mode
Fixed JSON.stringify with an array replacer - the __proto__ key is no longer lost in FF < 39, polyfilled symbols are no longer serialized as objects (both are regressions since 3.50.0), the length of a proxy of an array is converted to an integer
Fixed JSON.stringify polyfill with a space containing quotes or lone surrogates - it no longer throws or corrupts keys in case of raw JSON values or an array replacer with integer-like keys, lone surrogates are no longer escaped in engines without well-formed JSON.stringify
Fixed JSON.stringify polyfill returning a string instead of undefined in IE8 for values serialized to undefined, for undefined and symbols without an array or function replacer it's a regression since 3.47.0
Fixed order of JSON.parse dependencies loading, a regression since 3.47.0
Restored native JSON.parse delegation without a callable reviver in engines without native symbols, while preserving symbol conversion and detecting native parsing of numbers with leading zeros in IE
Fixed JSON.parse polyfill accepting malformed object keys after commas, mishandling rejected reviver property updates, and exposing context.source after a zero changes sign
Fixed String.prototype.{ match, matchAll, search } polyfills with a non-regex argument: like RegExpCreate, they convert it to a string, so a regex-like object is no longer read by its source, and the pure version of matchAll throws on a symbol
URL and URLSearchParams improvements and fixes:
Raised the bar for native URL and URLSearchParams: the polyfills replace older native implementations that have dozens of bugs and fail hundreds of WPT URL tests - validation and parsing of hosts, IPv4 addresses, non-special URLs, percent-encoding, IDNA processing, lose URLSearchParams data, etc. It became reasonable only now, when the polyfills got integration with native APIs and proper Unicode support (see below). The new bar does not cover all those bugs: modern engines still have some of them, and they are left with native implementations to avoid slowing them down with the polyfills
Integration with native APIs:
Added integration of polyfilled URL with NodeJS, Deno and Bun APIs that accept only native URL objects, like Deno.readFile, Bun.file, node:fs and node:http methods: instances of the URL polyfill are native URL objects there
Added integration of polyfilled URLSearchParams with native APIs that accept only native URLSearchParams objects, like fetch, Request, Response and APIs of another realm, including the pure version: where the engine has a usable native URLSearchParams, instances of the polyfill are native objects, and fetch and Request are no longer wrapped where they take such instances
Added integration of polyfilled URLSearchParams with native Response, XMLHttpRequest and navigator.sendBeacon in engines where they do not take such instances, and fixed installation of the native body wrappers in Deno
Fixed the pure version rewriting the native Request.prototype.constructor in engines where it polyfills URLSearchParams
Fixed the native body wrappers for polyfilled URLSearchParams: subclassing of Request, calling an overridden toString instead of serializing the internal parameter list, and dropping the headers of a Request passed as the input
Unicode and encoding:
Added Unicode normalization and compatibility mapping of URL polyfill domains through the native String.prototype.normalize, where it's available
Fixed mapping of mathematical Latin letters and digits in URL domains, #1223
Fixed URL polyfill joining lone surrogates separated by tabs or newlines instead of replacing them with U+FFFD before parsing
Fixed URL domain case folding for Greek, Cherokee, historic Cyrillic, and Deseret letters
Added validation of URL polyfill domains against the Unicode 18 IDNA mapping table: a domain with an unassigned, disallowed, or unmapped code point is rejected instead of being converted to another host
Fixed rejection of disallowed Unicode format controls, tags, ideographic description characters, and compatibility characters containing label separators in URL domains
Fixed removal of ignored shorthand and musical format controls in URL domains
Fixed Punycode overflow in URL parsing: constructors and href setters throw a TypeError, while host and hostname setters leave the URL unchanged
Avoided quadratic Punycode encoding in the URL polyfill for labels with many distinct Unicode code points
Fixed URL polyfill accepting domain labels that begin with a combining mark
Added validation of zero width joiners and the Bidi rule in URL polyfill domains
Added decoding and validation of Punycode labels in non-ASCII URL polyfill domains
Fixed URL polyfill domain case mapping for Georgian, Osage, Old Hungarian, Warang Citi, and Adlam capitals, U+0130, and U+018E in old engines
Fixed decoding of invalid UTF-8 leading bytes in URLSearchParams and URL queries
Fixed USVString conversion in URLSearchParams, including lone surrogates and record keys that become equal after conversion
Fixed URL setters skipping value conversion on early returns and changing state before value conversion
Updated URL polyfill handling of file: hosts and empty path segments, blob: origins, and empty pathname assignments to the current URL Standard, #1586
Fixed failed URL#href assignments corrupting the URL and its searchParams, and URL parsing depending on replaced string iterator methods
Avoided rebuilding unaffected parameters and redundant native delete calls in the URLSearchParams.prototype.delete(name, value) patch for old engines
Fixed pure URL static polyfills mutating the global URL constructor; pure constructor wrappers now preserve native static properties and arity, with a fix of the incorrect native Symbol arity in FF37-42
Fixed enumerability of URL.{ canParse, parse, createObjectURL, revokeObjectURL } polyfills
Fixed URLSearchParams.prototype.delete(name, value) patch arguments conversion order
Fixed the element conversion order and pair length validation in the URLSearchParams sequence initializer
Fixed URLSearchParams polyfill iterators ignoring new entries after returning done: true
Made duplicate removal in the URLSearchParams polyfill's delete and set methods linear
Fixed the size of URL-bound URLSearchParams in engines without property descriptor support
Fixed record key enumeration in the URLSearchParams polyfill, including symbol keys and properties changed during conversion
Fixed detection of incorrect errors from native atob / btoa in Hermes, atob in Deno < 1.7, and btoa in Deno < 1.7.5
Fixed detection of native atob not checking the number of arguments in Deno < 1.17.3
Fixed the pure version marking the native Error.isError as .sham
Fixed subclassing some wrapped native constructors in the pure version, #1585
Fixed ignored nonWritable / nonConfigurable property attributes in the pure version, including DisposableStack / AsyncDisposableStack tags and numeric constants
Fixed writable .prototype properties of polyfilled constructors and constructor wrappers in the pure version without modifying native constructors
Fixed handling arguments[@@iterator] in core-js internals in engines with native Array iterator, but without native arguments iterator (Firefox < 46)
Fixed the iterator name correction adding a name property to collection prototypes in old engines, a regression since 3.18.0
Fixed restoring Iterator.prototype.constructor when keeping the native Iterator
Fixed names and built-in metadata of polyfilled iterator next methods
Fixed the name of Date.prototype.toUTCString when polyfilling Date.prototype.toGMTString
Fixed missing iterator result validation in Array.from, typed arrays, collection and iterator consumers, and URLSearchParams polyfills
Fixed Function#toString conversion of Symbol.for wrapped by the Symbol.prototype.description polyfill
Fixed loading of core-js when a polyfilled property already contains null or a value of an incompatible type
Fixed defining unpolyfillable Object.setPrototypeOf as undefined in IE10-
Fixed property descriptors of Symbol.prototype[@@toPrimitive] and Date.prototype[@@toPrimitive] polyfills
Fixed an extra own property check of non-symbol keys in Object.prototype.propertyIsEnumerable from the Symbol polyfill, observable with proxies in FF33-35
Number.prototype.{ toExponential, toFixed, toPrecision } improvements and fixes:
Number.prototype.{ toExponential, toFixed, toPrecision } polyfills accept up to 100 digits, as required since ES2018, added detection of native methods limited to 20 / 21 digits. The Number.prototype.toExponential polyfill no longer throws on 21-100 fraction digits in FF86-, a regression since 3.20.0
Fixed Number.prototype.toExponential polyfill accuracy with decimals close to a rounding half, values next to powers of ten and big fraction digits - it generates exact digits now, for some decimals it's a regression since 3.49.0
Fixed Number.prototype.toPrecision polyfill - it had no own implementation and could not fix bugs of native methods, now it generates exact digits. Added missed detection of native Number.prototype.toPrecision rounding exact integer ties to even in FF86-, incorrectly rounding some decimals in IE and Chakra-based Edge, losing digits of numbers with leading zeros in Rhino 1.8.1+ and checking the precision range before non-finite values in FF49- and Safari 10-
Added missed detection of native Number.prototype.toExponential incorrectly rounding some decimals in Chakra-based Edge
Added missed detection of native Number.prototype.{ toExponential, toFixed, toPrecision } returning garbage, throwing Java exceptions or hanging on subnormal numbers in Rhino 1.8.0-, the polyfills no longer rely on native methods there
Added missed detection of imprecise native Math.log2 on powers of two in V8 ~ Chrome < 41, FF < 48 and Rhino < 1.9.2, the polyfill is also exact on them now
Added missed detection of imprecise native Math.log10 on powers of ten in V8 ~ Chrome < 41, the polyfill is also exact on them now
Added missed detection of native Math.tanh returning NaN on big arguments and 0 on tiny ones in V8 ~ Chrome < 48
Added missed JSON.parse to JSON.rawJSON entries dependencies to validate input with the corrected parser
Added missed JSON.stringify to JSON.rawJSON entries dependencies, a regression since 3.47.0
Added missed Date.prototype.toISOString to Date.prototype.toJSON and JSON.stringify entries dependencies, for JSON.stringify entries it's a regression since 3.36.0
Added missed Map to /actual/array/ namespace entries dependencies, a regression since 3.29.1
Added missing Iterator.prototype[Symbol.dispose] dependencies to iterator factory entries, and Iterator.prototype.toAsync dependencies to full/iterator/{ concat, zip, zip-keyed, range }
Fixed ArrayBuffer and DataView dependencies of some entries, for /array-buffer/constructor entries it's a regression since 3.36.0
Fixed order of dependencies loading in some entries, for /array/from-async and /array/ namespace entries it's a regression since 3.43.0
Added missed Array[@@species], Object.prototype.toString, iterators and other dependencies to some entries
Added missed String.prototype.{ isWellFormed, toWellFormed } to /string/virtual/ and Number.prototype.clamp to /full/number/virtual/ namespace entries
Fixed /full/instance/clamp entry, it checked String.prototype instead of Number.prototype
Fixed /error/to-string, /function/has-instance and /dom-collections/for-each entry exports to accept the receiver as the first argument
Removed unneeded dependencies and workarounds from some entries
Fixed missing polyfills and rejected exact versions for mobile browserslist targets in core-js-compat and core-js-builder
Fixed handling of Safari Technology Preview and latest targets in core-js-compat and core-js-builder; invalid non-numeric target versions now throw a RangeError naming the engine and value
Fixed empty target sets selecting no polyfills in core-js-compat and core-js-builder; they now behave like omitted targets
Fixed exclude in core-js-compat and core-js-builder treating stable es.* modules and their legacy esnext.* aliases inconsistently; excluding either name now excludes both
Fixed exclude: null throwing in core-js-compat and core-js-builder; it now behaves like an omitted option
Fixed loading and target parsing of core-js-compat on NodeJS 6.4
URL and URLSearchParams marked as properly supported from Chrome 130, Firefox 133, Safari 15.4, iOS 15.4, NodeJS 20.12 and Deno 1.25.2 because of hundreds bugs of older native implementations in validation and parsing of hosts, non-special URLs and IDNA processing, and data loss in URLSearchParams
Reflect.construct marked as properly supported from FF45 instead of FF44 because of the built-in constructor bug above
Array.from and %TypedArray%.from marked as properly supported from Safari 15.0 because of incorrect iterator result validation after warmup (see above)
Marked self as unsupported in Bun and Deno because their getters accept invalid receivers
Iterator.concat no longer marked as supported in V8-based engines because of the iterator-closing bug above
Aligned the String.fromCodePoint probe with the module arity check; marked as properly supported from FF35 instead of FF29
atob marked as properly supported from Deno 1.17.3, btoa - from Deno 1.11; atob no longer marked as supported in Hermes / React Native because of the error handling bugs above
Aligned atob / btoa probes with module checks for arity, basic encoding / decoding, btoa(null) conversion and the error from atob() without arguments
Promise, its original methods, finally and allSettled marked as supported from Deno 1.0 instead of 1.24
queueMicrotask marked as properly supported from Deno 1.24.3 instead of 1.0 because of incorrect arity
Fixed NodeJS compat data for array iterators, Array.prototype.{ reduce, reduceRight }, ArrayBuffer, ArrayBuffer.prototype.slice, DataView, Math.imul and %TypedArray%.prototype.subarray
ArrayBuffer.prototype.slice marked as properly supported from Chrome 52 and Safari 14.1 instead of Chrome 31 and Safari 12.1 because of the detached buffers bug above
DataView marked as properly supported from Chrome 54 and NodeJS 7.0 instead of Chrome 26 and NodeJS 0.11.5 because of the arguments conversion bug above
Function.prototype[@@hasInstance] marked as supported from Chrome 50 instead of 51
Fixed Deno 1.1.1 compat data mapping: AggregateError, Promise.any and String.prototype.replaceAll are available from this version
Symbol.dispose, Symbol.asyncDispose and Iterator.prototype[@@dispose] marked as shipped in FF141 instead of FF135 - before that, they were available only in Nightly
Math.{ acosh, asinh } marked as supported from Rhino 1.9.2
Math.log2 marked as properly supported from Chrome 41, FF48 and Rhino 1.9.2 because of imprecision on powers of two (see above)
Math.log10 marked as properly supported from Chrome 41 because of imprecision on powers of ten (see above)
Math.tanh marked as properly supported from Chrome 48, Math.atanh - from Chrome 53 and Rhino 1.9.2, Math.log1p - from Chrome 39, Math.{ acosh, asinh, atanh, expm1, log1p } - from FF48 because of the bugs above
Number.prototype.{ toExponential, toFixed, toPrecision } marked as properly supported from V8 ~ Chrome 62, Safari 13.1 and Hermes 0.1.1 because of the limit of digits, Number.prototype.toPrecision - from FF87 because of the rounding bug above; Number.prototype.{ toExponential, toFixed } - from Rhino 1.8.1 because of the subnormal numbers bug above; Number.prototype.toExponential no longer marked as supported in Edge 18, Number.prototype.toPrecision - in IE, EdgeHTML-based Edge and Rhino
Math.sumPrecise marked as properly supported from V8 ~ Chrome 158 where the bug with modified prototypes of array iterators was fixed
Uint8Array.prototype.{ setFromBase64, toBase64, toHex } marked as properly supported from Chrome 144 because of the resizable buffer and read count bugs (see above)
ArrayBuffer.prototype.{ transfer, transferToFixedLength } marked as properly supported from NodeJS 22.4 because of the allocation failure crash (see above)
Set.prototype.union marked as properly supported from V8 ~ Chrome 133 where it gets the iterator record of a set-like object before cloning this
self marked as properly supported from Edge 87: unlike Chrome 86, Edge 86 has it as a data property
Because of the bugs above, Array.prototype.flat marked as properly supported from Rhino 1.9.0, Array.prototype.flatMap no longer marked as supported in Rhino, both no longer marked as supported in Hermes / React Native
Array.prototype.splice marked as supported from Rhino 1.9.0
Array.prototype.fill marked as properly supported from Chrome 48 instead of Chrome 45 because of the bug above
Array.prototype.unshift marked as properly supported from FF55 instead of FF23 and Edge 16 instead of Edge 12 and no longer marked as supported in IE because of the bugs above
Fixed Rhino compat data: Promise.withResolvers marked as supported from 1.9.0, Array.fromAsync and %TypedArray%.prototype.with marked as not supported, Error.prototype.toString, ArrayBuffer.isView and %TypedArray%.prototype.subarray marked as supported from 1.7.13, %TypedArray%.prototype.{ copyWithin, every, filter, find, findIndex, forEach, includes, indexOf, join, lastIndexOf, map, reduce, reduceRight, reverse, some, sort, toLocaleString } - from 1.8.0
Fixed Firefox compat data: Date.prototype.toISOString marked as supported from FF6, Object.getOwnPropertyNames - from FF33, Number constructor - from FF36, Array.prototype.{ map, splice } - from FF48, Symbol.hasInstance - from FF50, DOMException.prototype[@@toStringTag] - from FF78, Iterator.prototype.{ drop, take } - from FF157
Fixed IE compat data: %TypedArray%.prototype.subarray marked as supported from IE11, the DOMException.stack patch is no longer required in IE10+
Fixed Safari compat data: %TypedArray%.prototype.set marked as supported from Safari 14.0
Chromium-based Edge and Opera no longer inherit EdgeHTML and Presto data where Chrome needs a later version: Array.prototype.{ reduce, reduceRight } are no longer marked as supported in Edge 79-82, Object.{ defineProperty, defineProperties } - in Opera 15-23, atob - in Opera 15-20
Fixed Opera 120 compat data mapping: RegExp.escape, SuppressedError, DisposableStack, AsyncDisposableStack and Iterator.prototype[@@dispose] are no longer marked as supported
Fixed JSON.stringify polyfill with an array replacer - keys order now follows the replacer, inherited and non-enumerable properties are no longer ignored, #1539
Make URL / URLSearchParams parsing a little more correct (char sets, percent coding, etc)
Ensure opaque paths always roundtrip in URL polyfill (still without adding to feature detection), whatwg/url#844
Fix URL#toJSON when URL#toString is reassigned after core-js is imported
Fixed possible crash on some keys in Symbol.for
Some get-iterator / get-iterator-method fixes
Fixed String.prototype.{ match, search } polyfills conversion order
Added missed MAX_SAFE_INTEGER excess check in Array.from and { Map, Object }.groupBy polyfills
Improved the way of inner iterators cleaning in iterator helpers
Improved accuracy of Math.{ asinh, cbrt, log1p } polyfills with big and small values
Improved performance of Uint8Array base64 methods
Improved performance of escape
Slight performance improvement for engines with native Array.prototype.fill on ArrayBuffer constructor and %TypedArray%.prototype.fill
Clarify supported Node versions in package.json of some missed packages (just to satisfy publint)
Compat data improvements:
Following tc39/ecma262/#3776, Iterator.prototype.{ drop, take } properly supported from:
Iterator.prototype.flatMap marked as supported from Safari 26.2 and Bun 1.2.21 because of a bug: throws on iterator without return method
Uint8Array.prototype.setFromHex marked as supported from V8 ~ Chromium 144 because of a bug: throws an error on length-tracking views over ResizableArrayBuffer
Fixed work of Object.groupBy and Iterator.zipKeyed together with Symbol polyfill - some cases of symbol keys on result null-prototype object were able to leak out to for-in
Always check regular expression flags by flags getter PR. Native methods are not fixed, only own implementation updated for:
RegExp.prototype[@@match]
RegExp.prototype[@@replace]
Improved handling of RegExp flags in polyfills of some methods in engines without proper support of RegExp.prototype.flags and without polyfill of this getter
Added feature detection for a WebKit bug that occurs when this is updated while Set.prototype.difference is being executed
Added feature detection for a WebKit bug that occurs when iterator record of a set-like object isn't called before cloning this in the following methods:
Set.prototype.symmetricDifference
Set.prototype.union
Added feature detection for a bug in V8 ~ Chromium < 126. Following methods should throw an error on invalid iterator:
Iterator.prototype.drop
Iterator.prototype.filter
Iterator.prototype.flatMap
Iterator.prototype.map
Added feature detection for a WebKit bug: incorrect exception thrown by Iterator.from when underlying iterator's return method is null
Added feature detection for a FF bug: incorrect exception thrown by Array.prototype.with when index coercion fails
Added feature detection for a WebKit bug: TypedArray.prototype.with should truncate negative fractional index to zero, but instead throws an error
Worked around a bug of many different tools (example) with incorrect transforming and breaking JS syntax on getting a method from a number literal
Fixed deoptimization of the Promise polyfill in the pure version
Added some missed dependencies to /iterator/flat-map entries
Set.prototype.difference marked as not supported in Safari and supported only from Bun 1.2.5 because of a bug
Set.prototype.{ symmetricDifference, union } marked as not supported in Safari and supported only from Bun 1.2.5 because of a bug
Iterator.from marked as not supported in Safari and supported only from Bun 1.2.5 because of a bug
Iterators closing on early errors in Iterator helpers marked as implemented from FF141
Array.prototype.with marked as supported only from FF140 because it throws an incorrect exception when index coercion fails
TypedArray.prototype.with marked as unsupported in Bun and Safari because it should truncate negative fractional index to zero, but instead throws an error
DisposableStack and AsyncDisposableStack marked as shipped in FF141 (SuppressedError has a bug)
AsyncDisposableStack bugs marked as fixed in Deno 2.3.2
Uses https instead of http in URL constructor feature detection to avoid extra notifications from some overly vigilant security scanners, #1345
Some minor optimizations
Updated browserslist in core-js-compat dependencies that fixes an upstream issue with incorrect interpretation of some browserslist queries, #1344, browserslist/829, browserslist/836
Since the Symbol.customMatcher well-known symbol from the pattern matching proposal is also used in the exactors proposal, added an entry also for this proposal
Since Iterator helpers proposal methods are still not disabled in Deno, the web compatibility issue why it was disabled in Chromium makes no sense for Deno and fixed in the spec, they marked as supported from Deno 1.37
Added Opera Android 80 and updated Opera Android 79 compat data mapping
Array.prototype.{ group, groupToMap } marked as no longer supported in WebKit runtimes because of the mentioned above web compat issue. For example, it's disabled from Bun 0.6.2
ArrayBuffer.prototype.transfer (only in runtimes with native structuredClone with ArrayBuffer transfer support)
ArrayBuffer.prototype.transferToFixedLength (only in runtimes with native structuredClone with ArrayBuffer transfer support)
In backwards, in runtimes with native ArrayBuffer.prototype.transfer, but without proper structuredClone, added ArrayBuffer transfer support to structuredClone polyfill
Improved some cases handling of array-replacer in JSON.stringify symbols handling fix
Fixed many other old JSON.{ parse, stringify } bugs (numbers instead of strings as keys in replacer, handling negative zeroes, spaces, some more handling symbols cases, etc.)
Fixed configurability and ToString conversion of some accessors
Added throwing proper errors on an incorrect context in some ArrayBuffer and DataView methods
Some minor DataView and %TypedArray% polyfills optimizations
Added proper error on the excess number of trailing = in the atob polyfill
Fixed theoretically possible ReDoS vulnerabilities in String.prototype.{ trim, trimEnd, trimRight }, parse(Int|Float), Number, atob, and URL polyfills in some ancient engines
Compat data improvements:
RegExp.prototype.flags marked as fixed from V8 ~ Chrome 111
Accepted only Set-like objects as an argument, not all iterables
Accepted only Sets as this, no @@species support, and other minor changes
Added /actual/ entries, unconditional forced replacement changed to feature detection
For avoiding breaking changes:
New versions of methods are implemented as new modules and available in new entries or entries where old versions of methods were not available before (like /actual/ namespace)
In entries where they were available before (like /full/ namespace), those methods are available with fallbacks to old semantics (in addition to Set-like, they accept iterable objects). This behavior will be removed from the next major release
According to the documentation, Oculus Browser was renamed to Meta Quest Browser, so oculus target was renamed to quest.
opera_mobile target name is confusing since it contains data for the Chromium-based Android version, but iOS Opera is Safari-based. So opera_mobile target was renamed to opera-android.
android target name is also confusing for someone - that means Android WebView, some think thinks that it's Chrome for Android, but they have some differences. For avoiding confusion, added chrome-android target.
For consistency with two previous cases, added firefox-android target.
For avoiding breaking changes, the oculus and opera_mobile fields are available in the compat data till the next major release.
Fixed the first version in the Chromium-based Edge compat data mapping
{ Map, WeakMap }.prototype.emplace became stricter by the spec draft
Smoothed behavior of some conflicting proposals
Removed some generic behavior (like @@species pattern) of some .prototype methods from the new collections methods proposal and the Array deduplication proposal that most likely will not be implemented since it contradicts the current TC39 policy
Added pure version of the Number constructor, #1154, #1155, thanks @trosos
Added set(Timeout|Interval|Immediate) extra arguments fix for Bun 0.3.0- (similarly to IE9-), bun/1633
Fixed handling of sparse arrays in structuredClone, #1156
Fixed a theoretically possible future conflict of polyfills definitions in the pure version
Disabled forced replacing of Array.fromAsync since it's on Stage 3
Avoiding a check of the target in the internal function-uncurry-this helper where it's not required - minor optimization and preventing problems in some broken environments, a workaround of #1141
Added a workaround of a Nashorn bug with Function.prototype.{ call, apply, bind } on string methods, #1128
Updated lists of [Serializable] and [Transferable] objects in the structuredClone polyfill. Mainly, for better error messages if polyfilling of cloning such types is impossible
Added some fixes and workarounds of FF30- typed arrays bug that does not properly convert objects to numbers
Added sideEffects field to core-js-purepackage.json for better tree shaking, #1117
Dropped semver dependency from core-js-compat
semver package (ironically) added a breaking change and dropped NodeJS 8 support in the minor 7.1 version, after that semver in core-js-compat was pinned to 7.0 since for avoiding breaking changes it should support NodeJS 8. However, since core-js-compat is usually used with other packages that use semver dependency, it causes multiple duplication of semver in dependencies. So I decided to remove semver dependency and replace it with a couple of simple helpers.
Added Bun 0.1.6-0.1.11 compat data
Added Deno 1.25 compat data mapping
Updated Electron 21 compat data mapping
Some stylistic changes, minor fixes, and improvements
It's optional, legacy, and in some cases (mainly because of developers' mistakes) can cause problems, but some libraries depend on it, and most code can't work without the proper libraries' ecosystem
Only for modern engines where this feature is missed (like Deno), it's not installed in IE10- since here we have no proper way setting of the prototype
Without fixes of early implementations where it's not an accessor since those fixes are impossible
Avoiding unnecessary promise creation and validation result in %WrapForValid(Async)IteratorPrototype%.return, proposal-iterator-helpers/215
Fixed omitting the result of proxying .return in %IteratorHelperPrototype%.return, #1116
Fixed the order creation of properties of iteration result object of some iterators (value should be created before done)
Fixed some cases of Safari < 13 bug - silent on non-writable array .length setting
Fixed ArrayBuffer.length in V8 ~ Chrome 27-
Relaxed condition of re-usage native WeakMap for internal states with multiple core-js copies
Availability cloning of FileList in the structuredClone polyfill extended to some more old engines versions
Some stylistic changes and minor fixes
Throwing a TypeError in core-js-compat / core-js-builder in case of passing invalid module names / filters for avoiding unexpected result, related to #1115
Added missed NodeJS 13.2 to esmodulescore-js-compat / core-js-builder target
Added a workaround of the Bun ~ 0.1.1 bug that define some globals with incorrect property descriptors and that causes a crash of core-js
Added a fix of the FF103+ structuredClone bugs (1774866 (fixed in FF104) and 1777321 (still not fixed)) that now can clone errors, but .stack of the clone is an empty string
Added Array.prototype.push polyfill with some fixes for modern engines
Added Array.prototype.unshift polyfill with some fixes for modern engines
Fixed a bug in the order of getting flags in RegExp.prototype.flags in the actual version of V8
Fixed property descriptors of some Math and Number constants
Added a workaround of V8 ArrayBufferDetaching protector cell invalidation and performance degradation on structuredClone feature detection, one more case of #679
Added detection of NodeJS bug in structuredClone that can not clone DOMException (just in case for future versions that will fix other issues)
Compat data:
Added NodeJS 18.3 compat data mapping
Added and fixed Deno 1.22 and 1.21 compat data mapping
Fixed possible multiple call of ToBigInt / ToNumber conversion of the argument passed to %TypedArray%.prototype.fill in V8 ~ Chrome < 59, Safari < 14.1, FF < 55, Edge <=18
Fixed some cases of DeletePropertyOrThrow in IE9-
Fixed the kind of error (TypeError instead of Error) on incorrect exec result in RegExp.prototype.test polyfill
Fixed dependencies of { actual, full, features }/typed-array/at entries
Disabled forced replacement and added /actual/ entry points for methods from this proposal
Array.prototype.toSpliced throws a TypeError instead of RangeError if the result length is more than MAX_SAFE_INTEGER, proposal-change-array-by-copy/70
Added some more atob / btoa fixes:
NodeJS <17.9 atob does not ignore spaces, node/42530
Actual NodeJS atob does not validate encoding, node/42646
FF26- implementation does not properly convert argument to string
IE / Edge <16 implementation have wrong arity
Added /full/ namespace as the replacement for /features/ since it's more descriptive in context of the rest namespaces (/es/ ⊆ /stable/ ⊆ /actual/ ⊆ /full/)
Avoided propagation of removed parts of proposals to upper stages. For example, %TypedArray%.prototype.groupBy was removed from the Array grouping proposal a long time ago. We can't completely remove this method since it's a breaking change. But this proposal has been promoted to stage 3 - so the proposal should be promoted without this method, this method should not be available in /actual/ entries - but it should be available in early-stage entries to avoid breakage.
Significant internal refactoring and splitting of modules (but without exposing to public API since it will be a breaking change - it will be exposed in the next major version)
Bug fixes:
Fixed work of non-standard V8 Error features with wrapped Error constructors, #1061
null and undefined allowed as the second argument of structuredClone, #1056
Tooling:
Stabilized proposals are filtered out from the core-js-compat -> core-js-builder -> core-js-bundle output. That mean that if the output contains, for example, es.object.has-own, the legacy reference to it, esnext.object.has-own, no longer added.
Added support of entry points, modules, regexes, and arrays of them to those filters
Missed targets option of core-js-compat means that the targets filter just will not be applied, so the result will contain modules required for all possible engines
Compat data:
.stack property on DOMException marked as supported from Deno 1.15
Added Deno 1.21 compat data mapping
Added Electron 19.0 and updated 18.0 compat data mapping
Fixed some possible problems related to possible extension of %IteratorPrototype% and %AsyncIteratorPrototype% in the future
Fixed DOMTokenList.prototype.{ forEach, @@iterator, keys, values, entries } in old WebKit versions where element.classList is not an instance of global DOMTokenList
Exposed by default the stable version of String.prototype.at. It was not exposed because of the conflict with the alternative obsolete proposal (that will be completely removed in the next major version). For the backward compatibility, in the case of loading this proposal, it will be overwritten.
AsyncFromSyncIterator made stricter, related mainly to AsyncIterator.from and AsyncIterator.prototype.flatMap
Handling of optional .next arguments in (Async)Iterator methods is aligned with the current spec draft (mainly - ignoring the first passed to .next argument in built-in generators)
Behavior of .next, .return, .throw methods on AsyncIterator helpers proxy iterators aligned with the current spec draft (built-in async generators) (mainly - some early errors moved to returned promises)
Forced replacement of Array#{ reduce, reduceRight } in Chrome 80-82 because of a bug, #766
Following the changes in the upsert proposal, { Map, WeakMap }#emplace replace { Map, WeakMap }#upsert, these obsolete methods will be removed in the next major release
Fixed early implementations of Array#{ every, forEach, includes, indexOf, lastIndexOf, reduce, reduceRight, slice, some, splice } for the usage of ToLength
Added RegExp#exec dependency to methods which depends on the correctness of logic of this method (3.6.0-3.6.1 issue), #741
Added a workaround of V8 deoptimization which causes serious performance degradation (~20x in my tests) of some RegExp-related methods like String#split, #306
Added a workaround of V8 deoptimization which causes serious performance degradation (up to 100x in my tests) of Array#splice and slightly Array#{ filter, map }, #677
Fixed work of fetch with polyfilled URLSearchParams, #674
Fixed an edge case of String#replaceAll with an empty search value
Added compat data for Chrome 80
package-lock.json no longer generated in libraries
String#{ matchAll, replaceAll } throws an error on non-global regex argument per the decision from TC39 meetings (+ this PR). It's a breaking change, but since it's a breaking change in the ES spec, it's added at the minor release
Added a fix for Math.hypot V8 7.7 bug, since it's still not stable without adding results to core-js-compat
Added a workaround for APIs where not possible to replace broken native Promise, #579 - added .finally and patched .then to / on native Promise prototype
Correct Typed Arrays prototypes chain, related #378.
Make the internal state of polyfilled features completely unobservable, #146.
Add validation of receiver's internal class to missed non-generic methods.
Fix descriptors of global properties.
In the version without global pollution, if Object#toString does not support @@toStringTag, add to wrapped prototypes own toString method with @@toStringTag logic, see #199.
Update standard features and proposals:
asap (old stage 0 proposal) replaced by queueMicrotask (a part of HTML spec)
Move core-js/library to separate core-js-pure package.
Because of removing all non-standard features, we no longer need core-js/shim entry point, replace it just with core-js.
Move all features from ES5, ES2015, ES2016, ES2017, ES2018 and ES2019 to one namespace for stable ES - it's available as core-js/es, all those features in modules folder has es. prefix.
Change prefix for ES proposals from es7. to esnext., they no longer available in core-js/es7, use core-js/stage/* instead of that.
Rename core-js(/library)/fn to core-js(-pure)/features for improve readability.
Allow more granular inclusion of features from /es/ path (for example, core-js/es/array/from).
Add /stable/ entry points as an equal of /features/ for stable features, without proposals.
Add /proposals/ entry points for allow include all features from one proposal (for example, core-js/proposals/reflect-metadata).
Add /es|stable|features/instance/ entry points for getting polyfill of the related method for passed instance (could be used in cases like babel-runtime).
Split typed arrays polyfills. Now you can, for example, load only required method (for example, core-js/es/typed-array/from).
Extract well-known symbols definition from es.symbol module for loading only required features, for example, in MS Edge.
Rename web.dom namespace to web.dom-collections.
Rename es6.regexp.{match, replace, search, split} -> es.string.{match, replace, search, split} - mainly it's fixes / adding support of well-known symbols to string methods, only in second place adding related methods to regexp prototype.
Relax /modules/ directory by moving internal modules to /internals/ directory.
core object no longer available in the global version, entry points which previously returned it now returns globalThis object. Also, don't set global core property.
Add some missing entry points.
Tools, tests, code quality:
Added core-js-compat package with:
Data about the necessity of core-js modules and API for getting a list of required core-js modules by browserslist query, #466.
Data which modules load by each entry point (mainly useful for tools like @babel/preset-env).
Data which modules added in minor versions (mainly useful for tools like @babel/preset-env).
core-js-builder package:
Added targets option with browserslist query.
Removed an option for generation bundle of a version without global namespace pollution - now it's an odd use case.
Removed UMD wrapper from a generated code of bundles - we don't need it for a global polyfill.
Getting rid of LiveScript, usage another language in JS standard library looks strange and impedes usage of tools like ESLint:
Tests are rewritten to JS.
Scripts are rewritten to JS.
Babel with minimalistic config (which should work anywhere) used on tests.
Temporarily removed length validation from Uint8Array constructor wrapper. Reason - bug in ws module (-> socket.io) which passes to Buffer constructor -> Uint8Array float and uses the V8 bug for conversion to int (by the spec should be thrown an error). It creates problems for many people. I hope, it will be returned after fixing this bug in V8.
Removed non-standard methods Object#[_] and Function#only - they solves syntax problems, but now in compilers available arrows and in near future will be availableavailablebind syntax