Skip to content

Upgrading babel-jest 23 to 24

Breaking23.6.0 → 24.9.0Breaking23Security1Platform1Deprecated1New66Changed56Fixed143Other127

BreakingUpgrade verdict

23 breaking changes and a platform requirement change and a security fix.

  • Desktop notifications now default to only showing on failure changes.
  • The old @providesModule module naming convention is no longer supported.
  • Cache file paths no longer include the name in their hash.
  • If you configure your own coverage reporters, the text-summary reporter is no longer added automatically.
Top 5 of 26 that need code or config changes

Requires Node.js >= 6 from 24.0.0-alpha.9 (none stated before).

Adds @jest/transform ^24.9.0, @jest/types ^24.9.0, @types/babel__core ^7.1.0, chalk ^2.4.2, slash ^2.0.0.

Installs 369 packages in all (was 116).

Breaking23
Sets the default notifyMode to failure-change in jest-config.
notifyModefailure-change
Removes support for @providesModule in jest-haste-map.
@providesModule
Removes the name from the hash in HasteMap.getCacheFilePath.
HasteMap.getCacheFilePath
Stops using the text-summary coverage reporter by default when other reporters are configured.
text-summarycoverageReporters
Removes long-deprecated globals for fake timers in jest-util.
jest-util
Removes regenerator-runtime injection across all packages.
regenerator-runtime
Removes jest-editor-support from the repository.
jest-editor-support
Adds primitive pretty printing for interpolated titles in jest-each.
jest-each
Supports diffing numbers and booleans instead of returning null for different ones in jest-diff.
jest-diff
Replaces the diff dependency with the diff-sequences package in jest-diff.
jest-diffdiffdiff-sequences
Only sets error process exit codes when they are non-zero in jest-cli.
jest-cli
Adds setup and teardown methods called around the worker farm in jest-worker.
setupteardown
Uses relative paths in jest-haste-map to allow remote caching.
jest-haste-map
Exports a function instead of an object from babel-preset-jest for Babel 7 compatibility.
babel-preset-jest
Exposes relative paths when getting the file iterator in jest-haste-map.
jest-haste-map
Runs code transforms over globalSetup and globalTeardown in jest-cli.
globalSetupglobalTeardown
Recover files correctly after haste name collisions are fixed.
jest-haste-map
Omit non-enumerable symbol properties from pretty-format output.
pretty-format
Upgrade to Babel 7, dropping support for Babel 6.
Upgrades to Micromatch 3 across all packages.
Micromatch
Removes jest-test-typescript-parser from the repository.
jest-test-typescript-parser
Replaces internal data structures in jest-haste-map to improve performance.
jest-haste-map
Fixes bugs with mock/spy result tracking of recursive functions.
jest-mock
Security1
Fixes a prototype pollution vulnerability in a jest-cli dependency.
Platform1
Requires Node.js 6 or newer for all packages.
Deprecated1
Deprecates setupTestFrameworkScriptFile in favor of setupFilesAfterEnv in jest-config.
setupTestFrameworkScriptFilesetupFilesAfterEnv