zloirock/core-js
 Watch   
 Star   
 Fork   
21 days ago
core-js

4.0.0-alpha.1 - 2026.03.22

Early release for testing some concepts.

NOT FOR USAGE IN REAL PROJECTS.

See more info here: https://github.com/zloirock/core-js/pull/1310

27 days ago
core-js

3.49.0 - 2026.03.16

  • Changes v3.48.0...v3.49.0 (373 commits)
  • Iterator.range updated following the actual spec version
    • Throw a RangeError on NaN start / end / step
    • Allow null as optionOrStep
  • Improved accuracy of Math.{ asinh, atanh } polyfills with big and small values
  • Improved accuracy of Number.prototype.toExponential polyfills with big and small values
  • Improved performance of atob, btoa, Uint8Array.fromHex, Uint8Array.prototype.setFromHex, and Uint8Array.prototype.toHex, #1503, #1464, #1510, thanks @johnzhou721
  • Minor performance optimization polyfills of methods from Map upsert proposal
  • Polyfills of methods from Map upsert proposal from the pure version made generic to make it work with polyfilled and native collections
  • Wrap Symbol.for in Symbol.prototype.description polyfill for correct handling of empty string descriptions
  • Fixed a modern Safari bug in Array.prototype.includes with sparse arrays and fromIndex
  • Fixed one more case (Iterator.prototype.take) of a V8 ~ Chromium < 126 bug
  • Forced replacement of Iterator.{ concat, zip, zipKeyed } in the pure version for ensuring proper wrapped Iterator instances as the result
  • Fixed proxying .return() on exhausted iterator from some methods of iterator helpers polyfill to the underlying iterator
  • Fixed double .return() calling in case of throwing error in this method in the internal iterate helper that affected some polyfills
  • Fixed closing iterator on IteratorValue errors in the internal iterate helper that affected some polyfills
  • Fixed iterator closing in Array.from polyfill on failure to create array property
  • Fixed order of arguments validation in Array.fromAsync polyfill
  • Fixed a lack of counter validation on MAX_SAFE_INTEGER in Array.fromAsync polyfill
  • Fixed order of arguments validation in Array.prototype.flat polyfill
  • Fixed handling strings as iterables in Iterator.{ zip, zipKeyed } polyfills
  • Fixed some cases of iterators closing in Iterator.{ zip, zipKeyed } polyfills
  • Fixed validation of iterators .next() results an objects in Iterator.{ zip, zipKeyed } polyfills
  • Fixed a lack of early error in Iterator.concat polyfill on primitive as an iterator
  • Fixed buffer mutation exposure in Iterator.prototype.windows polyfill
  • Fixed iterator closing in Set.prototype.{ isDisjointFrom, isSupersetOf } polyfill
  • Fixed (updated following the final spec) one more case Set.prototype.difference polyfill with updating this
  • Fixed DataView.prototype.setFloat16 polyfill in (0, 1) range
  • Fixed order of arguments validation in String.prototype.{ padStart, padEnd } polyfills
  • Fixed order of arguments validation in String.prototype.{ startsWith, endsWith } polyfills
  • Fixed some cases of Infinity handling in String.prototype.substr polyfill
  • Fixed String.prototype.repeat polyfill with a counter exceeding 2 ** 32
  • Fixed some cases of chars case in escape polyfill
  • Fixed named backreferences in RegExp NCG polyfill
  • Fixed some cases of RegExp NCG polyfill in combination with other types of groups
  • Fixed some cases of RegExp NCG polyfill in combination with dotAll
  • Fixed String.prototype.replace with sticky polyfill, #810, #1514
  • Fixed RegExp sticky polyfill with alternation
  • Fixed handling of some line terminators in case of multiline + sticky mode in RegExp polyfill
  • Fixed .input slicing on result object with RegExp sticky mode polyfill
  • Fixed handling of empty groups with global and unicode modes in polyfills
  • Fixed URLSearchParam.prototype.delete polyfill with duplicate key-value pairs
  • Fixed possible removal of unnecessary entries in URLSearchParam.prototype.delete polyfill with second argument
  • Fixed an error in some cases of non-special URLs without a path in the URL polyfill
  • Fixed some percent encode cases / character sets in the URL polyfill
  • Fixed parsing of non-IPv4 hosts ends in a number in the URL polyfill
  • Fixed some cases of '' and null host handling in the URL polyfill
  • Fixed host parsing with hostname = host:port in the URL polyfill
  • Fixed host inheritance in some cases of file scheme in the URL polyfill
  • Fixed block of protocol change for file with empty host in the URL polyfill
  • Fixed invalid code points handling in UTF-8 decode in the URLSearchParams polyfill
  • Fixed some cases of serialization in URL polyfill (/. prefix for non-special URLs with null host and path starting with empty segment)
  • Fixed URL polyfill .origin getter with blob scheme
  • Fixed a lack of error in URLSearchParams.prototype.set polyfill on calling only with 1 argument
  • Fixed handling invalid UTF-8 continuation bytes in URLSearchParams polyfill
  • Fixed incomplete sequences with out-of-range continuation bytes handling in URLSearchParams polyfill
  • Fixed allowing unexpected symbols in scheme in the URL polyfill
  • Fixed repeated ToPropertyKey calling in Reflect.{ get, set, deleteProperty } polyfills
  • Fixed Reflect.set polyfill with some descriptors cases
  • Fixed Reflect.set polyfill with some non-extensible receiver cases
  • Fixed the order of Reflect.construct polyfill arguments validation (observable only in the error message)
  • Fixed a lack of error in Reflect.defineProperty polyfill with malformed descriptor
  • Fixed a lack of error in JSON.parse polyfill on unterminated object and array literals
  • Fixed a lack of error in JSON.parse polyfill on numbers with ., but without a fraction part
  • Fixed a lack of error on \u{} in String.dedent polyfill
  • Fixed some cases of hex escaping in the end of string in String.dedent polyfill
  • Fixed %AsyncFromSyncIteratorPrototype% to make it a little stricter
  • Fixed counter in some cases of some AsyncIterator methods
  • Fixed order of async iterators closing
  • Fixed iterator closing in AsyncIterator.prototype.flatMap polyfill
  • Fixed iterator closing in AsyncIterator.prototype.map polyfill on error in underlying iterator .next()
  • Fixed iterator closing in AsyncIterator.prototype.take polyfill with return: null
  • Fixed validation .return() result as object in AsyncIterator.prototype.take polyfill
  • Fixed a lack of error in structuredClone polyfill on attempt to transfer multiple objects, some of which are non-transferable
  • Fixed resizable ArrayBuffer transferring where newByteLength exceeds the original maxByteLength
  • Fixed possible loss of symbol enumerability in Object.defineProperty in Symbol polyfill
  • Fixed return value of Object.defineProperty in Symbol polyfill in Android ~ 2
  • Fixed order of %TypedArray%.from arguments validation
  • Fixed a lack of error on passing an ArrayBuffer and a negative length to the %TypedArray% and DataView constructors polyfills
  • Fixed some cases of @@toStringTag on %TypedArray% polyfill
  • Fixed some cases of ToUint8Clamp conversion
  • Fixed NaN handling in Date.prototype.setYear polyfill
  • Fixed false positive on a WeakMap validation in the pure version
  • Fixed some minor { Map, Set }.prototype.forEach moments in the pure version
  • Fixed possible error in Array.isTemplateObject polyfill on frozen array
  • Fixed semantics of Observable.from with multiple subscriptions of the obsolete ECMAScript Observable proposal polyfill
  • Fixed handling of ending zeroes in the fraction part in Number.fromString polyfill
  • Fixed esmodules: intersect option of core-js-compat
  • Fixed a lack of reactnative alias in core-js-compat types
  • Fixed a minor logical bug in the debugging output of core-js-builder
  • Fixed ignorance of the obsolete blacklist option of core-js-builder - it should be removed only in the next major release
  • In case of bugs in String.prototype.{ match, matchAll, replace, split } in modern engines, add s, d and v flag support to polyfills of those methods
  • Just in case, added an extra input string validation to the polyfill of obsolete Number.fromString proposals
  • Simplified iOS detection
  • Many minor stylistic fixes and optimizations
  • Compat data improvements:
