Skip to content

Update dependency core-js to v3.31.0

RenovateBot requested to merge renovate-core-js-3.x into main

This MR contains the following updates:

Package Change Age Adoption Passing Confidence
core-js 3.20.3 -> 3.31.0 age adoption passing confidence

Release Notes

zloirock/core-js

v3.31.0

Compare Source

v3.30.2

Compare Source

  • Added a fix for a NodeJS 20.0.0 bug with cloning File via structuredClone
  • Added protection from Terser unsafe String optimization, #​1242
  • Added a workaround for getting proper global object in Figma plugins, #​1231
  • Compat data improvements:

v3.30.1

Compare Source

v3.30.0

Compare Source

v3.29.1

Compare Source

v3.29.0

Compare Source

  • Added URLSearchParams.prototype.size getter, url/734
  • Allowed cloning resizable ArrayBuffers in the structuredClone polyfill
  • Fixed wrong export in /(stable|actual|full)/instance/unshift entries, #​1207
  • Compat data improvements:
    • Set methods proposal marked as supported from Bun 0.5.7
    • String.prototype.toWellFormed marked as fixed from Bun 0.5.7
    • Added Deno 1.31 compat data mapping

v3.28.0

Compare Source

3.28.0 - 2023.02.14

v3.27.2

Compare Source

  • Set methods proposal updates:
    • Closing of iterators of Set-like objects on early exit, proposal-set-methods/85
    • Some other minor internal changes
  • Added one more workaround of a webpack dev server bug on IE global methods, #​1161
  • Fixed possible String.{ raw, cooked } error with empty template array
  • Used non-standard V8 Error.captureStackTrace instead of stack parsing in new error classes / wrappers where it's possible
  • Added detection correctness of iteration to Promise.{ allSettled, any } feature detection, Hermes issue
  • Compat data improvements:
    • Change Array by copy proposal marked as supported from V8 ~ Chrome 110
    • Added Samsung Internet 20 compat data mapping
    • Added Quest Browser 25 compat data mapping
    • Added React Native 0.71 Hermes compat data
    • Added Electron 23 and 24 compat data mapping
    • self marked as fixed in Deno 1.29.3, deno/17362
  • Minor tweaks of minification settings for core-js-bundle
  • Refactoring, some minor fixes, improvements, optimizations

v3.27.1

Compare Source

  • Fixed a Chakra-based MS Edge (18-) bug that unfreeze (O_o) frozen arrays used as WeakMap keys
  • Fixing of the previous bug also fixes some cases of String.dedent in MS Edge
  • Fixed dependencies of some entries

v3.27.0

