Skip to content

Upgrading core-js 1 to 2

Breaking1.2.7 → 2.6.12Breaking8Deprecated4New30Changed30Fixed75Other12

BreakingUpgrade verdict

8 breaking changes.

  • Promise.all and Promise.race no longer consult the @@species property.
  • The string padding methods are renamed to padStart and padEnd.
  • The old Mozilla Array generic methods are no longer provided.
  • The core.log module is no longer available.
Top 5 of 12 that need code or config changes

Install script added in 2.6.6: postinstall. Installing this version runs the package's own code.

Breaking8
Removes usage of @@species from Promise.all and Promise.race.
Promise.allPromise.race@@species
Renames String#padLeft and String#padRight to String#padStart and String#padEnd.
String#padLeftString#padRightString#padStartString#padEnd
Removes Mozilla Array generics.
Removes the core.log module.
core.log
Moves RegExp.escape from the es7 namespace to the non-standard core namespace.
RegExp.escape
Moves custom build from external scripts to a separate package.
Makes {Map, Set}#forEach non-generic.
Map#forEachSet#forEach
Splits ES5 polyfills into internal modules so all entry points work in ES3 environments like IE8- without core-js/(library/)es5.
Deprecated4
Adds the global global object and deprecates System.global.
globalSystem.global
Map#toJSON and Set#toJSON are rejected and will be removed in the next major release.
Map.prototype.toJSONSet.prototype.toJSON
Error.isError is withdrawn and will be removed in the next major release.
Error.isError
Deprecates Reflect.enumerate, which will be removed in the next major release.
Reflect.enumerate