Upgrading babel-jest 24 to 25
Breaking24.9.0 → 25.5.1Breaking22Platform1New42Changed23Fixed68Other19
BreakingUpgrade verdict
22 breaking changes and a platform requirement change.
In plain terms
- If your setup used the mapper option in jest-haste-map, it no longer works.
- The default color of a project's display name now depends on which runner is used, which can change test output.
- Snapshot matchers now throw errors instead of reporting them through a removed method.
- Removes re-exports from @jest/core in jest-cli.
Must act Top 4 of 23 that need code or config changes
Node.js requirement changed in 25.1.0: >= 6 → >= 8.3.
Adds graceful-fs ^4.2.4.
Installs 269 packages in all (was 369).
What you must change
Breaking22
jest-haste-map removes the mapper option.
jest-haste-mapmapperSets default display name color based on the runner.
jest-configRemoves the report method and throws matcher errors in jest-snapshot.
reportRemoves re-exports from @jest/core in jest-cli.
@jest/coreRemoves deprecated exports from jest-util.
jest-utilSupports .mjs config files.
.mjsExports jest-diff as an ECMAScript module.
jest-diffStops exporting ScriptTransformer from jest-runtime; import it from @jest/transform instead.
ScriptTransformer@jest/transformImproves jest-snapshot report when the matcher has properties.
Returns transformed code as a string from jest-transform instead of wrapping it in vm.Script.
vm.Scriptjest-worker's end() now returns a promise resolving with whether workers exited gracefully.
end()expect now treats primitives as different from wrappers instantiated with new.
jest-leak-detector uses weak-napi instead of the weak package.
weak-napiweakUses less null and undefined in config types in jest-types.
Upgrades to Micromatch v4.
MicromatchUses ESM exports in babel-plugin-jest-hoist.
Switches the jest package to ESM exports.
jestSwitches jest-cli to ESM exports.
jest-cliUpgrades JSDOM from v11 to v15 in jest-environment-jsdom.
jest-environment-jsdomUpgrades Istanbul dependencies used for code coverage in jest-reporters.
jest-reportersSwitches jest-validate to ESM exports.
jest-validateDistinguishes an empty string from an internal snapshot that was not written.
Platform1
Drops support for Node 6.
API changes
Generated by DepDelta from published .d.ts files. Not mixed with prose notes.
- added:
export { loadPartialConfig } from '@babel/core'
- added:
const transformer: BabelJestTransformer & { createTransformer: (options?: TransformOptions) => BabelJestTransformer } - added:
export = transformer
- added:
export { loadPartialConfig } from '@babel/core'