Compare Source

  • Iterator Helpers proposal:
    • Built-ins:
      • Iterator
        • Iterator.from
        • 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
        • Iterator.prototype.toArray
        • Iterator.prototype.toAsync
        • Iterator.prototype[@​@​toStringTag]
      • AsyncIterator
        • AsyncIterator.from
        • AsyncIterator.prototype.drop
        • AsyncIterator.prototype.every
        • AsyncIterator.prototype.filter
        • AsyncIterator.prototype.find
        • AsyncIterator.prototype.flatMap
        • AsyncIterator.prototype.forEach
        • AsyncIterator.prototype.map
        • AsyncIterator.prototype.reduce
        • AsyncIterator.prototype.some
        • AsyncIterator.prototype.take
        • AsyncIterator.prototype.toArray
        • AsyncIterator.prototype[@​@​toStringTag]
    • Moved to Stage 3, November 2022 TC39 meeting
    • Added /actual/ entries, unconditional forced replacement disabled for features that survived to Stage 3
    • .from accept strings, .flatMap throws on strings returned from the callback, proposal-iterator-helpers/244, proposal-iterator-helpers/250
    • .from and .flatMap throws on non-object iterators, proposal-iterator-helpers/253
  • Set methods proposal:
    • Built-ins:
      • Set.prototype.intersection
      • Set.prototype.union
      • Set.prototype.difference
      • Set.prototype.symmetricDifference
      • Set.prototype.isSubsetOf
      • Set.prototype.isSupersetOf
      • Set.prototype.isDisjointFrom
    • Moved to Stage 3, November 2022 TC39 meeting
    • Reimplemented with new semantics:
      • Optimized performance (iteration over lowest set)
      • 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
  • Well-Formed Unicode Strings proposal:
    • Methods:
      • String.prototype.isWellFormed
      • String.prototype.toWellFormed
    • Moved to Stage 3, November 2022 TC39 meeting
    • Added /actual/ entries, disabled unconditional forced replacement
  • Explicit resource management Stage 3 and Async explicit resource management Stage 2 proposals:
    • Renamed from "using statement" and splitted into 2 (sync and async) proposals
    • In addition to already present well-known symbols, added new 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]
    • Sync version of this proposal moved to Stage 3, November 2022 TC39 meeting
    • Added /actual/ namespace entries for Stage 3 proposal
  • Added String.dedent stage 2 proposal
    • Method String.dedent
    • Throws an error on non-frozen raw templates for avoiding possible breaking changes in the future, proposal-string-dedent/75
  • Compat data targets improvements:
    • React Native from 0.70 shipped with Hermes as the default engine. However, bundled Hermes versions differ from standalone Hermes releases. So added react-native target for React Native with bundled Hermes.
    • 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.
  • Compat data improvements:
  • { 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
  • Some refactoring and optimization

v3.26.1

Compare Source

  • 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
  • V8 will not ship Array.prototype.{ group, groupToMap } in V8 ~ Chromium 108, proposal-array-grouping/44

v3.26.0

Compare Source

v3.25.5

Compare Source

  • Fixed regression with an error on reuse of some built-in methods from another realm, #​1133

v3.25.4

Compare Source

  • 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
  • Array.prototype.{ group, groupToMap } marked as supported from V8 ~ Chromium 108
  • Added Electron 22 compat data mapping

v3.25.3

Compare Source

  • Forced polyfilling of Array.prototype.groupToMap in the pure version for returning wrapped Map instances
  • Fixed existence of Array.prototype.{ findLast, findLastIndex } in /stage/4 entry
  • Added Opera Android 71 compat data mapping
  • Some stylistic changes

v3.25.2

Compare Source

  • Considering document.all as a callable in some missed cases
  • Added Safari 16.0 compat data
  • Added iOS Safari 16.0 compat data mapping
  • Fixed some ancient iOS Safari versions compat data mapping

v3.25.1

Compare Source

  • Added some fixes and workarounds of FF30- typed arrays bug that does not properly convert objects to numbers
  • Added sideEffects field to core-js-pure package.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

v3.25.0

Compare Source

  • Added Object.prototype.__proto__ polyfill
    • 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
    • Only for the global version
  • Considering document.all as an object in some missed cases, see ECMAScript Annex B 3.6
  • Avoiding unnecessary promise creation and validation result in %WrapForValid(Async)IteratorPrototype%.return, proposal-iterator-helpers/215
  • Fixed omitting the result of proxing .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 esmodules core-js-compat / core-js-builder target
  • Added Electron 21 compat data mapping
  • Added Oculus Browser 23.0 compat data mapping

v3.24.1

Compare Source

  • NodeJS is ignored in IS_BROWSER detection to avoid a false positive with jsdom, #​1110
  • Fixed detection of @@&#8203;species support in Promise in some old engines
  • { Array, %TypedArray% }.prototype.{ findLast, findLastIndex } marked as shipped in FF104
  • Added iOS Safari 15.6 compat data mapping
  • Fixed Opera 15 compat data mapping

v3.24.0

Compare Source

v3.23.5

Compare Source

  • Fixed a typo in the structuredClone feature detection, #​1106
  • Added Opera Android 70 compat data mapping

v3.23.4

Compare Source

  • 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
  • Fixed { Map, WeakMap }.prototype.emplace logic, #​1102
  • Fixed order of errors throwing on iterator helpers

v3.23.3

Compare Source

v3.23.2

Compare Source

  • Avoided creation of extra properties for the handling of %TypedArray% constructors in new methods, #​1092 (comment)
  • Added Deno 1.23 compat data mapping

v3.23.1

Compare Source

  • Fixed possible error on multiple core-js copies, #​1091
  • Added v flag to RegExp.prototype.flags implementation in case if current V8 bugs will not be fixed before this flag implementation

v3.23.0

Compare Source

  • Array find from last moved to the stable ES, according to June 2022 TC39 meeting:
    • Array.prototype.findLast
    • Array.prototype.findLastIndex
    • %TypedArray%.prototype.findLast
    • %TypedArray%.prototype.findLastIndex
  • Methods from the Array grouping proposal renamed, according to June 2022 TC39 meeting:
    • Array.prototype.groupBy -> Array.prototype.group
    • Array.prototype.groupByToMap -> Array.prototype.groupToMap
  • Changed the order of operations in %TypedArray%.prototype.with following proposal-change-array-by-copy/86, according to June 2022 TC39 meeting
  • Decorator Metadata proposal extracted from Decorators proposal as a separate stage 2 proposal, according to March 2022 TC39 meeting, Symbol.metadataKey replaces Symbol.metadata
  • 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
    • Added Opera Android 69 compat data mapping
    • Updated Electron 20.0 compat data mapping

v3.22.8

Compare Source

  • 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
  • Added Electron 20.0 compat data mapping
  • Added iOS Safari 15.5 compat data mapping
  • Refactoring

v3.22.7

Compare Source

  • Added a workaround for V8 ~ Chrome 53 bug with non-writable prototype of some methods, #​1083

v3.22.6

Compare Source

  • Fixed possible double call of ToNumber conversion on arguments of Math.{ fround, trunc } polyfills
  • Array.prototype.includes marked as fixed in FF102

v3.22.5

Compare Source

  • Ensured that polyfilled constructors .prototype is non-writable
  • Ensured that polyfilled methods .prototype is not defined
  • Added detection and fix of a V8 ~ Chrome <103 bug of struturedClone that returns null if cloned object contains multiple references to one error

v3.22.4

Compare Source

  • Ensured proper .length of polyfilled functions even in compressed code (excepting some ancient engines)
  • Ensured proper .name of polyfilled accessors (excepting some ancient engines)
  • Ensured proper source / ToString conversion of polyfilled accessors
  • Actualized Rhino compat data
  • Refactoring

v3.22.3

Compare Source

  • Added a fix for FF99+ Array.prototype.includes broken on sparse arrays

v3.22.2

Compare Source

  • Fixed URLSearchParams in IE8- that was broken in the previous release
  • Fixed __lookupGetter__ entries

v3.22.1

Compare Source

  • Improved some cases of RegExp flags handling
  • Prevented experimental warning in NodeJS ~ 18.0 on detection fetch API
  • Added NodeJS 18.0 compat data

v3.22.0

Compare Source

  • Change Array by copy proposal:
    • Moved to Stage 3, March TC39 meeting
    • 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.
    • Aligned modules filters of core-js-builder and core-js-compat, now it's modules and exclude options
    • 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
    • Added Samsung Internet 17.0 compat data mapping
    • Added Opera Android 68 compat data mapping

v3.21.1

Compare Source

  • Added a bugfix for the WebKit Array.prototype.{ groupBy, groupByToMap } implementation
  • core-js-compat targets parser transforms engine names to lower case
  • atob / btoa marked as fixed in NodeJS 17.5
  • Added Electron 18.0 compat data mapping
  • Added Deno 1.20 compat data mapping

v3.21.0

Compare Source

  • Added Base64 utility methods:
    • atob
    • btoa
  • Added the proper validation of arguments to some methods from web standards
  • Forced replacement of all features from early-stage proposals for avoiding possible web compatibility issues in the future
  • Added Rhino 1.7.14 compat data
  • Added Deno 1.19 compat data mapping
  • Added Opera Android 66 and 67 compat data mapping
  • Added iOS Safari 15.3 and 15.4 compat data mapping

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this MR and you won't be reminded about this update again.


  • If you want to rebase/retry this MR, check this box

This MR has been generated by Renovate Bot.

Merge request reports