2026-01-22 01:53:34
core-js

3.48.0 - 2026.01.21

  • Changes v3.47.0...v3.48.0 (126 commits)
  • Map upsert proposal:
    • Built-ins:
      • Map.prototype.getOrInsert
      • Map.prototype.getOrInsertComputed
      • WeakMap.prototype.getOrInsert
      • WeakMap.prototype.getOrInsertComputed
    • Moved to stable ES, January 2026 TC39 meeting
    • Added es. namespace modules, /es/ and /stable/ namespaces entries
  • Use CreateDataProperty / CreateDataPropertyOrThrow in some missed cases, #1497
  • Minor fix / optimization in the RegExp constructor (NCG and dotAll) polyfill
  • Added some more workarounds for a Safari < 13 bug with silent ignore of non-writable array .length
  • Added detection of a Webkit bug: Iterator.prototype.flatMap throws on iterator without return method
  • Added detection of a V8 ~ Chromium < 144 bug: Uint8Array.prototype.setFromHex throws an error on length-tracking views over ResizableArrayBuffer
  • Compat data improvements:
2025-11-18 18:13:23
core-js

3.47.0 - 2025.11.18

2025-10-10 02:46:57
core-js

3.46.0 - 2025.10.09

Welcome to our new website, core-js.io, where our documentation is moving!

In addition, you can now follow the project's news in X.


2025-08-21 02:00:34
core-js

