npm / core-js
core-js
What changed in core-js 2 to 3, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
39 breaking1 security81 new APIs and options6 performance7 behavior and defaults64 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initcore-js 3170 changes
Breaking changes 29
Throws a TypeError instead of a RangeError when chunkSize is a non-integer number.
Throws a RangeError for a finite unsafe integer limit.
Throws a TypeError instead of a RangeError when windowSize is a non-integer number.
Fixes array-replacer behavior: key order follows the replacer, and inherited and non-enumerable properties are no longer ignored.
The pure version now forces replacement to ensure results are properly wrapped Iterator instances; the polyfill also errors early when given a primitive as an iterator.
The polyfill now throws for unterminated object and array literals and numbers with a decimal point but no fraction.
The polyfill now throws when called with only one argument.
Renames Array#flatten to Array#flat and updates the related Array#flatMap feature.
The core object is no longer available in the global version; former core-returning entry points return globalThis, and no global core property is set.
Replaces the core-js/shim entry point with core-js.
Removes bundling logic from core-js and leaves it in the core-js-builder package.
Moves the single pair of global bundles with all polyfills into the core-js-bundle package.
Removes deprecated array entry points for pop, push, reverse, shift, and unshift.
Extracts the version without global namespace pollution into a separate package, replacing core-js/library.
Renames the core-js(/library)/fn path to core-js(-pure)/features.
Use the stage entry points instead of the removed core-js/es7 proposal path.
Removes the withdrawn Error.isError feature.
Removes global, replaced by globalThis.
Renames the global proposal from global to globalThis.
Removes the rejected Map#toJSON feature.
Removes the remaining non-standard features, including Dict, Object helpers, Function#part, Number#@@iterator, HTML string helpers, and delay.
Replaces the old asap proposal with queueMicrotask.
Removes Reflect.enumerate, which was removed from the spec.
Removes the rejected RegExp.escape feature.
Removes the rejected Set#toJSON feature.
Stops treating Mongolian vowel separator U+180E as whitespace for trimming methods.
Removes System.global, replaced by globalThis.
Polyfilled Promises now trigger unhandled rejection events instead of relying only on global handlers.
Renames the web.dom namespace to web.dom-collections.
Security 1
Fixed exposure of buffer mutations in the polyfill.
New APIs and options 68
Adds the Iterator.prototype.chunks built-in from the iterator chunking proposal.
Adds the Iterator.prototype.includes built-in from the stage 3 proposal.
Adds the Iterator.prototype.join built-in from the stage 3 proposal.
Adds the Iterator.prototype.windows built-in from the iterator chunking proposal.
Adds the Iterator.zip built-in from the joint iteration proposal.
Adds the Iterator.zipKeyed built-in from the joint iteration proposal.
Adds the Promise.allKeyed built-in from the Await dictionary of Promises proposal.
Adds the Promise.allSettledKeyed built-in from the Await dictionary of Promises proposal.
Adds es namespace modules and /es/ and /stable/ namespace entries for the Map upsert proposal.
Added JSON.parse support for the source text access proposal.
Adds a proposed way to get the last index from an Array.
Adds a proposed way to get the last item from an Array.
Adds the proposed compositeKey method.
Adds the proposed compositeSymbol method.
Adds a package with module-necessity data and APIs for selecting required modules from a browserslist query, plus entry-point and minor-version module data.
Provides a unified namespace for stable ES5 through ES2019 features.
Allows more granular feature inclusion through the /es/ path.
Adds instance entry points that provide the related method's polyfill for a passed instance.
Adds entry points for including all features from one proposal.
Adds stable-feature entry points without proposals.
Adds .forEach to iterable DOM collections.
Adds the proposed Map deleteAll method.
Adds the proposed Map every method.
Adds the proposed Map filter method.
Adds the proposed Map find method.
Adds the proposed Map findKey method.
Adds the proposed Map includes method.
Adds the proposed Map keyOf method.
Adds the proposed Map mapKeys method.
Adds the proposed Map mapValues method.
Adds the proposed Map merge method.
Adds the proposed Map reduce method.
Adds the proposed Map some method.
Adds the proposed Map update method.
Adds the proposed Map.groupBy method.
Adds the proposed Map.keyBy method.
Adds the proposed seeded pseudo-random number generator.
Adds the proposed Number.fromString method.
Adds the ECMAScript 2019 Object.fromEntries feature.
Adds the proposed Promise.allSettled method.
Adds Promise.any with AggregateError.
Adds the proposed Set addAll method.
Adds the proposed Set deleteAll method.
Adds the proposed Set every method.
Adds the proposed Set filter method.
Adds the proposed Set find method.
Adds the proposed Set intersection method.
Adds the proposed Set disjointness method.
Adds the proposed Set subset method.
Adds the proposed Set superset method.
Adds the proposed Set join method.
Adds the proposed Set map method.
Adds the proposed Set reduce method.
Adds the proposed Set some method.
Adds the proposed Set symmetric difference method.
Adds the proposed Set union method.
Adds the proposed String codePoints method.
Adds the proposed String replaceAll method.
Adds the Symbol description feature.
Adds Symbol.dispose for the using statement proposal.
Adds Symbol.patternMatch for the pattern matching proposal.
Adds a browserslist query targets option to core-js-builder.
Splits typed array polyfills so individual methods can be loaded independently.
Adds URL and its listed properties and methods from the URL standard.
Adds URLSearchParams and its listed methods and iterators from the URL standard.
Adds the proposed WeakMap deleteAll method.
Adds the proposed WeakSet addAll method.
Adds the proposed WeakSet deleteAll method.
Performance 4
Improves performance of escape.
Improves performance of Uint8Array base64 methods.
The polyfill has improved performance.
Fixed repeated ToPropertyKey conversion in the polyfill.
Behavior and default changes 7
Compat data now marks the method as unsupported in modern Safari because of a browser bug.
Methods from the Map upsert proposal have minor performance optimizations; pure-version methods are now generic and work with polyfilled and native collections.
Adds the Map upsert method as a stable ES feature.
Adds the Map upsert method as a stable ES feature.
Adds the WeakMap upsert method as a stable ES feature.
Adds the WeakMap upsert method as a stable ES feature.
Marks the listed ES2016–ES2019 features as stable.
Fixes and other changes 61
Adds missed detection of imprecise native implementations in V8 < 5.4 and Rhino.
Adds missed detection of imprecise native implementations in FF < 48 and engines that use glibc cbrt.
Adds the missed MAX_SAFE_INTEGER excess check to the polyfill.
Ensures opaque paths always roundtrip in the URL polyfill.
Uses PromiseResolve semantics.
Fixes the conversion order in the polyfill.
Fixes a possible crash on some keys.
Makes URL parsing more correct, including character sets and percent coding.
Fixes URL#toJSON when URL#toString is reassigned after core-js is imported.
Makes URLSearchParams parsing more correct, including character sets and percent coding.
Fixed iterator closing when array property creation fails.
Fixed argument validation order and validation of counters at MAX_SAFE_INTEGER.
Fixed a possible error when the polyfill receives a frozen array.
Fixed argument validation order.
Fixed behavior with sparse arrays and fromIndex, including a modern Safari bug.
Fixed resizable ArrayBuffer transfer when newByteLength exceeds the original maxByteLength.
Fixed counter behavior and iterator closing order, including closing and return-result validation in flatMap, map, and take.
The obsolete blacklist option is no longer ignored; it will be removed only in the next major release.
Compat data was updated for Math.sumPrecise, Iterator.concat, parseInt, parseFloat, Deno, Electron, Opera for Android, and Oculus Quest Browser.
Fixed the esmodules: intersect option and added a missing reactnative alias in the types.
The constructor polyfill now errors when passed an ArrayBuffer and a negative length.
Fixed the polyfill for values in the (0, 1) range.
Fixed NaN handling in the polyfill.
Fixed some character casing cases in the polyfill.
Fixed another case of a V8/Chromium bug in the polyfill.
Fixed string iterable handling, iterator closing, and validation of iterator next results; the pure version forces replacement to return properly wrapped Iterator instances.
Fixed string iterable handling, iterator closing, and validation of iterator next results; the pure version forces replacement to return properly wrapped Iterator instances.
Improves polyfill accuracy with big and small values.
The polyfill is more accurate with big and small values.
Fixed handling of ending zeroes in the fraction part and added extra input string validation.
The polyfill is more accurate with big and small values.
Fixed possible loss of symbol enumerability and the return value in the Symbol polyfill.
Fixed semantics for multiple subscriptions in the obsolete Observable proposal polyfill.
Fixed argument validation order, which is observable in the error message.
The polyfill now throws for malformed descriptors.
Fixed repeated ToPropertyKey conversion, descriptor handling, and non-extensible receiver cases.
Fixed named backreferences and interactions among groups, dotAll, sticky, multiline, global, and Unicode modes; polyfills gain s, d, and v flag support where modern-engine bugs occur.
Updated the polyfill to the final spec for a case where this is updated.
Fixed iterator closing in the polyfill.
Fixed missing errors for \u{} and some hex escaping at the end of strings.
Fixed argument validation order in the polyfill.
Fixed behavior with a counter exceeding 2 ** 32.
Fixed the sticky-mode polyfill.
Fixed argument validation order in the polyfill.
Fixed some cases of Infinity handling.
The polyfill now errors when multiple objects are transferred and some are non-transferable.
The polyfill wraps Symbol.for to correctly handle empty string descriptions.
Fixed constructor errors for an ArrayBuffer with negative length, some @@toStringTag cases, and some ToUint8Clamp conversions.
Fixed argument validation order.
Fixed parsing and serialization across non-special URLs, hosts, file URLs, percent encoding, protocol changes, and the origin getter for blob URLs.
Fixed deletion with duplicate key-value pairs and cases where the second argument could remove unnecessary entries.
Fixed handling of invalid UTF-8 code points, continuation bytes, and incomplete sequences.
Fixed a false positive in pure-version validation.
Adds workarounds for Safari before 13 silently ignoring writes to non-writable array length.
Uses CreateDataProperty and CreateDataPropertyOrThrow in previously missed cases.
Fixes and optimizes the RegExp constructor polyfill for NCG and dotAll.
Fixed increasing .size in the URLSearchParams.prototype.append polyfill in IE8-.
Adds support for @@isConcatSpreadable to Array#concat.
Adds @@species support to Array concat, filter, map, slice, and splice.
Wraps fetch to work correctly with a polyfilled Promise and prevent related problems.
Adds direct .exec calling to RegExp replacement, split, match, and search operations, with fixes to RegExp#exec.
core-js 228 changes
Breaking changes 10
Removed Mozilla Array generics.
Removed the core.log module.
Moved custom builds from external scripts to a separate package to prevent dependency problems.
Map#forEach is non-generic.
Promise.all no longer uses @@species.
Promise.race no longer uses @@species.
Moved RegExp.escape from the es7 namespace to the non-standard core namespace.
Set#forEach is non-generic.
Renamed String#padRight to String#padEnd.
Renamed String#padLeft to String#padStart.
New APIs and options 13
Added the annex B HTML methods from the specification.
Added CommonJS entry points for virtual methods and stage proposals.
Added keys, values, entries, and @@iterator methods to NodeList, DOMTokenList, MediaList, StyleSheetList, and CSSRuleList.
Added the Error.isError proposal.
Added Math.iaddh as part of a proposal.
Added Math.imulh as part of a proposal.
Added Math.isubh as part of a proposal.
Added Math.umulh as part of a proposal.
The Promise polyfill added basic support for the rejectionHandled event and onrejectionhandled handler.
Added String#trimEnd as an alias for String#trimRight.
Added String#trimStart as an alias for String#trimLeft.
Added the System.global proposal.
Added implementations and fixes for ArrayBuffer, DataView, typed-array constructors, and %TypedArray% methods.
Performance 2
Collection polyfills became O(1) and prevent possible leaks with frozen keys; observable state object keys were corrected.
Promise received performance optimisations.
Fixes and other changes 3
Added a fix for the Array iterator in Firefox 27.
Fixed Date#toString so new Date(NaN).toString() returns 'Invalid Date'.
Added a fix for SameValueZero in V8 collections in Chromium 39–42.