Upgrading core-js 1 to 2
Breaking1.2.7 → 2.6.12Breaking8Deprecated4New30Changed30Fixed75Other12
BreakingUpgrade verdict
8 breaking changes.
In plain terms
- 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.
Must act 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.
What you must change
Breaking8
Removes usage of @@species from Promise.all and Promise.race.
Promise.allPromise.race@@speciesRenames String#padLeft and String#padRight to String#padStart and String#padEnd.
String#padLeftString#padRightString#padStartString#padEndRemoves Mozilla Array generics.
Removes the core.log module.
core.logMoves RegExp.escape from the es7 namespace to the non-standard core namespace.
RegExp.escapeMoves custom build from external scripts to a separate package.
Makes
{Map, Set}#forEach non-generic.Map#forEachSet#forEachSplits ES5 polyfills into internal modules so all entry points work in ES3 environments like IE8- without core-js/(library/)es5.
Deprecations to plan for
Deprecated4
Adds the global global object and deprecates System.global.
globalSystem.globalMap#toJSON and Set#toJSON are rejected and will be removed in the next major release.Map.prototype.toJSONSet.prototype.toJSONError.isError is withdrawn and will be removed in the next major release.Error.isErrorDeprecates Reflect.enumerate, which will be removed in the next major release.
Reflect.enumerate