3.45.1 - 2025.08.20

  • Changes v3.45.0...v3.45.1 (30 commits)
  • Fixed a conflict of native methods from Map upsert proposal with polyfilled methods in the pure version
  • Added bugs fields to package.json of all packages
  • Compat data improvements:
    • Map upsert proposal features marked as shipped from Bun 1.2.20
    • Added Samsung Internet 29 compat data mapping
    • Added Electron 39 compat data mapping
2025-08-05 02:09:41
core-js

3.45.0 - 2025.08.04

2025-07-07 21:42:38
core-js

3.44.0 - 2025.07.07

2025-06-09 14:42:36
core-js

3.43.0 - 2025.06.09

  • Changes v3.42.0...v3.43.0 (139 commits)
  • Explicit Resource Management proposals:
    • Built-ins:
      • Symbol.dispose
      • Symbol.asyncDispose
      • SuppressedError
      • DisposableStack
        • DisposableStack.prototype.dispose
        • DisposableStack.prototype.use
        • DisposableStack.prototype.adopt
        • DisposableStack.prototype.defer
        • DisposableStack.prototype.move
        • DisposableStack.prototype[@@dispose]
      • AsyncDisposableStack
        • AsyncDisposableStack.prototype.disposeAsync
        • AsyncDisposableStack.prototype.use
        • AsyncDisposableStack.prototype.adopt
        • AsyncDisposableStack.prototype.defer
        • AsyncDisposableStack.prototype.move
        • AsyncDisposableStack.prototype[@@asyncDispose]
      • Iterator.prototype[@@dispose]
      • AsyncIterator.prototype[@@asyncDispose]
    • Moved to stable ES, May 2025 TC39 meeting
    • Added es. namespace module, /es/ and /stable/ namespaces entries
  • Array.fromAsync proposal:
    • Built-ins:
      • Array.fromAsync
    • Moved to stable ES, May 2025 TC39 meeting
    • Added es. namespace module, /es/ and /stable/ namespaces entries
  • Error.isError proposal:
    • Built-ins:
      • Error.isError
    • Moved to stable ES, May 2025 TC39 meeting
    • Added es. namespace module, /es/ and /stable/ namespaces entries
  • Added Joint iteration stage 2.7 proposal:
    • Added built-ins:
      • Iterator.zip
      • Iterator.zipKeyed
  • Added Iterator chunking stage 2 proposal:
    • Added built-ins:
      • Iterator.prototype.chunks
      • Iterator.prototype.windows
  • Number.prototype.clamp proposal:
  • 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
  • Some other minor fixes and improvements
  • Compat data improvements:
    • Added Deno 2.3 and Deno 2.3.2 compat data mapping
    • Updated Electron 37 compat data mapping
    • Added Opera Android 90 compat data mapping
    • Error.isError marked not supported in Node because of a bug
    • 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
    • SuppressedError bugs (extra arguments support and arity) marked as fixed in Bun 1.2.15
2025-04-30 01:56:32
core-js

3.42.0 - 2025.04.30

  • Changes v3.41.0...v3.42.0 (142 commits)
  • Map upsert proposal:
    • Moved to stage 2.7, April 2025 TC39 meeting
    • Validation order of WeakMap.prototype.getOrInsertComputed updated following tc39/proposal-upsert#79
    • Built-ins:
      • Map.prototype.getOrInsert
      • Map.prototype.getOrInsertComputed
      • WeakMap.prototype.getOrInsert
      • WeakMap.prototype.getOrInsertComputed
  • Don't call well-known Symbol methods for RegExp on primitive values following tc39/ecma262#3009:
    • For avoid performance regression, temporarily, only in own core-js implementations
    • Built-ins:
      • String.prototype.matchAll
      • String.prototype.match
      • String.prototype.replaceAll
      • String.prototype.replace
      • String.prototype.search
      • String.prototype.split
  • Added workaround for the Uint8Array.prototype.setFromBase64 bug in some of Linux builds of WebKit
  • Implemented early-error iterator closing following tc39/ecma262#3467, including fix of a WebKit bug, in the following methods:
    • Iterator.prototype.drop
    • Iterator.prototype.every
    • Iterator.prototype.filter
    • Iterator.prototype.find
    • Iterator.prototype.flatMap
    • Iterator.prototype.forEach
    • Iterator.prototype.map
    • Iterator.prototype.reduce
    • Iterator.prototype.some
    • Iterator.prototype.take
  • Fixed missing forced replacement of AsyncIterator helpers
  • Added closing of sync iterator when async wrapper yields a rejection following tc39/ecma262#2600. Affected methods:
  • Added detection for throwing on undefined initial parameter in Iterator.prototype.reduce (see WebKit bug)
  • core-js-compat and core-js-builder API:
    • Added 'intersect' support for targets.esmodules (Babel 7 behavior)
    • Fixed handling of targets.esmodules: true (Babel 7 behavior)
  • Compat data improvements: