🚨 [security] Update jest 28.1.3 → 30.1.3 (major)


🚨 Your current dependencies have known security vulnerabilities 🚨

This dependency update fixes known security vulnerabilities. Please see the details below and assess their impact carefully. We recommend to merge and deploy this as soon as possible!


Here is everything you need to know about this upgrade. Please take a good look at what changed and the test results before merging this pull request.

What changed?

✳️ jest (28.1.3 → 30.1.3) · Repo · Changelog

Release Notes

Too many releases to show here. View the full release notes.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ @​ampproject/remapping (indirect, 2.2.0 → 2.3.0) · Repo

Commits

See the full diff on Github. The new version differs by 11 commits:

↗️ @​babel/code-frame (indirect, 7.18.6 → 7.27.1) · Repo · Changelog

Release Notes

Too many releases to show here. View the full release notes.

Commits

See the full diff on Github. The new version differs by 63 commits:

↗️ @​babel/compat-data (indirect, 7.18.8 → 7.28.0) · Repo · Changelog

Release Notes

Too many releases to show here. View the full release notes.

Commits

See the full diff on Github. The new version differs by 25 commits:

↗️ @​babel/core (indirect, 7.18.6 → 7.28.3) · Repo · Changelog

Release Notes

Too many releases to show here. View the full release notes.

Commits

See the full diff on Github. The new version differs by 21 commits:

↗️ @​babel/generator (indirect, 7.18.7 → 7.28.3) · Repo · Changelog

Release Notes

Too many releases to show here. View the full release notes.

Commits

See the full diff on Github. The new version differs by 21 commits:

↗️ @​babel/helper-compilation-targets (indirect, 7.18.6 → 7.27.2) · Repo · Changelog

Release Notes

Too many releases to show here. View the full release notes.

Commits

See the full diff on Github. The new version differs by 10 commits:

↗️ @​babel/helper-module-imports (indirect, 7.18.6 → 7.27.1) · Repo · Changelog

Release Notes

7.27.1

v7.27.1 (2025-04-30)

Thanks @kermanx and @woaitsAryan for your first PRs!

👓 Spec Compliance

  • babel-parser
  • babel-parser, babel-types

🐛 Bug Fix

  • babel-plugin-proposal-destructuring-private, babel-plugin-proposal-do-expressions, babel-traverse
  • babel-helper-wrap-function, babel-plugin-transform-async-to-generator
    • #17251 Fix: propagate argument evaluation errors through async promise chain (@magic-akari)
  • babel-helper-remap-async-to-generator, babel-plugin-transform-async-to-generator
  • babel-helper-fixtures, babel-parser
    • #17233 Create ChainExpression within TSInstantiationExpression (@JLHwung)
  • babel-generator, babel-parser
    • #17226 Fill optional AST properties when both estree and typescript parser plugin are enabled (Part 2) (@JLHwung)
  • babel-parser
    • #17224 Fill optional AST properties when both estree and typescript parser plugin are enabled (Part 1) (@JLHwung)
    • #17080 Fix start of TSParameterProperty (@JLHwung)
  • babel-compat-data, babel-preset-env
  • babel-traverse
    • #17156 fix: Objects and arrays with multiple references should not be evaluated (@liuxingbaoyu)
  • babel-generator

💅 Polish

  • babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining, babel-plugin-proposal-decorators, babel-plugin-transform-arrow-functions, babel-plugin-transform-class-properties, babel-plugin-transform-destructuring, babel-plugin-transform-object-rest-spread, babel-plugin-transform-optional-chaining, babel-plugin-transform-parameters, babel-traverse

🏠 Internal

  • babel-runtime-corejs2, babel-runtime-corejs3, babel-runtime
  • babel-compat-data, babel-preset-env
  • babel-compat-data, babel-standalone
  • babel-register
  • babel-helpers, babel-plugin-transform-async-generator-functions, babel-plugin-transform-regenerator, babel-preset-env, babel-runtime-corejs3
  • All packages

🔬 Output optimization

  • babel-helpers, babel-plugin-transform-modules-commonjs, babel-runtime-corejs3
  • babel-helpers, babel-plugin-transform-async-generator-functions, babel-plugin-transform-regenerator, babel-preset-env, babel-runtime-corejs3

Committers: 9

7.25.9

v7.25.9 (2024-10-22)

Thanks @victorenator for your first PR!

🐛 Bug Fix

  • babel-parser, babel-template, babel-types
  • babel-helper-compilation-targets, babel-preset-env
  • Other

🏠 Internal

  • babel-helper-transform-fixture-test-runner
  • Every package

🏃‍♀️ Performance

  • babel-parser, babel-types

Committers: 4

7.25.7

v7.25.7 (2024-10-02)

Thanks @DylanPiercey and @YuHyeonWook for your first PRs!

🐛 Bug Fix

💅 Polish

🏠 Internal

  • babel-core
  • babel-helper-compilation-targets, babel-helper-plugin-utils, babel-preset-env
  • babel-plugin-proposal-destructuring-private, babel-plugin-syntax-decimal, babel-plugin-syntax-import-reflection, babel-standalone
  • babel-generator

🏃‍♀️ Performance

Committers: 8

7.24.7

v7.24.7 (2024-06-05)

🐛 Bug Fix

  • babel-node
  • babel-traverse
  • babel-helper-transform-fixture-test-runner, babel-plugin-proposal-explicit-resource-management

🏠 Internal

  • babel-helpers, babel-runtime-corejs2, babel-runtime-corejs3, babel-runtime

Committers: 7

7.24.6

v7.24.6 (2024-05-24)

Thanks @amjed-98, @blakewilson, @coelhucas, and @SukkaW for your first PRs!

🐛 Bug Fix

  • babel-helper-create-class-features-plugin, babel-plugin-transform-class-properties
  • babel-core, babel-generator, babel-plugin-transform-modules-commonjs
  • babel-helper-create-class-features-plugin, babel-plugin-proposal-decorators
  • babel-helpers, babel-plugin-proposal-decorators, babel-runtime-corejs3
    • #16483 Fix: throw TypeError if addInitializer is called after finished (@JLHwung)
  • babel-parser, babel-plugin-transform-typescript

🏠 Internal

  • babel-core, babel-helpers, babel-plugin-transform-runtime, babel-preset-env, babel-runtime-corejs2, babel-runtime-corejs3, babel-runtime
  • babel-helpers
  • babel-cli, babel-helpers, babel-plugin-external-helpers, babel-plugin-proposal-decorators, babel-plugin-transform-class-properties, babel-plugin-transform-modules-commonjs, babel-plugin-transform-modules-systemjs, babel-plugin-transform-runtime, babel-preset-env, babel-runtime-corejs2, babel-runtime-corejs3, babel-runtime
  • babel-parser, babel-traverse
  • Other

Committers: 9

7.24.3

v7.24.3 (2024-03-20)

🐛 Bug Fix

  • babel-helper-module-imports
    • #16370 fix: do not inject the same imported identifier multiple times (@ota-meshi)

Committers: 2

7.24.1

v7.24.1 (2024-03-19)

🐛 Bug Fix

  • babel-helper-create-class-features-plugin, babel-plugin-proposal-decorators
  • babel-plugin-proposal-decorators, babel-plugin-proposal-json-modules, babel-plugin-transform-async-generator-functions, babel-plugin-transform-regenerator, babel-plugin-transform-runtime, babel-preset-env
  • babel-helper-create-class-features-plugin, babel-plugin-proposal-decorators, babel-plugin-proposal-pipeline-operator, babel-plugin-transform-class-properties
  • babel-helper-create-class-features-plugin, babel-helper-replace-supers, babel-plugin-proposal-decorators, babel-plugin-transform-class-properties

📝 Documentation

🏠 Internal

  • babel-code-frame, babel-highlight
  • babel-helper-fixtures, babel-helpers, babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression, babel-plugin-proposal-pipeline-operator, babel-plugin-transform-unicode-sets-regex, babel-preset-env, babel-preset-flow
  • babel-helper-module-imports, babel-plugin-proposal-import-wasm-source, babel-plugin-proposal-json-modules, babel-plugin-proposal-record-and-tuple, babel-plugin-transform-react-jsx-development, babel-plugin-transform-react-jsx
  • Other

🔬 Output optimization

  • babel-helper-replace-supers, babel-plugin-transform-class-properties, babel-plugin-transform-classes, babel-plugin-transform-parameters, babel-plugin-transform-runtime
  • babel-plugin-transform-class-properties, babel-plugin-transform-classes
  • babel-plugin-proposal-decorators, babel-plugin-transform-class-properties, babel-plugin-transform-object-rest-spread, babel-traverse
  • babel-core, babel-plugin-external-helpers, babel-plugin-proposal-decorators, babel-plugin-proposal-function-bind, babel-plugin-transform-class-properties, babel-plugin-transform-classes, babel-plugin-transform-flow-comments, babel-plugin-transform-flow-strip-types, babel-plugin-transform-function-name, babel-plugin-transform-modules-systemjs, babel-plugin-transform-parameters, babel-plugin-transform-private-property-in-object, babel-plugin-transform-react-jsx, babel-plugin-transform-runtime, babel-plugin-transform-spread, babel-plugin-transform-typescript, babel-preset-env

Committers: 4

7.22.15

v7.22.15 (2023-09-04)

🐛 Bug Fix

🏠 Internal

Committers: 4

7.22.5

v7.22.5 (2023-06-08)

🐛 Bug Fix

  • babel-preset-env, babel-standalone

💅 Polish

Committers: 4

7.21.4

v7.21.4 (2023-03-31)

🐛 Bug Fix

  • babel-core, babel-helper-module-imports, babel-preset-typescript
  • babel-generator
    • #15496 Fix compact printing of non-null assertion operators (@rtsao)

💅 Polish

  • babel-helper-create-class-features-plugin, babel-plugin-proposal-class-properties, babel-plugin-transform-typescript, babel-traverse

🏠 Internal

  • Other
  • babel-parser
  • babel-code-frame, babel-highlight

Committers: 6

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by 63 commits:

↗️ @​babel/helper-module-transforms (indirect, 7.18.8 → 7.28.3) · Repo · Changelog

Release Notes

Too many releases to show here. View the full release notes.

Commits

See the full diff on Github. The new version differs by 21 commits:

↗️ @​babel/helper-plugin-utils (indirect, 7.18.6 → 7.27.1) · Repo · Changelog

Release Notes

Too many releases to show here. View the full release notes.

Commits

See the full diff on Github. The new version differs by 63 commits:

↗️ @​babel/helper-validator-identifier (indirect, 7.18.6 → 7.27.1) · Repo · Changelog

Release Notes

7.27.1

v7.27.1 (2025-04-30)

Thanks @kermanx and @woaitsAryan for your first PRs!

👓 Spec Compliance

  • babel-parser
  • babel-parser, babel-types

🐛 Bug Fix

  • babel-plugin-proposal-destructuring-private, babel-plugin-proposal-do-expressions, babel-traverse
  • babel-helper-wrap-function, babel-plugin-transform-async-to-generator
    • #17251 Fix: propagate argument evaluation errors through async promise chain (@magic-akari)
  • babel-helper-remap-async-to-generator, babel-plugin-transform-async-to-generator
  • babel-helper-fixtures, babel-parser
    • #17233 Create ChainExpression within TSInstantiationExpression (@JLHwung)
  • babel-generator, babel-parser
    • #17226 Fill optional AST properties when both estree and typescript parser plugin are enabled (Part 2) (@JLHwung)
  • babel-parser
    • #17224 Fill optional AST properties when both estree and typescript parser plugin are enabled (Part 1) (@JLHwung)
    • #17080 Fix start of TSParameterProperty (@JLHwung)
  • babel-compat-data, babel-preset-env
  • babel-traverse
    • #17156 fix: Objects and arrays with multiple references should not be evaluated (@liuxingbaoyu)
  • babel-generator

💅 Polish

  • babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining, babel-plugin-proposal-decorators, babel-plugin-transform-arrow-functions, babel-plugin-transform-class-properties, babel-plugin-transform-destructuring, babel-plugin-transform-object-rest-spread, babel-plugin-transform-optional-chaining, babel-plugin-transform-parameters, babel-traverse

🏠 Internal

  • babel-runtime-corejs2, babel-runtime-corejs3, babel-runtime
  • babel-compat-data, babel-preset-env
  • babel-compat-data, babel-standalone
  • babel-register
  • babel-helpers, babel-plugin-transform-async-generator-functions, babel-plugin-transform-regenerator, babel-preset-env, babel-runtime-corejs3
  • All packages

🔬 Output optimization

  • babel-helpers, babel-plugin-transform-modules-commonjs, babel-runtime-corejs3
  • babel-helpers, babel-plugin-transform-async-generator-functions, babel-plugin-transform-regenerator, babel-preset-env, babel-runtime-corejs3

Committers: 9

7.25.9

v7.25.9 (2024-10-22)

Thanks @victorenator for your first PR!

🐛 Bug Fix

  • babel-parser, babel-template, babel-types
  • babel-helper-compilation-targets, babel-preset-env
  • Other

🏠 Internal

  • babel-helper-transform-fixture-test-runner
  • Every package

🏃‍♀️ Performance

  • babel-parser, babel-types

Committers: 4

7.25.7

v7.25.7 (2024-10-02)

Thanks @DylanPiercey and @YuHyeonWook for your first PRs!

🐛 Bug Fix

💅 Polish

🏠 Internal

  • babel-core
  • babel-helper-compilation-targets, babel-helper-plugin-utils, babel-preset-env
  • babel-plugin-proposal-destructuring-private, babel-plugin-syntax-decimal, babel-plugin-syntax-import-reflection, babel-standalone
  • babel-generator

🏃‍♀️ Performance

Committers: 8

7.24.7

v7.24.7 (2024-06-05)

🐛 Bug Fix

  • babel-node
  • babel-traverse
  • babel-helper-transform-fixture-test-runner, babel-plugin-proposal-explicit-resource-management

🏠 Internal

  • babel-helpers, babel-runtime-corejs2, babel-runtime-corejs3, babel-runtime

Committers: 7

7.24.6

v7.24.6 (2024-05-24)

Thanks @amjed-98, @blakewilson, @coelhucas, and @SukkaW for your first PRs!

🐛 Bug Fix

  • babel-helper-create-class-features-plugin, babel-plugin-transform-class-properties
  • babel-core, babel-generator, babel-plugin-transform-modules-commonjs
  • babel-helper-create-class-features-plugin, babel-plugin-proposal-decorators
  • babel-helpers, babel-plugin-proposal-decorators, babel-runtime-corejs3
    • #16483 Fix: throw TypeError if addInitializer is called after finished (@JLHwung)
  • babel-parser, babel-plugin-transform-typescript

🏠 Internal

  • babel-core, babel-helpers, babel-plugin-transform-runtime, babel-preset-env, babel-runtime-corejs2, babel-runtime-corejs3, babel-runtime
  • babel-helpers
  • babel-cli, babel-helpers, babel-plugin-external-helpers, babel-plugin-proposal-decorators, babel-plugin-transform-class-properties, babel-plugin-transform-modules-commonjs, babel-plugin-transform-modules-systemjs, babel-plugin-transform-runtime, babel-preset-env, babel-runtime-corejs2, babel-runtime-corejs3, babel-runtime
  • babel-parser, babel-traverse
  • Other

Committers: 9

7.24.5

v7.24.5 (2024-04-29)

Thanks @romgrk and @sossost for your first PRs!

🐛 Bug Fix

  • babel-plugin-transform-classes, babel-traverse
  • babel-helpers, babel-plugin-proposal-explicit-resource-management, babel-runtime-corejs3

💅 Polish

  • babel-parser

🏠 Internal

  • Other
  • babel-parser
  • babel-helper-create-class-features-plugin, babel-helper-member-expression-to-functions, babel-helper-module-transforms, babel-helper-split-export-declaration, babel-helper-wrap-function, babel-helpers, babel-plugin-bugfix-firefox-class-in-computed-class-key, babel-plugin-proposal-explicit-resource-management, babel-plugin-transform-block-scoping, babel-plugin-transform-destructuring, babel-plugin-transform-object-rest-spread, babel-plugin-transform-optional-chaining, babel-plugin-transform-parameters, babel-plugin-transform-private-property-in-object, babel-plugin-transform-react-jsx-self, babel-plugin-transform-typeof-symbol, babel-plugin-transform-typescript, babel-traverse
  • babel-plugin-proposal-partial-application, babel-types
  • babel-plugin-transform-class-properties, babel-preset-env

🏃‍♀️ Performance

  • babel-helpers, babel-preset-env, babel-runtime-corejs3
    • #16357 Performance: improve objectWithoutPropertiesLoose on V8 (@romgrk)

Committers: 6

7.22.20

v7.22.20 (2023-09-16)

🏠 Internal

  • babel-helper-validator-identifier
  • babel-plugin-transform-dotall-regex

↩️ Revert

  • babel-helper-remap-async-to-generator, babel-helper-wrap-function, babel-plugin-proposal-explicit-resource-management, babel-plugin-proposal-function-sent, babel-plugin-transform-async-generator-functions, babel-plugin-transform-async-to-generator, babel-plugin-transform-block-scoping, babel-plugin-transform-class-properties, babel-plugin-transform-classes, babel-plugin-transform-parameters, babel-plugin-transform-runtime, babel-preset-env

Committers: 3

7.22.19

v7.22.19 (2023-09-14)

Re-published 7.22.18, due to a releasing error.

7.22.15

v7.22.15 (2023-09-04)

🐛 Bug Fix

🏠 Internal

Committers: 4

7.22.5

v7.22.5 (2023-06-08)

🐛 Bug Fix

  • babel-preset-env, babel-standalone

💅 Polish

Committers: 4

7.19.1

v7.19.1 (2022-09-14)

Thanks @hegemonic for your first PR!

🐛 Bug Fix

  • babel-core
  • babel-traverse
  • Other
    • #14872 Use the built-in class fields and private methods rules in ESLint 8 (@JLHwung)
  • babel-parser
  • babel-plugin-transform-typescript

Committers: 5

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by 63 commits:

↗️ @​babel/helpers (indirect, 7.18.6 → 7.28.3) · Repo · Changelog

Security Advisories 🚨

🚨 Babel has inefficient RegExp complexity in generated code with .replace when transpiling named capturing groups

Impact

When using Babel to compile regular expression named capturing groups, Babel will generate a polyfill for the .replace method that has quadratic complexity on some specific replacement pattern strings (i.e. the second argument passed to .replace).

Your generated code is vulnerable if all the following conditions are true:

  • You use Babel to compile regular expression named capturing groups
  • You use the .replace method on a regular expression that contains named capturing groups
  • Your code uses untrusted strings as the second argument of .replace

If you are using @babel/preset-env with the targets option, the transform that injects the vulnerable code is automatically enabled if:

  • you use duplicated named capturing groups, and target any browser older than Chrome/Edge 126, Opera 112, Firefox 129, Safari 17.4, or Node.js 23
  • you use any named capturing groups, and target any browser older than Chrome 64, Opera 71, Edge 79, Firefox 78, Safari 11.1, or Node.js 10

You can verify what transforms @babel/preset-env is using by enabling the debug option.

Patches

This problem has been fixed in @babel/helpers and @babel/runtime 7.26.10 and 8.0.0-alpha.17, please upgrade. It's likely that you do not directly depend on @babel/helpers, and instead you depend on @babel/core (which itself depends on @babel/helpers). Upgrading to @babel/core 7.26.10 is not required, but it guarantees that you are on a new enough @babel/helpers version.

Please note that just updating your Babel dependencies is not enough: you will also need to re-compile your code.

Workarounds

If you are passing user-provided strings as the second argument of .replace on regular expressions that contain named capturing groups, validate the input and make sure it does not contain the substring $< if it's then not followed by > (possibly with other characters in between).

References

This vulnerability was reported and fixed in #17173.

Release Notes

Too many releases to show here. View the full release notes.

Commits

See the full diff on Github. The new version differs by 21 commits:

↗️ @​babel/parser (indirect, 7.18.8 → 7.28.3) · Repo · Changelog

Release Notes

Too many releases to show here. View the full release notes.

Commits

See the full diff on Github. The new version differs by 21 commits:

↗️ @​babel/plugin-syntax-typescript (indirect, 7.18.6 → 7.27.1) · Repo · Changelog

Release Notes

7.27.1

v7.27.1 (2025-04-30)

Thanks @kermanx and @woaitsAryan for your first PRs!

👓 Spec Compliance

  • babel-parser
  • babel-parser, babel-types

🐛 Bug Fix

  • babel-plugin-proposal-destructuring-private, babel-plugin-proposal-do-expressions, babel-traverse
  • babel-helper-wrap-function, babel-plugin-transform-async-to-generator
    • #17251 Fix: propagate argument evaluation errors through async promise chain (@magic-akari)
  • babel-helper-remap-async-to-generator, babel-plugin-transform-async-to-generator
  • babel-helper-fixtures, babel-parser
    • #17233 Create ChainExpression within TSInstantiationExpression (@JLHwung)
  • babel-generator, babel-parser
    • #17226 Fill optional AST properties when both estree and typescript parser plugin are enabled (Part 2) (@JLHwung)
  • babel-parser
    • #17224 Fill optional AST properties when both estree and typescript parser plugin are enabled (Part 1) (@JLHwung)
    • #17080 Fix start of TSParameterProperty (@JLHwung)
  • babel-compat-data, babel-preset-env
  • babel-traverse
    • #17156 fix: Objects and arrays with multiple references should not be evaluated (@liuxingbaoyu)
  • babel-generator

💅 Polish

  • babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining, babel-plugin-proposal-decorators, babel-plugin-transform-arrow-functions, babel-plugin-transform-class-properties, babel-plugin-transform-destructuring, babel-plugin-transform-object-rest-spread, babel-plugin-transform-optional-chaining, babel-plugin-transform-parameters, babel-traverse

🏠 Internal

  • babel-runtime-corejs2, babel-runtime-corejs3, babel-runtime
  • babel-compat-data, babel-preset-env
  • babel-compat-data, babel-standalone
  • babel-register
  • babel-helpers, babel-plugin-transform-async-generator-functions, babel-plugin-transform-regenerator, babel-preset-env, babel-runtime-corejs3
  • All packages

🔬 Output optimization

  • babel-helpers, babel-plugin-transform-modules-commonjs, babel-runtime-corejs3
  • babel-helpers, babel-plugin-transform-async-generator-functions, babel-plugin-transform-regenerator, babel-preset-env, babel-runtime-corejs3

Committers: 9

7.25.9

v7.25.9 (2024-10-22)

Thanks @victorenator for your first PR!

🐛 Bug Fix

  • babel-parser, babel-template, babel-types
  • babel-helper-compilation-targets, babel-preset-env
  • Other

🏠 Internal

  • babel-helper-transform-fixture-test-runner
  • Every package

🏃‍♀️ Performance

  • babel-parser, babel-types

Committers: 4

7.25.7

v7.25.7 (2024-10-02)

Thanks @DylanPiercey and @YuHyeonWook for your first PRs!

🐛 Bug Fix

💅 Polish

🏠 Internal

  • babel-core
  • babel-helper-compilation-targets, babel-helper-plugin-utils, babel-preset-env
  • babel-plugin-proposal-destructuring-private, babel-plugin-syntax-decimal, babel-plugin-syntax-import-reflection, babel-standalone
  • babel-generator

🏃‍♀️ Performance

Committers: 8

7.25.4

v7.25.4 (2024-08-22)

🐛 Bug Fix

  • babel-traverse
  • babel-helper-create-class-features-plugin, babel-plugin-proposal-decorators
  • babel-types
  • babel-generator

💅 Polish

  • babel-generator, babel-plugin-proposal-decorators, babel-plugin-proposal-destructuring-private, babel-plugin-proposal-pipeline-operator, babel-plugin-transform-class-properties, babel-plugin-transform-destructuring, babel-plugin-transform-optional-chaining, babel-plugin-transform-private-methods, babel-plugin-transform-private-property-in-object, babel-plugin-transform-typescript, babel-runtime-corejs2, babel-runtime, babel-traverse
  • babel-generator, babel-plugin-transform-class-properties
  • babel-generator, babel-plugin-proposal-decorators, babel-plugin-proposal-destructuring-private, babel-plugin-transform-object-rest-spread

🔬 Output optimization

Committers: 4

7.24.7

v7.24.7 (2024-06-05)

🐛 Bug Fix

  • babel-node
  • babel-traverse
  • babel-helper-transform-fixture-test-runner, babel-plugin-proposal-explicit-resource-management

🏠 Internal

  • babel-helpers, babel-runtime-corejs2, babel-runtime-corejs3, babel-runtime

Committers: 7

7.24.6

v7.24.6 (2024-05-24)

Thanks @amjed-98, @blakewilson, @coelhucas, and @SukkaW for your first PRs!

🐛 Bug Fix

  • babel-helper-create-class-features-plugin, babel-plugin-transform-class-properties
  • babel-core, babel-generator, babel-plugin-transform-modules-commonjs
  • babel-helper-create-class-features-plugin, babel-plugin-proposal-decorators
  • babel-helpers, babel-plugin-proposal-decorators, babel-runtime-corejs3
    • #16483 Fix: throw TypeError if addInitializer is called after finished (@JLHwung)
  • babel-parser, babel-plugin-transform-typescript

🏠 Internal

  • babel-core, babel-helpers, babel-plugin-transform-runtime, babel-preset-env, babel-runtime-corejs2, babel-runtime-corejs3, babel-runtime
  • babel-helpers
  • babel-cli, babel-helpers, babel-plugin-external-helpers, babel-plugin-proposal-decorators, babel-plugin-transform-class-properties, babel-plugin-transform-modules-commonjs, babel-plugin-transform-modules-systemjs, babel-plugin-transform-runtime, babel-preset-env, babel-runtime-corejs2, babel-runtime-corejs3, babel-runtime
  • babel-parser, babel-traverse
  • Other

Committers: 9

7.24.1

v7.24.1 (2024-03-19)

🐛 Bug Fix

  • babel-helper-create-class-features-plugin, babel-plugin-proposal-decorators
  • babel-plugin-proposal-decorators, babel-plugin-proposal-json-modules, babel-plugin-transform-async-generator-functions, babel-plugin-transform-regenerator, babel-plugin-transform-runtime, babel-preset-env
  • babel-helper-create-class-features-plugin, babel-plugin-proposal-decorators, babel-plugin-proposal-pipeline-operator, babel-plugin-transform-class-properties
  • babel-helper-create-class-features-plugin, babel-helper-replace-supers, babel-plugin-proposal-decorators, babel-plugin-transform-class-properties

📝 Documentation

🏠 Internal

  • babel-code-frame, babel-highlight
  • babel-helper-fixtures, babel-helpers, babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression, babel-plugin-proposal-pipeline-operator, babel-plugin-transform-unicode-sets-regex, babel-preset-env, babel-preset-flow
  • babel-helper-module-imports, babel-plugin-proposal-import-wasm-source, babel-plugin-proposal-json-modules, babel-plugin-proposal-record-and-tuple, babel-plugin-transform-react-jsx-development, babel-plugin-transform-react-jsx
  • Other

🔬 Output optimization

  • babel-helper-replace-supers, babel-plugin-transform-class-properties, babel-plugin-transform-classes, babel-plugin-transform-parameters, babel-plugin-transform-runtime
  • babel-plugin-transform-class-properties, babel-plugin-transform-classes
  • babel-plugin-proposal-decorators, babel-plugin-transform-class-properties, babel-plugin-transform-object-rest-spread, babel-traverse
  • babel-core, babel-plugin-external-helpers, babel-plugin-proposal-decorators, babel-plugin-proposal-function-bind, babel-plugin-transform-class-properties, babel-plugin-transform-classes, babel-plugin-transform-flow-comments, babel-plugin-transform-flow-strip-types, babel-plugin-transform-function-name, babel-plugin-transform-modules-systemjs, babel-plugin-transform-parameters, babel-plugin-transform-private-property-in-object, babel-plugin-transform-react-jsx, babel-plugin-transform-runtime, babel-plugin-transform-spread, babel-plugin-transform-typescript, babel-preset-env

Committers: 4

7.23.3

v7.23.3 (2023-11-09)

🐛 Bug Fix

  • babel-plugin-transform-typescript
  • babel-generator
  • babel-compat-data, babel-plugin-bugfix-v8-static-class-fields-redefine-readonly, babel-preset-env
  • babel-plugin-transform-object-super
  • babel-helper-module-transforms, babel-plugin-transform-modules-amd, babel-plugin-transform-modules-commonjs, babel-plugin-transform-modules-umd

📝 Documentation

  • #16044 docs: Update links in @babel/eslint-parser README (@aryehb)

🏠 Internal

  • babel-core, babel-preset-env

🏃‍♀️ Performance

🔬 Output optimization

  • babel-plugin-transform-computed-properties

Committers: 9

7.22.5

v7.22.5 (2023-06-08)

🐛 Bug Fix

  • babel-preset-env, babel-standalone

💅 Polish

Committers: 4

7.21.4

v7.21.4 (2023-03-31)

🐛 Bug Fix

  • babel-core, babel-helper-module-imports, babel-preset-typescript
  • babel-generator
    • #15496 Fix compact printing of non-null assertion operators (@rtsao)

💅 Polish

  • babel-helper-create-class-features-plugin, babel-plugin-proposal-class-properties, babel-plugin-transform-typescript, babel-traverse

🏠 Internal

  • Other
  • babel-parser
  • babel-code-frame, babel-highlight

Committers: 6

7.20.0

v7.20.0 (2022-10-27)

Thanks @oceandrama for your first PR!

🚀 New Feature

  • babel-compat-data, babel-helper-compilation-targets, babel-preset-env
  • babel-plugin-syntax-typescript
  • babel-generator, babel-parser, babel-plugin-syntax-explicit-resource-management, babel-plugin-transform-block-scoping, babel-plugin-transform-destructuring, babel-standalone, babel-traverse, babel-types
    • #14968 Parse using declaration (explicit resource management) (@JLHwung)
  • babel-generator, babel-parser, babel-plugin-syntax-import-reflection, babel-standalone, babel-types
  • babel-generator, babel-helper-skip-transparent-expression-wrappers, babel-parser, babel-plugin-transform-typescript, babel-traverse, babel-types

🐛 Bug Fix

🏠 Internal

  • babel-helpers, babel-node, babel-plugin-proposal-async-generator-functions, babel-plugin-transform-regenerator, babel-preset-env, babel-runtime-corejs2, babel-runtime-corejs3, babel-runtime

Committers: 5

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by 63 commits:

↗️ @​babel/template (indirect, 7.18.6 → 7.27.2) · Repo · Changelog

Release Notes

Too many releases to show here. View the full release notes.

Commits

See the full diff on Github. The new version differs by 10 commits:

↗️ @​babel/traverse (indirect, 7.18.8 → 7.28.3) · Repo · Changelog

Security Advisories 🚨

🚨 Babel vulnerable to arbitrary code execution when compiling specifically crafted malicious code

Impact

Using Babel to compile code that was specifically crafted by an attacker can lead to arbitrary code execution during compilation, when using plugins that rely on the path.evaluate()or path.evaluateTruthy() internal Babel methods.

Known affected plugins are:

  • @babel/plugin-transform-runtime
  • @babel/preset-env when using its useBuiltIns option
  • Any "polyfill provider" plugin that depends on @babel/helper-define-polyfill-provider, such as babel-plugin-polyfill-corejs3, babel-plugin-polyfill-corejs2, babel-plugin-polyfill-es-shims, babel-plugin-polyfill-regenerator

No other plugins under the @babel/ namespace are impacted, but third-party plugins might be.

Users that only compile trusted code are not impacted.

Patches

The vulnerability has been fixed in @babel/traverse@7.23.2.

Babel 6 does not receive security fixes anymore (see Babel's security policy), hence there is no patch planned for babel-traverse@6.

Workarounds

  • Upgrade @babel/traverse to v7.23.2 or higher. You can do this by deleting it from your package manager's lockfile and re-installing the dependencies. @babel/core >=7.23.2 will automatically pull in a non-vulnerable version.
  • If you cannot upgrade @babel/traverse and are using one of the affected packages mentioned above, upgrade them to their latest version to avoid triggering the vulnerable code path in affected @babel/traverse versions:
    • @babel/plugin-transform-runtime v7.23.2
    • @babel/preset-env v7.23.2
    • @babel/helper-define-polyfill-provider v0.4.3
    • babel-plugin-polyfill-corejs2 v0.4.6
    • babel-plugin-polyfill-corejs3 v0.8.5
    • babel-plugin-polyfill-es-shims v0.10.0
    • babel-plugin-polyfill-regenerator v0.5.3
Release Notes

Too many releases to show here. View the full release notes.

Commits

See the full diff on Github. The new version differs by 21 commits:

↗️ @​babel/types (indirect, 7.18.8 → 7.28.2) · Repo · Changelog

Release Notes

Too many releases to show here. View the full release notes.

Commits

See the full diff on Github. The new version differs by 6 commits:

↗️ @​jest/console (indirect, 28.1.3 → 30.1.2) · Repo · Changelog

Release Notes

Too many releases to show here. View the full release notes.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ @​jest/core (indirect, 28.1.3 → 30.1.3) · Repo · Changelog

Release Notes

Too many releases to show here. View the full release notes.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ @​jest/environment (indirect, 28.1.3 → 30.1.2) · Repo · Changelog

Release Notes

Too many releases to show here. View the full release notes.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ @​jest/fake-timers (indirect, 28.1.3 → 30.1.2) · Repo · Changelog

Release Notes

30.1.1

Fixes

  • [jest-snapshot-utils] Fix deprecated goo.gl snapshot warning not handling Windows end-of-line sequences (#15800)

30.1.0

Features

  • [jest-leak-detector] Configurable GC aggressiveness regarding to V8 heap snapshot generation (#15793)
  • [jest-runtime] Reduce redundant ReferenceError messages
  • [jest-core] Include test modules that failed to load when --onlyFailures is active

Fixes

  • `[jest-snapshot-utils] Fix deprecated goo.gl snapshot guide link not getting replaced with fully canonical URL (#15787)
  • [jest-circus] Fix it.concurrent not working with describe.skip (#15765)
  • [jest-snapshot] Fix mangled inline snapshot updates when used with Prettier 3 and CRLF line endings
  • [jest-runtime] Importing from @jest/globals in more than one file no longer breaks relative paths (#15772)

Chore

  • [expect] Update docblock for toContain() to display info on substring check (#15789)

30.0.5 (from changelog)

Features

  • [jest-config] Allow testMatch to take a string value
  • [jest-worker] Let workerIdleMemoryLimit accept 0 to always restart worker child processes

Fixes

  • [expect] Fix bigint error (#15702)

30.0.4 (from changelog)

Features

  • [expect] The Inverse type is now exported (#15714)
  • [expect] feat: support async functions in toBe (#15704)

Fixes

  • [jest] jest --onlyFailures --listTests now correctly lists only failed tests (#15700)
  • [jest-snapshot] Handle line endings in snapshots (#15708)

30.0.2

What's Changed

Fixes

  • [jest-matcher-utils] Make 'deepCyclicCopyObject' safer by setting descriptors to a null-prototype object (#15689)
  • [jest-util] Make garbage collection protection property writable (#15689)

Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md

30.0.1

What's Changed

Features

  • [jest-resolver] Implement the defaultAsyncResolver (#15679)

Fixes

  • [jest-resolver] Resolve builtin modules correctly (#15683)
  • [jest-environment-node, jest-util] Avoid setting globals cleanup protection symbol when feature is off (#15684)

Chore & Maintenance

  • [*] Remove and deprecate jest-repl package (#15673)
  • [jest-resolver] Replace custom isBuiltinModule with node's isBuiltin (#15685)

New Contributors

Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md

30.0.0

Today we are happy to announce the release of Jest 30. This release features a substantial number of changes, fixes, and improvements. While it is one of the largest major releases of Jest ever, we admit that three years for a major release is too long. In the future, we are aiming to make more frequent major releases to keep Jest great for the next decade.

If you want to skip all the news and just get going, run npm install jest@^30.0.0 and follow the migration guide: Upgrading from Jest 29 to 30.

Read the full blog post

Features

  • [*] Renamed globalsCleanupMode to globalsCleanup and --waitNextEventLoopTurnForUnhandledRejectionEvents to --waitForUnhandledRejections
  • [expect] Add ArrayOf asymmetric matcher for validating array elements. (#15567)
  • [babel-jest] Add option excludeJestPreset to allow opting out of babel-preset-jest (#15164)
  • [expect] Revert #15038 to fix expect(fn).toHaveBeenCalledWith(expect.objectContaining(...)) when there are multiple calls (#15508)
  • [jest-circus, jest-cli, jest-config] Add waitNextEventLoopTurnForUnhandledRejectionEvents flag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)
  • [jest-circus] Add a waitBeforeRetry option to jest.retryTimes (#14738)
  • [jest-circus] Add a retryImmediately option to jest.retryTimes (#14696)
  • [jest-circus, jest-jasmine2] Allow setupFilesAfterEnv to export an async function (#10962)
  • [jest-circus, jest-test-result] Add startedAt timestamp in TestCaseResultObject within onTestCaseResult (#15145)
  • [jest-cli] Export buildArgv (#15310)
  • [jest-config] [BREAKING] Add mts and cts to default moduleFileExtensions config (#14369)
  • [jest-config] [BREAKING] Update testMatch and testRegex default option for supporting mjs, cjs, mts, and cts (#14584)
  • [jest-config] Loads config file from provided path in package.json (#14044)
  • [jest-config] Allow loading jest.config.cts files (#14070)
  • [jest-config] Show rootDir in error message when a preset fails to load (#15194)
  • [jest-config] Support loading TS config files using esbuild-register via docblock loader (#15190)
  • [jest-config] Allow passing TS config loader options via docblock comment (#15234)
  • [jest-config] If Node is running with type stripping enabled, do not require a TS loader (#15480)
  • [@jest/core] Group together open handles with the same stack trace (#13417, & #14789)
  • [@jest/core] Add perfStats to surface test setup overhead (#14622)
  • [@jest/core] [BREAKING] Changed --filter to accept an object with shape { filtered: Array<string> } to match documentation (#13319)
  • [@jest/core] Support --outputFile option for --listTests (#14980)
  • [@jest/core] Stringify Errors properly with --json flag (#15329)
  • [@jest/core, @jest/test-sequencer] [BREAKING] Exposes globalConfig & contexts to TestSequencer (#14535, & #14543)
  • [jest-each] Introduce %$ option to add number of the test to its title (#14710)
  • [@jest/environment] [BREAKING] Remove deprecated jest.genMockFromModule() (#15042)
  • [@jest/environment] [BREAKING] Remove unnecessary defensive code (#15045)
  • [jest-environment-jsdom] [BREAKING] Upgrade JSDOM to v22 (#13825)
  • [@jest/environment-jsdom-abstract] Introduce new package which abstracts over the jsdom environment, allowing usage of custom versions of JSDOM (#14717)
  • [jest-environment-node] Update jest environment with dispose symbols Symbol (#14888 & #14909)
  • [expect, @jest/expect] [BREAKING] Add type inference for function parameters in CalledWith assertions (#15129)
  • [@jest/expect-utils] Properly compare all types of TypedArrays (#15178)
  • [@jest/fake-timers] [BREAKING] Upgrade @sinonjs/fake-timers to v13 (#14544 & #15470)
  • [@jest/fake-timers] Exposing new modern timers function advanceTimersToFrame() which advances all timers by the needed milliseconds to execute callbacks currently scheduled with requestAnimationFrame (#14598)
  • [jest-matcher-utils] Add SERIALIZABLE_PROPERTIES to allow custom serialization of objects (#14893)
  • [jest-mock] Add support for the Explicit Resource Management proposal to use the using keyword with jest.spyOn(object, methodName) (#14895)
  • [jest-reporters] Add support for DEC mode 2026 (#15008)
  • [jest-resolver] Support file:// URLs as paths (#15154)
  • [jest-resolve,jest-runtime,jest-resolve-dependencies] Pass the conditions when resolving stub modules (#15489)
  • [jest-runtime] Exposing new modern timers function jest.advanceTimersToFrame() from @jest/fake-timers (#14598)
  • [jest-runtime] Support import.meta.filename and import.meta.dirname (available from Node 20.11) (#14854)
  • [jest-runtime] Support import.meta.resolve (#14930)
  • [jest-runtime] [BREAKING] Make it mandatory to pass globalConfig to the Runtime constructor (#15044)
  • [jest-runtime] Add unstable_unmockModule (#15080)
  • [jest-runtime] Add onGenerateMock transformer callback for auto generated callbacks (#15433 & #15482)
  • [jest-runtime] [BREAKING] Use vm.compileFunction over vm.Script (#15461)
  • [@jest/schemas] Upgrade @sinclair/typebox to v0.34 (#15450)
  • [@jest/types] test.each(): Accept a readonly (as const) table properly (#14565)
  • [@jest/types] Improve argument type inference passed to test and describe callback functions from each tables (#14920)
  • [jest-snapshot] [BREAKING] Add support for Error causes in snapshots (#13965)
  • [jest-snapshot] Support Prettier 3 (#14566)
  • [@jest/util-snapshot] Extract utils used by tooling from jest-snapshot into its own package (#15095)
  • [pretty-format] [BREAKING] Do not render empty string children ('') in React plugin (#14470)

Fixes

  • [expect] Show AggregateError to display (#15346)
  • [*] Replace exit with exit-x (#15399)
  • [babel-plugin-jest-hoist] Use denylist instead of the deprecated blacklist for Babel 8 support (#14109)
  • [babel-plugin-jest-hoist] Do not rely on buggy Babel behaviour (#15415)
  • [expect] Check error instance type for toThrow/toThrowError (#14576)
  • [expect] Improve diff for failing expect.objectContaining (#15038)
  • [expect] Use Array.isArray to check if an array is an Array (#15101)
  • [expect] Fix Error cause assertion errors (#15339)
  • [jest-changed-files] Print underlying errors when VCS commands fail (#15052)
  • [jest-changed-files] Abort sl root call if output resembles a steam locomotive (#15053)
  • [jest-circus] [BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)
  • [jest-circus] Replace recursive makeTestResults implementation with iterative one (#14760)
  • [jest-circus] Omit expect.hasAssertions() errors if a test already has errors (#14866)
  • [jest-circus, jest-expect, jest-snapshot] Pass test.failing tests when containing failing snapshot matchers (#14313)
  • [jest-circus] Concurrent tests now emit jest circus events at the correct point and in the expected order. (#15381)
  • [jest-cli] [BREAKING] Validate CLI flags that require arguments receives them (#14783)
  • [jest-config] Make sure to respect runInBand option (#14578)
  • [jest-config] Support testTimeout in project config (#14697)
  • [jest-config] Support coverageReporters in project config (#14697)
  • [jest-config] Allow reporters in project config (#14768)
  • [jest-config] Allow Node16/NodeNext/Bundler moduleResolution in project's tsconfig (#14739)
  • [@jest/create-cache-key-function] Correct the return type of createCacheKey (#15159)
  • [jest-each] Allow $keypath templates with null or undefined values (#14831)
  • [@jest/expect-utils] Fix comparison of DataView (#14408)
  • [@jest/expect-utils] [BREAKING] exclude non-enumerable in object matching (#14670)
  • [@jest/expect-utils] Fix comparison of URL (#14672)
  • [@jest/expect-utils] Check Symbol properties in equality (#14688)
  • [@jest/expect-utils] Catch circular references within arrays when matching objects (#14894)
  • [@jest/expect-utils] Fix not addressing to Sets and Maps as objects without keys (#14873)
  • [jest-haste-map] Fix errors or clobbering with multiple hasteImplModulePaths (#15522)
  • [jest-leak-detector] Make leak-detector more aggressive when running GC (#14526)
  • [jest-runtime] Properly handle re-exported native modules in ESM via CJS (#14589)
  • [jest-runtime] Refactor _importCoreModel so required core module is consistent if modified while loading (#15077)
  • [jest-schemas, jest-types] [BREAKING] Fix type of testFailureExitCode config option(#15232)
  • [jest-util] Make sure isInteractive works in a browser (#14552)
  • [pretty-format] [BREAKING] Print ArrayBuffer and DataView correctly (#14290)
  • [pretty-format] Fixed a bug where "anonymous custom elements" were not being printed as expected. (#15138)
  • [jest-cli] When specifying paths on the command line, only match against the relative paths of the test files (#12519)
    • [BREAKING] Changes testPathPattern configuration option to testPathPatterns, which now takes a list of patterns instead of the regex.
    • [BREAKING] --testPathPattern is now --testPathPatterns
    • [BREAKING] Specifying testPathPatterns when programmatically calling watch must be specified as new TestPathPatterns(patterns), where TestPathPatterns can be imported from @jest/pattern
  • [jest-reporters, jest-runner] Unhandled errors without stack get correctly logged to console (#14619)
  • [jest-util] Always load mjs files with import (#15447)
  • [jest-worker] Properly handle a circular reference error when worker tries to send an assertion fails where either the expected or actual value is circular (#15191)
  • [jest-worker] Properly handle a BigInt when worker tries to send an assertion fails where either the expected or actual value is BigInt (#15191)
  • [expect] Resolve issue where ObjectContaining matched non-object values. ([#15463])(#15463).
    • Adds a conditional/check to ensure the argument passed to expect is an object.
    • Add unit tests for new ObjectContaining behavior.
    • Remove invalid/wrong test case assertions for ObjectContaining.
  • [jest-worker] Addresses incorrect state on exit (#15610)

Performance

  • [*] [BREAKING] Bundle all of Jest's modules into index.js (#12348, #14550 & #14661)
  • [jest-haste-map] Only spawn one process to check for watchman installation (#14826)
  • [jest-runner] Better cleanup source-map-support after test to resolve (minor) memory leak (#15233)
  • [jest-circus, jest-environment-node, jest-repl, jest-runner, jest-util] Cleanup global variables on environment teardown to reduce memory leaks (#15215 & #15636 & #15643)

Chore & Maintenance

  • [jest-environment-jsdom, jest-environment-jsdom-abstract] Increased version of jsdom to ^26.0.0 (#15325CVE-2024-37890)
  • [*] Increase version of micromatch to ^4.0.7 (#15082)
  • [*] [BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)
  • [*] [BREAKING] Drop support for typescript@4.3, minimum version is now 5.4 (#14542, #15621)
  • [*] Depend on exact versions of monorepo dependencies instead of ^ range (#14553)
  • [*] [BREAKING] Add ESM wrapper for all of Jest's modules (#14661)
  • [*] [BREAKING] Upgrade to glob@10 (#14509)
  • [*] Use TypeError over Error where appropriate (#14799)
  • [docs] Fix typos in CHANGELOG.md and packages/jest-validate/README.md (#14640)
  • [docs] Don't use alias matchers in docs (#14631)
  • [babel-jest, babel-preset-jest] [BREAKING] Increase peer dependency of @babel/core to ^7.11 (#14109)
  • [babel-jest, @jest/transform] Update babel-plugin-istanbul to v6 (#15156)
  • [babel-plugin-jest-hoist] Move unnecessary dependencies to devDependencies (#15010)
  • [expect] [BREAKING] Remove .toBeCalled(), .toBeCalledTimes(), .toBeCalledWith(), .lastCalledWith(), .nthCalledWith(), .toReturn(), .toReturnTimes(), .toReturnWith(), .lastReturnedWith(), .nthReturnedWith() and .toThrowError() matcher aliases (#14632)
  • [jest-cli, jest-config, @jest/types] [BREAKING] Remove deprecated --init argument (#14490)
  • [jest-config, @jest/core, jest-util] Upgrade ci-info (#14655)
  • [jest-mock] [BREAKING] Remove MockFunctionMetadataType, MockFunctionMetadata and SpyInstance types (#14621)
  • [@jest/reporters] Upgrade istanbul-lib-source-maps (#14924)
  • [jest-schemas] Upgrade @sinclair/typebox (#14775)
  • [jest-transform] Upgrade write-file-atomic (#14274)
  • [jest-util] Upgrade picomatch to v4 (#14653 & #14885)
  • [docs] Append to NODE_OPTIONS, not overwrite ([#14730](https://github.com/jestjs/jest/pull/14730))
  • [docs] Updated .toHaveBeenCalled() documentation to correctly reflect its functionality (#14842)
  • [docs] Link NestJS documentation on testing with Jest (#14940)
  • [docs] Revised documentation for .toHaveBeenCalled() to accurately depict its functionality. (#14853)
  • [docs] Removed ExpressJS reference link from documentation due to dead link (#15270)
  • [docs] Correct broken links in docs (#15359)

See the CHANGELOG.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ @​jest/globals (indirect, 28.1.3 → 30.1.2) · Repo · Changelog

Release Notes

Too many releases to show here. View the full release notes.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ @​jest/reporters (indirect, 28.1.3 → 30.1.3) · Repo · Changelog

Release Notes

Too many releases to show here. View the full release notes.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ @​jest/schemas (indirect, 28.1.3 → 30.0.5) · Repo · Changelog

Release Notes

30.0.5 (from changelog)

Features

  • [jest-config] Allow testMatch to take a string value
  • [jest-worker] Let workerIdleMemoryLimit accept 0 to always restart worker child processes

Fixes

  • [expect] Fix bigint error (#15702)

30.0.1

What's Changed

Features

  • [jest-resolver] Implement the defaultAsyncResolver (#15679)

Fixes

  • [jest-resolver] Resolve builtin modules correctly (#15683)
  • [jest-environment-node, jest-util] Avoid setting globals cleanup protection symbol when feature is off (#15684)

Chore & Maintenance

  • [*] Remove and deprecate jest-repl package (#15673)
  • [jest-resolver] Replace custom isBuiltinModule with node's isBuiltin (#15685)

New Contributors

Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md

30.0.0

Today we are happy to announce the release of Jest 30. This release features a substantial number of changes, fixes, and improvements. While it is one of the largest major releases of Jest ever, we admit that three years for a major release is too long. In the future, we are aiming to make more frequent major releases to keep Jest great for the next decade.

If you want to skip all the news and just get going, run npm install jest@^30.0.0 and follow the migration guide: Upgrading from Jest 29 to 30.

Read the full blog post

Features

  • [*] Renamed globalsCleanupMode to globalsCleanup and --waitNextEventLoopTurnForUnhandledRejectionEvents to --waitForUnhandledRejections
  • [expect] Add ArrayOf asymmetric matcher for validating array elements. (#15567)
  • [babel-jest] Add option excludeJestPreset to allow opting out of babel-preset-jest (#15164)
  • [expect] Revert #15038 to fix expect(fn).toHaveBeenCalledWith(expect.objectContaining(...)) when there are multiple calls (#15508)
  • [jest-circus, jest-cli, jest-config] Add waitNextEventLoopTurnForUnhandledRejectionEvents flag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)
  • [jest-circus] Add a waitBeforeRetry option to jest.retryTimes (#14738)
  • [jest-circus] Add a retryImmediately option to jest.retryTimes (#14696)
  • [jest-circus, jest-jasmine2] Allow setupFilesAfterEnv to export an async function (#10962)
  • [jest-circus, jest-test-result] Add startedAt timestamp in TestCaseResultObject within onTestCaseResult (#15145)
  • [jest-cli] Export buildArgv (#15310)
  • [jest-config] [BREAKING] Add mts and cts to default moduleFileExtensions config (#14369)
  • [jest-config] [BREAKING] Update testMatch and testRegex default option for supporting mjs, cjs, mts, and cts (#14584)
  • [jest-config] Loads config file from provided path in package.json (#14044)
  • [jest-config] Allow loading jest.config.cts files (#14070)
  • [jest-config] Show rootDir in error message when a preset fails to load (#15194)
  • [jest-config] Support loading TS config files using esbuild-register via docblock loader (#15190)
  • [jest-config] Allow passing TS config loader options via docblock comment (#15234)
  • [jest-config] If Node is running with type stripping enabled, do not require a TS loader (#15480)
  • [@jest/core] Group together open handles with the same stack trace (#13417, & #14789)
  • [@jest/core] Add perfStats to surface test setup overhead (#14622)
  • [@jest/core] [BREAKING] Changed --filter to accept an object with shape { filtered: Array<string> } to match documentation (#13319)
  • [@jest/core] Support --outputFile option for --listTests (#14980)
  • [@jest/core] Stringify Errors properly with --json flag (#15329)
  • [@jest/core, @jest/test-sequencer] [BREAKING] Exposes globalConfig & contexts to TestSequencer (#14535, & #14543)
  • [jest-each] Introduce %$ option to add number of the test to its title (#14710)
  • [@jest/environment] [BREAKING] Remove deprecated jest.genMockFromModule() (#15042)
  • [@jest/environment] [BREAKING] Remove unnecessary defensive code (#15045)
  • [jest-environment-jsdom] [BREAKING] Upgrade JSDOM to v22 (#13825)
  • [@jest/environment-jsdom-abstract] Introduce new package which abstracts over the jsdom environment, allowing usage of custom versions of JSDOM (#14717)
  • [jest-environment-node] Update jest environment with dispose symbols Symbol (#14888 & #14909)
  • [expect, @jest/expect] [BREAKING] Add type inference for function parameters in CalledWith assertions (#15129)
  • [@jest/expect-utils] Properly compare all types of TypedArrays (#15178)
  • [@jest/fake-timers] [BREAKING] Upgrade @sinonjs/fake-timers to v13 (#14544 & #15470)
  • [@jest/fake-timers] Exposing new modern timers function advanceTimersToFrame() which advances all timers by the needed milliseconds to execute callbacks currently scheduled with requestAnimationFrame (#14598)
  • [jest-matcher-utils] Add SERIALIZABLE_PROPERTIES to allow custom serialization of objects (#14893)
  • [jest-mock] Add support for the Explicit Resource Management proposal to use the using keyword with jest.spyOn(object, methodName) (#14895)
  • [jest-reporters] Add support for DEC mode 2026 (#15008)
  • [jest-resolver] Support file:// URLs as paths (#15154)
  • [jest-resolve,jest-runtime,jest-resolve-dependencies] Pass the conditions when resolving stub modules (#15489)
  • [jest-runtime] Exposing new modern timers function jest.advanceTimersToFrame() from @jest/fake-timers (#14598)
  • [jest-runtime] Support import.meta.filename and import.meta.dirname (available from Node 20.11) (#14854)
  • [jest-runtime] Support import.meta.resolve (#14930)
  • [jest-runtime] [BREAKING] Make it mandatory to pass globalConfig to the Runtime constructor (#15044)
  • [jest-runtime] Add unstable_unmockModule (#15080)
  • [jest-runtime] Add onGenerateMock transformer callback for auto generated callbacks (#15433 & #15482)
  • [jest-runtime] [BREAKING] Use vm.compileFunction over vm.Script (#15461)
  • [@jest/schemas] Upgrade @sinclair/typebox to v0.34 (#15450)
  • [@jest/types] test.each(): Accept a readonly (as const) table properly (#14565)
  • [@jest/types] Improve argument type inference passed to test and describe callback functions from each tables (#14920)
  • [jest-snapshot] [BREAKING] Add support for Error causes in snapshots (#13965)
  • [jest-snapshot] Support Prettier 3 (#14566)
  • [@jest/util-snapshot] Extract utils used by tooling from jest-snapshot into its own package (#15095)
  • [pretty-format] [BREAKING] Do not render empty string children ('') in React plugin (#14470)

Fixes

  • [expect] Show AggregateError to display (#15346)
  • [*] Replace exit with exit-x (#15399)
  • [babel-plugin-jest-hoist] Use denylist instead of the deprecated blacklist for Babel 8 support (#14109)
  • [babel-plugin-jest-hoist] Do not rely on buggy Babel behaviour (#15415)
  • [expect] Check error instance type for toThrow/toThrowError (#14576)
  • [expect] Improve diff for failing expect.objectContaining (#15038)
  • [expect] Use Array.isArray to check if an array is an Array (#15101)
  • [expect] Fix Error cause assertion errors (#15339)
  • [jest-changed-files] Print underlying errors when VCS commands fail (#15052)
  • [jest-changed-files] Abort sl root call if output resembles a steam locomotive (#15053)
  • [jest-circus] [BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)
  • [jest-circus] Replace recursive makeTestResults implementation with iterative one (#14760)
  • [jest-circus] Omit expect.hasAssertions() errors if a test already has errors (#14866)
  • [jest-circus, jest-expect, jest-snapshot] Pass test.failing tests when containing failing snapshot matchers (#14313)
  • [jest-circus] Concurrent tests now emit jest circus events at the correct point and in the expected order. (#15381)
  • [jest-cli] [BREAKING] Validate CLI flags that require arguments receives them (#14783)
  • [jest-config] Make sure to respect runInBand option (#14578)
  • [jest-config] Support testTimeout in project config (#14697)
  • [jest-config] Support coverageReporters in project config (#14697)
  • [jest-config] Allow reporters in project config (#14768)
  • [jest-config] Allow Node16/NodeNext/Bundler moduleResolution in project's tsconfig (#14739)
  • [@jest/create-cache-key-function] Correct the return type of createCacheKey (#15159)
  • [jest-each] Allow $keypath templates with null or undefined values (#14831)
  • [@jest/expect-utils] Fix comparison of DataView (#14408)
  • [@jest/expect-utils] [BREAKING] exclude non-enumerable in object matching (#14670)
  • [@jest/expect-utils] Fix comparison of URL (#14672)
  • [@jest/expect-utils] Check Symbol properties in equality (#14688)
  • [@jest/expect-utils] Catch circular references within arrays when matching objects (#14894)
  • [@jest/expect-utils] Fix not addressing to Sets and Maps as objects without keys (#14873)
  • [jest-haste-map] Fix errors or clobbering with multiple hasteImplModulePaths (#15522)
  • [jest-leak-detector] Make leak-detector more aggressive when running GC (#14526)
  • [jest-runtime] Properly handle re-exported native modules in ESM via CJS (#14589)
  • [jest-runtime] Refactor _importCoreModel so required core module is consistent if modified while loading (#15077)
  • [jest-schemas, jest-types] [BREAKING] Fix type of testFailureExitCode config option(#15232)
  • [jest-util] Make sure isInteractive works in a browser (#14552)
  • [pretty-format] [BREAKING] Print ArrayBuffer and DataView correctly (#14290)
  • [pretty-format] Fixed a bug where "anonymous custom elements" were not being printed as expected. (#15138)
  • [jest-cli] When specifying paths on the command line, only match against the relative paths of the test files (#12519)
    • [BREAKING] Changes testPathPattern configuration option to testPathPatterns, which now takes a list of patterns instead of the regex.
    • [BREAKING] --testPathPattern is now --testPathPatterns
    • [BREAKING] Specifying testPathPatterns when programmatically calling watch must be specified as new TestPathPatterns(patterns), where TestPathPatterns can be imported from @jest/pattern
  • [jest-reporters, jest-runner] Unhandled errors without stack get correctly logged to console (#14619)
  • [jest-util] Always load mjs files with import (#15447)
  • [jest-worker] Properly handle a circular reference error when worker tries to send an assertion fails where either the expected or actual value is circular (#15191)
  • [jest-worker] Properly handle a BigInt when worker tries to send an assertion fails where either the expected or actual value is BigInt (#15191)
  • [expect] Resolve issue where ObjectContaining matched non-object values. ([#15463])(#15463).
    • Adds a conditional/check to ensure the argument passed to expect is an object.
    • Add unit tests for new ObjectContaining behavior.
    • Remove invalid/wrong test case assertions for ObjectContaining.
  • [jest-worker] Addresses incorrect state on exit (#15610)

Performance

  • [*] [BREAKING] Bundle all of Jest's modules into index.js (#12348, #14550 & #14661)
  • [jest-haste-map] Only spawn one process to check for watchman installation (#14826)
  • [jest-runner] Better cleanup source-map-support after test to resolve (minor) memory leak (#15233)
  • [jest-circus, jest-environment-node, jest-repl, jest-runner, jest-util] Cleanup global variables on environment teardown to reduce memory leaks (#15215 & #15636 & #15643)

Chore & Maintenance

  • [jest-environment-jsdom, jest-environment-jsdom-abstract] Increased version of jsdom to ^26.0.0 (#15325CVE-2024-37890)
  • [*] Increase version of micromatch to ^4.0.7 (#15082)
  • [*] [BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)
  • [*] [BREAKING] Drop support for typescript@4.3, minimum version is now 5.4 (#14542, #15621)
  • [*] Depend on exact versions of monorepo dependencies instead of ^ range (#14553)
  • [*] [BREAKING] Add ESM wrapper for all of Jest's modules (#14661)
  • [*] [BREAKING] Upgrade to glob@10 (#14509)
  • [*] Use TypeError over Error where appropriate (#14799)
  • [docs] Fix typos in CHANGELOG.md and packages/jest-validate/README.md (#14640)
  • [docs] Don't use alias matchers in docs (#14631)
  • [babel-jest, babel-preset-jest] [BREAKING] Increase peer dependency of @babel/core to ^7.11 (#14109)
  • [babel-jest, @jest/transform] Update babel-plugin-istanbul to v6 (#15156)
  • [babel-plugin-jest-hoist] Move unnecessary dependencies to devDependencies (#15010)
  • [expect] [BREAKING] Remove .toBeCalled(), .toBeCalledTimes(), .toBeCalledWith(), .lastCalledWith(), .nthCalledWith(), .toReturn(), .toReturnTimes(), .toReturnWith(), .lastReturnedWith(), .nthReturnedWith() and .toThrowError() matcher aliases (#14632)
  • [jest-cli, jest-config, @jest/types] [BREAKING] Remove deprecated --init argument (#14490)
  • [jest-config, @jest/core, jest-util] Upgrade ci-info (#14655)
  • [jest-mock] [BREAKING] Remove MockFunctionMetadataType, MockFunctionMetadata and SpyInstance types (#14621)
  • [@jest/reporters] Upgrade istanbul-lib-source-maps (#14924)
  • [jest-schemas] Upgrade @sinclair/typebox (#14775)
  • [jest-transform] Upgrade write-file-atomic (#14274)
  • [jest-util] Upgrade picomatch to v4 (#14653 & #14885)
  • [docs] Append to NODE_OPTIONS, not overwrite ([#14730](https://github.com/jestjs/jest/pull/14730))
  • [docs] Updated .toHaveBeenCalled() documentation to correctly reflect its functionality (#14842)
  • [docs] Link NestJS documentation on testing with Jest (#14940)
  • [docs] Revised documentation for .toHaveBeenCalled() to accurately depict its functionality. (#14853)
  • [docs] Removed ExpressJS reference link from documentation due to dead link (#15270)
  • [docs] Correct broken links in docs (#15359)

See the CHANGELOG.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ @​jest/source-map (indirect, 28.1.2 → 30.0.1) · Repo · Changelog

Release Notes

30.0.1

What's Changed

Features

  • [jest-resolver] Implement the defaultAsyncResolver (#15679)

Fixes

  • [jest-resolver] Resolve builtin modules correctly (#15683)
  • [jest-environment-node, jest-util] Avoid setting globals cleanup protection symbol when feature is off (#15684)

Chore & Maintenance

  • [*] Remove and deprecate jest-repl package (#15673)
  • [jest-resolver] Replace custom isBuiltinModule with node's isBuiltin (#15685)

New Contributors

Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md

30.0.0

Today we are happy to announce the release of Jest 30. This release features a substantial number of changes, fixes, and improvements. While it is one of the largest major releases of Jest ever, we admit that three years for a major release is too long. In the future, we are aiming to make more frequent major releases to keep Jest great for the next decade.

If you want to skip all the news and just get going, run npm install jest@^30.0.0 and follow the migration guide: Upgrading from Jest 29 to 30.

Read the full blog post

Features

  • [*] Renamed globalsCleanupMode to globalsCleanup and --waitNextEventLoopTurnForUnhandledRejectionEvents to --waitForUnhandledRejections
  • [expect] Add ArrayOf asymmetric matcher for validating array elements. (#15567)
  • [babel-jest] Add option excludeJestPreset to allow opting out of babel-preset-jest (#15164)
  • [expect] Revert #15038 to fix expect(fn).toHaveBeenCalledWith(expect.objectContaining(...)) when there are multiple calls (#15508)
  • [jest-circus, jest-cli, jest-config] Add waitNextEventLoopTurnForUnhandledRejectionEvents flag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)
  • [jest-circus] Add a waitBeforeRetry option to jest.retryTimes (#14738)
  • [jest-circus] Add a retryImmediately option to jest.retryTimes (#14696)
  • [jest-circus, jest-jasmine2] Allow setupFilesAfterEnv to export an async function (#10962)
  • [jest-circus, jest-test-result] Add startedAt timestamp in TestCaseResultObject within onTestCaseResult (#15145)
  • [jest-cli] Export buildArgv (#15310)
  • [jest-config] [BREAKING] Add mts and cts to default moduleFileExtensions config (#14369)
  • [jest-config] [BREAKING] Update testMatch and testRegex default option for supporting mjs, cjs, mts, and cts (#14584)
  • [jest-config] Loads config file from provided path in package.json (#14044)
  • [jest-config] Allow loading jest.config.cts files (#14070)
  • [jest-config] Show rootDir in error message when a preset fails to load (#15194)
  • [jest-config] Support loading TS config files using esbuild-register via docblock loader (#15190)
  • [jest-config] Allow passing TS config loader options via docblock comment (#15234)
  • [jest-config] If Node is running with type stripping enabled, do not require a TS loader (#15480)
  • [@jest/core] Group together open handles with the same stack trace (#13417, & #14789)
  • [@jest/core] Add perfStats to surface test setup overhead (#14622)
  • [@jest/core] [BREAKING] Changed --filter to accept an object with shape { filtered: Array<string> } to match documentation (#13319)
  • [@jest/core] Support --outputFile option for --listTests (#14980)
  • [@jest/core] Stringify Errors properly with --json flag (#15329)
  • [@jest/core, @jest/test-sequencer] [BREAKING] Exposes globalConfig & contexts to TestSequencer (#14535, & #14543)
  • [jest-each] Introduce %$ option to add number of the test to its title (#14710)
  • [@jest/environment] [BREAKING] Remove deprecated jest.genMockFromModule() (#15042)
  • [@jest/environment] [BREAKING] Remove unnecessary defensive code (#15045)
  • [jest-environment-jsdom] [BREAKING] Upgrade JSDOM to v22 (#13825)
  • [@jest/environment-jsdom-abstract] Introduce new package which abstracts over the jsdom environment, allowing usage of custom versions of JSDOM (#14717)
  • [jest-environment-node] Update jest environment with dispose symbols Symbol (#14888 & #14909)
  • [expect, @jest/expect] [BREAKING] Add type inference for function parameters in CalledWith assertions (#15129)
  • [@jest/expect-utils] Properly compare all types of TypedArrays (#15178)
  • [@jest/fake-timers] [BREAKING] Upgrade @sinonjs/fake-timers to v13 (#14544 & #15470)
  • [@jest/fake-timers] Exposing new modern timers function advanceTimersToFrame() which advances all timers by the needed milliseconds to execute callbacks currently scheduled with requestAnimationFrame (#14598)
  • [jest-matcher-utils] Add SERIALIZABLE_PROPERTIES to allow custom serialization of objects (#14893)
  • [jest-mock] Add support for the Explicit Resource Management proposal to use the using keyword with jest.spyOn(object, methodName) (#14895)
  • [jest-reporters] Add support for DEC mode 2026 (#15008)
  • [jest-resolver] Support file:// URLs as paths (#15154)
  • [jest-resolve,jest-runtime,jest-resolve-dependencies] Pass the conditions when resolving stub modules (#15489)
  • [jest-runtime] Exposing new modern timers function jest.advanceTimersToFrame() from @jest/fake-timers (#14598)
  • [jest-runtime] Support import.meta.filename and import.meta.dirname (available from Node 20.11) (#14854)
  • [jest-runtime] Support import.meta.resolve (#14930)
  • [jest-runtime] [BREAKING] Make it mandatory to pass globalConfig to the Runtime constructor (#15044)
  • [jest-runtime] Add unstable_unmockModule (#15080)
  • [jest-runtime] Add onGenerateMock transformer callback for auto generated callbacks (#15433 & #15482)
  • [jest-runtime] [BREAKING] Use vm.compileFunction over vm.Script (#15461)
  • [@jest/schemas] Upgrade @sinclair/typebox to v0.34 (#15450)
  • [@jest/types] test.each(): Accept a readonly (as const) table properly (#14565)
  • [@jest/types] Improve argument type inference passed to test and describe callback functions from each tables (#14920)
  • [jest-snapshot] [BREAKING] Add support for Error causes in snapshots (#13965)
  • [jest-snapshot] Support Prettier 3 (#14566)
  • [@jest/util-snapshot] Extract utils used by tooling from jest-snapshot into its own package (#15095)
  • [pretty-format] [BREAKING] Do not render empty string children ('') in React plugin (#14470)

Fixes

  • [expect] Show AggregateError to display (#15346)
  • [*] Replace exit with exit-x (#15399)
  • [babel-plugin-jest-hoist] Use denylist instead of the deprecated blacklist for Babel 8 support (#14109)
  • [babel-plugin-jest-hoist] Do not rely on buggy Babel behaviour (#15415)
  • [expect] Check error instance type for toThrow/toThrowError (#14576)
  • [expect] Improve diff for failing expect.objectContaining (#15038)
  • [expect] Use Array.isArray to check if an array is an Array (#15101)
  • [expect] Fix Error cause assertion errors (#15339)
  • [jest-changed-files] Print underlying errors when VCS commands fail (#15052)
  • [jest-changed-files] Abort sl root call if output resembles a steam locomotive (#15053)
  • [jest-circus] [BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)
  • [jest-circus] Replace recursive makeTestResults implementation with iterative one (#14760)
  • [jest-circus] Omit expect.hasAssertions() errors if a test already has errors (#14866)
  • [jest-circus, jest-expect, jest-snapshot] Pass test.failing tests when containing failing snapshot matchers (#14313)
  • [jest-circus] Concurrent tests now emit jest circus events at the correct point and in the expected order. (#15381)
  • [jest-cli] [BREAKING] Validate CLI flags that require arguments receives them (#14783)
  • [jest-config] Make sure to respect runInBand option (#14578)
  • [jest-config] Support testTimeout in project config (#14697)
  • [jest-config] Support coverageReporters in project config (#14697)
  • [jest-config] Allow reporters in project config (#14768)
  • [jest-config] Allow Node16/NodeNext/Bundler moduleResolution in project's tsconfig (#14739)
  • [@jest/create-cache-key-function] Correct the return type of createCacheKey (#15159)
  • [jest-each] Allow $keypath templates with null or undefined values (#14831)
  • [@jest/expect-utils] Fix comparison of DataView (#14408)
  • [@jest/expect-utils] [BREAKING] exclude non-enumerable in object matching (#14670)
  • [@jest/expect-utils] Fix comparison of URL (#14672)
  • [@jest/expect-utils] Check Symbol properties in equality (#14688)
  • [@jest/expect-utils] Catch circular references within arrays when matching objects (#14894)
  • [@jest/expect-utils] Fix not addressing to Sets and Maps as objects without keys (#14873)
  • [jest-haste-map] Fix errors or clobbering with multiple hasteImplModulePaths (#15522)
  • [jest-leak-detector] Make leak-detector more aggressive when running GC (#14526)
  • [jest-runtime] Properly handle re-exported native modules in ESM via CJS (#14589)
  • [jest-runtime] Refactor _importCoreModel so required core module is consistent if modified while loading (#15077)
  • [jest-schemas, jest-types] [BREAKING] Fix type of testFailureExitCode config option(#15232)
  • [jest-util] Make sure isInteractive works in a browser (#14552)
  • [pretty-format] [BREAKING] Print ArrayBuffer and DataView correctly (#14290)
  • [pretty-format] Fixed a bug where "anonymous custom elements" were not being printed as expected. (#15138)
  • [jest-cli] When specifying paths on the command line, only match against the relative paths of the test files (#12519)
    • [BREAKING] Changes testPathPattern configuration option to testPathPatterns, which now takes a list of patterns instead of the regex.
    • [BREAKING] --testPathPattern is now --testPathPatterns
    • [BREAKING] Specifying testPathPatterns when programmatically calling watch must be specified as new TestPathPatterns(patterns), where TestPathPatterns can be imported from @jest/pattern
  • [jest-reporters, jest-runner] Unhandled errors without stack get correctly logged to console (#14619)
  • [jest-util] Always load mjs files with import (#15447)
  • [jest-worker] Properly handle a circular reference error when worker tries to send an assertion fails where either the expected or actual value is circular (#15191)
  • [jest-worker] Properly handle a BigInt when worker tries to send an assertion fails where either the expected or actual value is BigInt (#15191)
  • [expect] Resolve issue where ObjectContaining matched non-object values. ([#15463])(#15463).
    • Adds a conditional/check to ensure the argument passed to expect is an object.
    • Add unit tests for new ObjectContaining behavior.
    • Remove invalid/wrong test case assertions for ObjectContaining.
  • [jest-worker] Addresses incorrect state on exit (#15610)

Performance

  • [*] [BREAKING] Bundle all of Jest's modules into index.js (#12348, #14550 & #14661)
  • [jest-haste-map] Only spawn one process to check for watchman installation (#14826)
  • [jest-runner] Better cleanup source-map-support after test to resolve (minor) memory leak (#15233)
  • [jest-circus, jest-environment-node, jest-repl, jest-runner, jest-util] Cleanup global variables on environment teardown to reduce memory leaks (#15215 & #15636 & #15643)

Chore & Maintenance

  • [jest-environment-jsdom, jest-environment-jsdom-abstract] Increased version of jsdom to ^26.0.0 (#15325CVE-2024-37890)
  • [*] Increase version of micromatch to ^4.0.7 (#15082)
  • [*] [BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)
  • [*] [BREAKING] Drop support for typescript@4.3, minimum version is now 5.4 (#14542, #15621)
  • [*] Depend on exact versions of monorepo dependencies instead of ^ range (#14553)
  • [*] [BREAKING] Add ESM wrapper for all of Jest's modules (#14661)
  • [*] [BREAKING] Upgrade to glob@10 (#14509)
  • [*] Use TypeError over Error where appropriate (#14799)
  • [docs] Fix typos in CHANGELOG.md and packages/jest-validate/README.md (#14640)
  • [docs] Don't use alias matchers in docs (#14631)
  • [babel-jest, babel-preset-jest] [BREAKING] Increase peer dependency of @babel/core to ^7.11 (#14109)
  • [babel-jest, @jest/transform] Update babel-plugin-istanbul to v6 (#15156)
  • [babel-plugin-jest-hoist] Move unnecessary dependencies to devDependencies (#15010)
  • [expect] [BREAKING] Remove .toBeCalled(), .toBeCalledTimes(), .toBeCalledWith(), .lastCalledWith(), .nthCalledWith(), .toReturn(), .toReturnTimes(), .toReturnWith(), .lastReturnedWith(), .nthReturnedWith() and .toThrowError() matcher aliases (#14632)
  • [jest-cli, jest-config, @jest/types] [BREAKING] Remove deprecated --init argument (#14490)
  • [jest-config, @jest/core, jest-util] Upgrade ci-info (#14655)
  • [jest-mock] [BREAKING] Remove MockFunctionMetadataType, MockFunctionMetadata and SpyInstance types (#14621)
  • [@jest/reporters] Upgrade istanbul-lib-source-maps (#14924)
  • [jest-schemas] Upgrade @sinclair/typebox (#14775)
  • [jest-transform] Upgrade write-file-atomic (#14274)
  • [jest-util] Upgrade picomatch to v4 (#14653 & #14885)
  • [docs] Append to NODE_OPTIONS, not overwrite ([#14730](https://github.com/jestjs/jest/pull/14730))
  • [docs] Updated .toHaveBeenCalled() documentation to correctly reflect its functionality (#14842)
  • [docs] Link NestJS documentation on testing with Jest (#14940)
  • [docs] Revised documentation for .toHaveBeenCalled() to accurately depict its functionality. (#14853)
  • [docs] Removed ExpressJS reference link from documentation due to dead link (#15270)
  • [docs] Correct broken links in docs (#15359)

See the CHANGELOG.

29.6.3

Fixes

  • [expect, @jest/expect-utils] ObjectContaining support symbol as key (#14414)
  • [expect] Remove @types/node from dependencies (#14385)
  • [jest-core] Use workers in watch mode by default to avoid crashes (#14059 & #14085).
  • [jest-reporters] Update istanbul-lib-instrument dependency to v6. (#14401)
  • [jest-mock] Revert #13692 as it was a breaking change (#14429)
  • [jest-mock] Revert #13866 as it was a breaking change (#14429)
  • [jest-mock] Revert #13867 as it was a breaking change (#14429)
  • [@jest/reporters] Marks Reporter's hooks as optional (#14433)
  • [jest-runtime] Fix dynamic ESM import module bug when loaded module through jest.isolateModulesAsync (#14397)

Chore & Maintenance

  • [jest-changed-files, jest-circus, jest-console, @jest/core, @jest/runtime, @jest/transform] Use invariant and notEmpty from jest-util rather than own internal (#14366)

New Contributors

Full Changelog: v29.6.2...v29.6.3

29.6.0

Features

  • [jest-circus, jest-snapshot] Add support for snapshot matchers in concurrent tests (#14139)
  • [jest-cli] Include type definitions to generated config files (#14078)
  • [jest-snapshot] Support arrays as property matchers (#14025)
  • [jest-core, jest-circus, jest-reporter, jest-runner] Added support for reporting about start individual test cases using jest-circus (#14174)

Fixes

  • [jest-circus] Prevent false test failures caused by promise rejections handled asynchronously (#14110)
  • [jest-config] Handle frozen config object (#14054)
  • [jest-config] Allow coverageDirectory and collectCoverageFrom in project config (#14180)
  • [jest-core] Always use workers in watch mode to avoid crashes (#14059).
  • [jest-environment-jsdom, jest-environment-node] Fix assignment of customExportConditions via testEnvironmentOptions when custom env subclass defines a default value (#13989)
  • [jest-matcher-utils] Fix copying value of inherited getters (#14007)
  • [jest-mock] Tweak typings to allow jest.replaceProperty() replace methods (#14008)
  • [jest-mock] Improve user input validation and error messages of spyOn and replaceProperty methods (#14087)
  • [jest-runtime] Bind jest.isolateModulesAsync to this (#14083)
  • [jest-runtime] Forward wrapperLength to the Script constructor as columnOffset for accurate debugging (#14148)
  • [jest-runtime] Guard _isMockFunction access with in (#14188)
  • [jest-snapshot] Fix a potential bug when not using prettier and improve performance (#14036)
  • [@jest/transform] Do not instrument .json modules (#14048)

Chore & Maintenance

  • [*] Update semver dependency to get vulnerability fix (#14262)
  • [docs] Updated documentation for the --runTestsByPath CLI command (#14004)
  • [docs] Updated documentation regarding the synchronous fallback when asynchronous code transforms are unavailable (#14056)
  • [docs] Update jest statistics of use and downloads in website Index.

New Contributors

Full Changelog: v29.5.0...v29.6.0

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ @​jest/test-sequencer (indirect, 28.1.3 → 30.1.3) · Repo · Changelog

Release Notes

Too many releases to show here. View the full release notes.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ @​jest/transform (indirect, 28.1.3 → 30.1.2) · Repo · Changelog

Release Notes

Too many releases to show here. View the full release notes.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ @​jest/types (indirect, 28.1.3 → 30.0.5) · Repo · Changelog

Release Notes

Too many releases to show here. View the full release notes.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ @​jridgewell/gen-mapping (indirect, 0.1.1 → 0.3.13) · Repo

Release Notes

0.3.5

What's Changed

Full Changelog: v0.3.4...v0.3.5

0.3.4

Full Changelog: v0.3.3...v0.3.4

0.3.3

Full Changelog: v0.3.2...v0.3.3

0.3.2

Internal

New Contributors

  • @ljharb made their first contribution in #4

Full Changelog: v0.3.1...v0.3.2

Does any of this look wrong? Please let us know.

Sorry, we couldn’t find anything useful about this release.

↗️ @​jridgewell/sourcemap-codec (indirect, 1.4.14 → 1.5.5) · Repo · Changelog

↗️ @​jridgewell/trace-mapping (indirect, 0.3.18 → 0.3.30) · Repo

Release Notes

0.3.24

What's Changed

  • Add ignoreList (and x_google_ignoreList) support: 1027ce6

Full Changelog: v0.3.23...v0.3.24

0.3.23

Full Changelog: v0.3.22...v0.3.23

0.3.22

What's Changed

Full Changelog: v0.3.21...v0.3.22

0.3.21

What's Changed

Full Changelog: v0.3.20...v0.3.21

0.3.20

What's Changed

  • Fix handling of sectioned source maps missing 'names' array by @RandomByte in #29

New Contributors

Full Changelog: v0.3.19...v0.3.20

0.3.19

What's Changed

  • Unpins the @jridgewell/resolve-uri and @jridgewell/sourcemap-codec dependencies so they can be de-duped.

Full Changelog: v0.3.16...v0.3.17

Does any of this look wrong? Please let us know.

Sorry, we couldn’t find anything useful about this release.

↗️ @​sinclair/typebox (indirect, 0.24.19 → 0.34.41) · Repo · Changelog

Release Notes

0.25.24 (from changelog)

Updates:

  • 331 Implements an additional check specific to property types of required & undefined. This to ensure the property key exists when the property value extends undefined.
  • 331 Documentation updates for Ajv and TypeCompiler

Additional:

  • 331 Remove unusued recursive code paths for create and cast.

0.25.23 (from changelog)

Updates:

  • 324 TypeScript Language Service now presents JSDoc comments when inferring static object properties. (IntelliSense)
  • 325 Additional property inference optimizations.

Additional:

  • Huge thank you to Github user stevezhu for these excellent contributions.

0.25.22 (from changelog)

Updates:

  • 323 adds compiler support for UTF-16 (unicode) characters for schema identifiers.

0.25.18 (from changelog)

Updates:

  • 307 implements date conversion when casting values with Value.Cast(Type.Date(), ...). Castable values include numbers (interpretted as timestamps) and iso8601 string values. Uncastable values will result in dates with values of 1970-01-01T00:00:00.000Z. This version also includes more robust checks for Dates initialized with invalid values.

0.25.11 (from changelog)

Updates:

  • 286 implements a FNV1A-64 non cryptographic hashing function in TypeBox. This function should not be used in place of cryptographic hashing functions, rather it's purpose is to provide relatively fast, hashing mechanism to assist with checks for arrays with uniqueItems constraints, specifically for cases where the array may contains reference values (such as objects, arrays, Dates and Uint8Array). This function is provided via Value.Hash() for convenience as the hash may be useful to generate a numeric identifier for values (with some considerations to React array rendering in absence of key or identifier)

0.25.10 (from changelog)

Updates:

  • 283 Updates the custom type validator callback signature to accept a schema instance. The schema instance may include additional constraints (such as options) that may be used during the validation process. Custom.Set('<Kind>', (schema, value) => { ... }).

0.25.9 (from changelog)

Updates:

  • 282 TypeBox now supports custom types. These types require the user to specify a custom [Kind] string on the type. Custom types can be registered via Custom.Set('<Kind>', (value) => { ... }) which allow the TypeCompiler and Value API's to make use of user defined validation logic.

0.25.0 (from changelog)

Updates:

  • 271 Adds a new non-standard Type.Date() type. This type joins the existing Type.UInt8Array() as a promoted extended type used to represent core JavaScript primitives. It's inclusion was prompted by end user requirements to validate Date objects prior to writing them to Date supported API's and where serialization of the Date object is handled internally by the API.

  • 271 Redesign of Extended Type representations. Extended types been updated to provide external validators (such as Ajv) additional standard proporties to use when defining the custom schema. These properties are instanceOf (used for validating a class object instances), and typeOf (when validating value types). Information on configuring Ajv for these properties can be found in the Ajv section of the TypeBox readme.

0.24.49 (from changelog)

Updates:

  • 264 TypeBox now provides preliminary support for non-boolean additionalProperties. This allows existing TObject schemas to be augmented with additional properties of a known type.

Additional:

  • TypeBox provides an additional reference codegen module for generating raw JSON Schema from TypeScript types via the TS compiler API. This generator may be used in future tooling.

0.24.44 (from changelog)

Updates:

  • 189 Both Value.Error(T, value) and TypeCheck.Error(value) now return an iterator for validation errors.
  • 191 TypeBox now provides a TypeGuard API that can be used to check the structural validity of TypeBox type. The TypeGuard can be used in reflection / code generation scenarios to resolve the appropriate inner TSchema type while traversing a outer type.
  • 197 TypeBox now implements conditional runtime type mapping. This functionality is offered as seperate import for the 0.24.0 release but may be provided as standard type in later releases. This API enables type T = Foo extends Bar ? true : false conditional checks to be implemented at runtime. This API also provides the Exclude and Extract utility types which are implemented through conditional types in TypeScript.
  • 199 TypeBox now provides better support for varidiac function and constructor signatures. Currently Variadics are mapped through Tuple types.
  • 200 The types TPick and TOmit now support types of TUnion<TLiteral<string>[]> to be used to select properties. Additionally, KeyOf now returns TUnion<TLiteral<string>[]>, allowing KeyOf schemas to be passed to TPick and TOmit.
  • 214 TypeBox now provides better support for i18n. To achieve this, TypeBox includes fixed mappable error codes on the ValueError type. These codes can be used by external implementors to create localized error messages. TypeBox may include localized error codes as an optional import in future releases.
  • 288 TypeBox now allows users to implement custom string validator formats. These formats are internally shared between the Value and TypeCompiler API's. TypeBox does not currently provide any built in formats, however the standard expected set (email, uuid, uri, etc) may be provided via optional import (inline with ajv-formats usage)
  • 229 The Value.Cast() function now implements automatic coersion of string, number and boolean types.
  • 231 TypeBox provides a new Value.Diff<T>() and Value.Patch<T>() utility API for JavaScript values. This API is intended to provide a basis for the efficient transmission of state updates across a network. This API can diff any JavaScript value (typed or untyped) but is recommended to be used in conjunction with a formal static type.
  • 236 TypeBox now implements the TNever type. This type is analogous to TypeScript's never type and is used in instances a composition results in a non-reconcilable type. Currently this type is implemented for empty TUnion<[]> types only. Future releases may utilize this type for planned updates to TIntersect (for example string & number resolves to never)
  • 241 247 TypeBox now exposes a ValuePointer API that can be used to mutate a value via an RFC6901 JSON Pointer. Previously this functionality was internally used by Value.Diff() and Value.Patch() functions but is now offered as an optional import for implementations that need to update values manually through pointer references.

Additional:

  • This project now includes two reference code generation utilities that can be used in custom build tooling. The first is TypeScriptCodeGen which will remap TypeScript interface and type definitions to TypeBox types. The second is TypeBoxCodeGen which will map existing TypeBox types into TypeScript type definitions. These implementations are not expected to be part of the TypeBox package, but users are free to clone and enhance them in their existing tool chains. Reference implementations can be found https://github.com/sinclairzx81/typebox/tree/master/codegen

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by 1 commit:

↗️ @​sinonjs/fake-timers (indirect, 9.1.2 → 13.0.5) · Repo · Changelog

Release Notes

Too many releases to show here. View the full release notes.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ @​types/babel__core (indirect, 7.1.19 → 7.20.5) · Repo

Sorry, we couldn’t find anything useful about this release.

↗️ @​types/babel__generator (indirect, 7.6.4 → 7.27.0) · Repo

Sorry, we couldn’t find anything useful about this release.

↗️ @​types/babel__template (indirect, 7.4.1 → 7.4.4) · Repo

Sorry, we couldn’t find anything useful about this release.

↗️ @​types/babel__traverse (indirect, 7.17.1 → 7.28.0) · Repo

Sorry, we couldn’t find anything useful about this release.

↗️ @​types/istanbul-lib-coverage (indirect, 2.0.4 → 2.0.6) · Repo

Sorry, we couldn’t find anything useful about this release.

↗️ @​types/istanbul-lib-report (indirect, 3.0.0 → 3.0.3) · Repo

Sorry, we couldn’t find anything useful about this release.

↗️ @​types/istanbul-reports (indirect, 3.0.1 → 3.0.4) · Repo

Sorry, we couldn’t find anything useful about this release.

↗️ @​types/stack-utils (indirect, 2.0.1 → 2.0.3) · Repo

Sorry, we couldn’t find anything useful about this release.

↗️ @​types/yargs (indirect, 17.0.10 → 17.0.33) · Repo

Sorry, we couldn’t find anything useful about this release.

↗️ @​types/yargs-parser (indirect, 21.0.0 → 21.0.3) · Repo

Sorry, we couldn’t find anything useful about this release.

↗️ anymatch (indirect, 3.1.2 → 3.1.3) · Repo

Release Notes

3.1.3

Fixes:

  • Keep trailing slash on paths
  • Add TypeScript overload for test string being null

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by 5 commits:

↗️ babel-jest (indirect, 28.1.3 → 30.1.2) · Repo · Changelog

Release Notes

Too many releases to show here. View the full release notes.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ babel-plugin-istanbul (indirect, 6.1.1 → 7.0.0) · Repo · Changelog

Release Notes

7.0.0

⚠ BREAKING CHANGES

  • Drop support for Node versions 8 and 10

Bug Fixes

  • container is falsy error with block scoping transform (#291) (8e76919)
  • update istanbul-lib-instrument to v6 (#292) (643e080)

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by 4 commits:

↗️ babel-plugin-jest-hoist (indirect, 28.1.3 → 30.0.1) · Repo · Changelog

Release Notes

30.0.1

What's Changed

Features

  • [jest-resolver] Implement the defaultAsyncResolver (#15679)

Fixes

  • [jest-resolver] Resolve builtin modules correctly (#15683)
  • [jest-environment-node, jest-util] Avoid setting globals cleanup protection symbol when feature is off (#15684)

Chore & Maintenance

  • [*] Remove and deprecate jest-repl package (#15673)
  • [jest-resolver] Replace custom isBuiltinModule with node's isBuiltin (#15685)

New Contributors

Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md

30.0.0

Today we are happy to announce the release of Jest 30. This release features a substantial number of changes, fixes, and improvements. While it is one of the largest major releases of Jest ever, we admit that three years for a major release is too long. In the future, we are aiming to make more frequent major releases to keep Jest great for the next decade.

If you want to skip all the news and just get going, run npm install jest@^30.0.0 and follow the migration guide: Upgrading from Jest 29 to 30.

Read the full blog post

Features

  • [*] Renamed globalsCleanupMode to globalsCleanup and --waitNextEventLoopTurnForUnhandledRejectionEvents to --waitForUnhandledRejections
  • [expect] Add ArrayOf asymmetric matcher for validating array elements. (#15567)
  • [babel-jest] Add option excludeJestPreset to allow opting out of babel-preset-jest (#15164)
  • [expect] Revert #15038 to fix expect(fn).toHaveBeenCalledWith(expect.objectContaining(...)) when there are multiple calls (#15508)
  • [jest-circus, jest-cli, jest-config] Add waitNextEventLoopTurnForUnhandledRejectionEvents flag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)
  • [jest-circus] Add a waitBeforeRetry option to jest.retryTimes (#14738)
  • [jest-circus] Add a retryImmediately option to jest.retryTimes (#14696)
  • [jest-circus, jest-jasmine2] Allow setupFilesAfterEnv to export an async function (#10962)
  • [jest-circus, jest-test-result] Add startedAt timestamp in TestCaseResultObject within onTestCaseResult (#15145)
  • [jest-cli] Export buildArgv (#15310)
  • [jest-config] [BREAKING] Add mts and cts to default moduleFileExtensions config (#14369)
  • [jest-config] [BREAKING] Update testMatch and testRegex default option for supporting mjs, cjs, mts, and cts (#14584)
  • [jest-config] Loads config file from provided path in package.json (#14044)
  • [jest-config] Allow loading jest.config.cts files (#14070)
  • [jest-config] Show rootDir in error message when a preset fails to load (#15194)
  • [jest-config] Support loading TS config files using esbuild-register via docblock loader (#15190)
  • [jest-config] Allow passing TS config loader options via docblock comment (#15234)
  • [jest-config] If Node is running with type stripping enabled, do not require a TS loader (#15480)
  • [@jest/core] Group together open handles with the same stack trace (#13417, & #14789)
  • [@jest/core] Add perfStats to surface test setup overhead (#14622)
  • [@jest/core] [BREAKING] Changed --filter to accept an object with shape { filtered: Array<string> } to match documentation (#13319)
  • [@jest/core] Support --outputFile option for --listTests (#14980)
  • [@jest/core] Stringify Errors properly with --json flag (#15329)
  • [@jest/core, @jest/test-sequencer] [BREAKING] Exposes globalConfig & contexts to TestSequencer (#14535, & #14543)
  • [jest-each] Introduce %$ option to add number of the test to its title (#14710)
  • [@jest/environment] [BREAKING] Remove deprecated jest.genMockFromModule() (#15042)
  • [@jest/environment] [BREAKING] Remove unnecessary defensive code (#15045)
  • [jest-environment-jsdom] [BREAKING] Upgrade JSDOM to v22 (#13825)
  • [@jest/environment-jsdom-abstract] Introduce new package which abstracts over the jsdom environment, allowing usage of custom versions of JSDOM (#14717)
  • [jest-environment-node] Update jest environment with dispose symbols Symbol (#14888 & #14909)
  • [expect, @jest/expect] [BREAKING] Add type inference for function parameters in CalledWith assertions (#15129)
  • [@jest/expect-utils] Properly compare all types of TypedArrays (#15178)
  • [@jest/fake-timers] [BREAKING] Upgrade @sinonjs/fake-timers to v13 (#14544 & #15470)
  • [@jest/fake-timers] Exposing new modern timers function advanceTimersToFrame() which advances all timers by the needed milliseconds to execute callbacks currently scheduled with requestAnimationFrame (#14598)
  • [jest-matcher-utils] Add SERIALIZABLE_PROPERTIES to allow custom serialization of objects (#14893)
  • [jest-mock] Add support for the Explicit Resource Management proposal to use the using keyword with jest.spyOn(object, methodName) (#14895)
  • [jest-reporters] Add support for DEC mode 2026 (#15008)
  • [jest-resolver] Support file:// URLs as paths (#15154)
  • [jest-resolve,jest-runtime,jest-resolve-dependencies] Pass the conditions when resolving stub modules (#15489)
  • [jest-runtime] Exposing new modern timers function jest.advanceTimersToFrame() from @jest/fake-timers (#14598)
  • [jest-runtime] Support import.meta.filename and import.meta.dirname (available from Node 20.11) (#14854)
  • [jest-runtime] Support import.meta.resolve (#14930)
  • [jest-runtime] [BREAKING] Make it mandatory to pass globalConfig to the Runtime constructor (#15044)
  • [jest-runtime] Add unstable_unmockModule (#15080)
  • [jest-runtime] Add onGenerateMock transformer callback for auto generated callbacks (#15433 & #15482)
  • [jest-runtime] [BREAKING] Use vm.compileFunction over vm.Script (#15461)
  • [@jest/schemas] Upgrade @sinclair/typebox to v0.34 (#15450)
  • [@jest/types] test.each(): Accept a readonly (as const) table properly (#14565)
  • [@jest/types] Improve argument type inference passed to test and describe callback functions from each tables (#14920)
  • [jest-snapshot] [BREAKING] Add support for Error causes in snapshots (#13965)
  • [jest-snapshot] Support Prettier 3 (#14566)
  • [@jest/util-snapshot] Extract utils used by tooling from jest-snapshot into its own package (#15095)
  • [pretty-format] [BREAKING] Do not render empty string children ('') in React plugin (#14470)

Fixes

  • [expect] Show AggregateError to display (#15346)
  • [*] Replace exit with exit-x (#15399)
  • [babel-plugin-jest-hoist] Use denylist instead of the deprecated blacklist for Babel 8 support (#14109)
  • [babel-plugin-jest-hoist] Do not rely on buggy Babel behaviour (#15415)
  • [expect] Check error instance type for toThrow/toThrowError (#14576)
  • [expect] Improve diff for failing expect.objectContaining (#15038)
  • [expect] Use Array.isArray to check if an array is an Array (#15101)
  • [expect] Fix Error cause assertion errors (#15339)
  • [jest-changed-files] Print underlying errors when VCS commands fail (#15052)
  • [jest-changed-files] Abort sl root call if output resembles a steam locomotive (#15053)
  • [jest-circus] [BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)
  • [jest-circus] Replace recursive makeTestResults implementation with iterative one (#14760)
  • [jest-circus] Omit expect.hasAssertions() errors if a test already has errors (#14866)
  • [jest-circus, jest-expect, jest-snapshot] Pass test.failing tests when containing failing snapshot matchers (#14313)
  • [jest-circus] Concurrent tests now emit jest circus events at the correct point and in the expected order. (#15381)
  • [jest-cli] [BREAKING] Validate CLI flags that require arguments receives them (#14783)
  • [jest-config] Make sure to respect runInBand option (#14578)
  • [jest-config] Support testTimeout in project config (#14697)
  • [jest-config] Support coverageReporters in project config (#14697)
  • [jest-config] Allow reporters in project config (#14768)
  • [jest-config] Allow Node16/NodeNext/Bundler moduleResolution in project's tsconfig (#14739)
  • [@jest/create-cache-key-function] Correct the return type of createCacheKey (#15159)
  • [jest-each] Allow $keypath templates with null or undefined values (#14831)
  • [@jest/expect-utils] Fix comparison of DataView (#14408)
  • [@jest/expect-utils] [BREAKING] exclude non-enumerable in object matching (#14670)
  • [@jest/expect-utils] Fix comparison of URL (#14672)
  • [@jest/expect-utils] Check Symbol properties in equality (#14688)
  • [@jest/expect-utils] Catch circular references within arrays when matching objects (#14894)
  • [@jest/expect-utils] Fix not addressing to Sets and Maps as objects without keys (#14873)
  • [jest-haste-map] Fix errors or clobbering with multiple hasteImplModulePaths (#15522)
  • [jest-leak-detector] Make leak-detector more aggressive when running GC (#14526)
  • [jest-runtime] Properly handle re-exported native modules in ESM via CJS (#14589)
  • [jest-runtime] Refactor _importCoreModel so required core module is consistent if modified while loading (#15077)
  • [jest-schemas, jest-types] [BREAKING] Fix type of testFailureExitCode config option(#15232)
  • [jest-util] Make sure isInteractive works in a browser (#14552)
  • [pretty-format] [BREAKING] Print ArrayBuffer and DataView correctly (#14290)
  • [pretty-format] Fixed a bug where "anonymous custom elements" were not being printed as expected. (#15138)
  • [jest-cli] When specifying paths on the command line, only match against the relative paths of the test files (#12519)
    • [BREAKING] Changes testPathPattern configuration option to testPathPatterns, which now takes a list of patterns instead of the regex.
    • [BREAKING] --testPathPattern is now --testPathPatterns
    • [BREAKING] Specifying testPathPatterns when programmatically calling watch must be specified as new TestPathPatterns(patterns), where TestPathPatterns can be imported from @jest/pattern
  • [jest-reporters, jest-runner] Unhandled errors without stack get correctly logged to console (#14619)
  • [jest-util] Always load mjs files with import (#15447)
  • [jest-worker] Properly handle a circular reference error when worker tries to send an assertion fails where either the expected or actual value is circular (#15191)
  • [jest-worker] Properly handle a BigInt when worker tries to send an assertion fails where either the expected or actual value is BigInt (#15191)
  • [expect] Resolve issue where ObjectContaining matched non-object values. ([#15463])(#15463).
    • Adds a conditional/check to ensure the argument passed to expect is an object.
    • Add unit tests for new ObjectContaining behavior.
    • Remove invalid/wrong test case assertions for ObjectContaining.
  • [jest-worker] Addresses incorrect state on exit (#15610)

Performance

  • [*] [BREAKING] Bundle all of Jest's modules into index.js (#12348, #14550 & #14661)
  • [jest-haste-map] Only spawn one process to check for watchman installation (#14826)
  • [jest-runner] Better cleanup source-map-support after test to resolve (minor) memory leak (#15233)
  • [jest-circus, jest-environment-node, jest-repl, jest-runner, jest-util] Cleanup global variables on environment teardown to reduce memory leaks (#15215 & #15636 & #15643)

Chore & Maintenance

  • [jest-environment-jsdom, jest-environment-jsdom-abstract] Increased version of jsdom to ^26.0.0 (#15325CVE-2024-37890)
  • [*] Increase version of micromatch to ^4.0.7 (#15082)
  • [*] [BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)
  • [*] [BREAKING] Drop support for typescript@4.3, minimum version is now 5.4 (#14542, #15621)
  • [*] Depend on exact versions of monorepo dependencies instead of ^ range (#14553)
  • [*] [BREAKING] Add ESM wrapper for all of Jest's modules (#14661)
  • [*] [BREAKING] Upgrade to glob@10 (#14509)
  • [*] Use TypeError over Error where appropriate (#14799)
  • [docs] Fix typos in CHANGELOG.md and packages/jest-validate/README.md (#14640)
  • [docs] Don't use alias matchers in docs (#14631)
  • [babel-jest, babel-preset-jest] [BREAKING] Increase peer dependency of @babel/core to ^7.11 (#14109)
  • [babel-jest, @jest/transform] Update babel-plugin-istanbul to v6 (#15156)
  • [babel-plugin-jest-hoist] Move unnecessary dependencies to devDependencies (#15010)
  • [expect] [BREAKING] Remove .toBeCalled(), .toBeCalledTimes(), .toBeCalledWith(), .lastCalledWith(), .nthCalledWith(), .toReturn(), .toReturnTimes(), .toReturnWith(), .lastReturnedWith(), .nthReturnedWith() and .toThrowError() matcher aliases (#14632)
  • [jest-cli, jest-config, @jest/types] [BREAKING] Remove deprecated --init argument (#14490)
  • [jest-config, @jest/core, jest-util] Upgrade ci-info (#14655)
  • [jest-mock] [BREAKING] Remove MockFunctionMetadataType, MockFunctionMetadata and SpyInstance types (#14621)
  • [@jest/reporters] Upgrade istanbul-lib-source-maps (#14924)
  • [jest-schemas] Upgrade @sinclair/typebox (#14775)
  • [jest-transform] Upgrade write-file-atomic (#14274)
  • [jest-util] Upgrade picomatch to v4 (#14653 & #14885)
  • [docs] Append to NODE_OPTIONS, not overwrite ([#14730](https://github.com/jestjs/jest/pull/14730))
  • [docs] Updated .toHaveBeenCalled() documentation to correctly reflect its functionality (#14842)
  • [docs] Link NestJS documentation on testing with Jest (#14940)
  • [docs] Revised documentation for .toHaveBeenCalled() to accurately depict its functionality. (#14853)
  • [docs] Removed ExpressJS reference link from documentation due to dead link (#15270)
  • [docs] Correct broken links in docs (#15359)

See the CHANGELOG.

29.6.3

Fixes

  • [expect, @jest/expect-utils] ObjectContaining support symbol as key (#14414)
  • [expect] Remove @types/node from dependencies (#14385)
  • [jest-core] Use workers in watch mode by default to avoid crashes (#14059 & #14085).
  • [jest-reporters] Update istanbul-lib-instrument dependency to v6. (#14401)
  • [jest-mock] Revert #13692 as it was a breaking change (#14429)
  • [jest-mock] Revert #13866 as it was a breaking change (#14429)
  • [jest-mock] Revert #13867 as it was a breaking change (#14429)
  • [@jest/reporters] Marks Reporter's hooks as optional (#14433)
  • [jest-runtime] Fix dynamic ESM import module bug when loaded module through jest.isolateModulesAsync (#14397)

Chore & Maintenance

  • [jest-changed-files, jest-circus, jest-console, @jest/core, @jest/runtime, @jest/transform] Use invariant and notEmpty from jest-util rather than own internal (#14366)

New Contributors

Full Changelog: v29.6.2...v29.6.3

29.5.0

Features

  • [jest-changed-files] Support Sapling (#13941)
  • [jest-circus, @jest/cli, jest-config] Add feature to randomize order of tests via CLI flag or through the config file(#12922)
  • [jest-cli, jest-config, @jest/core, jest-haste-map, @jest/reporters, jest-runner, jest-runtime, @jest/types] Add workerThreads configuration option to allow using worker threads for parallelization (#13939)
  • [jest-cli] Export yargsOptions (#13970)
  • [jest-config] Add openHandlesTimeout option to configure possible open handles warning. (#13875)
  • [@jest/create-cache-key-function] Allow passing length argument to createCacheKey() function and set its default value to 16 on Windows (#13827)
  • [jest-message-util] Add support for AggregateError (#13946 & #13947)
  • [jest-message-util] Add support for Error causes in test and it (#13935 & #13966)
  • [jest-reporters] Add summaryThreshold option to summary reporter to allow overriding the internal threshold that is used to print the summary of all failed tests when the number of test suites surpasses it (#13895)
  • [jest-runtime] Expose @sinonjs/fake-timers async APIs functions advanceTimersByTimeAsync(msToRun) (tickAsync(msToRun)), advanceTimersToNextTimerAsync(steps) (nextAsync), runAllTimersAsync (runAllAsync), and runOnlyPendingTimersAsync (runToLastAsync) (#13981)
  • [jest-runtime, @jest/transform] Allow V8 coverage provider to collect coverage from files which were not loaded explicitly (#13974)
  • [jest-snapshot] Add support to cts and mts TypeScript files to inline snapshots (#13975)
  • [jest-worker] Add start method to worker farms (#13937)
  • [jest-worker] Support passing a URL as path to worker (#13982)

Fixes

  • [babel-plugin-jest-hoist] Fix unwanted hoisting of nested jest usages (#13952)
  • [jest-circus] Send test case results for todo tests (#13915)
  • [jest-circus] Update message printed on test timeout (#13830)
  • [jest-circus] Avoid creating the word "testfalse" when takesDoneCallback is false in the message printed on test timeout AND updated timeouts test (#13954)
  • [jest-environment-jsdom] Stop setting document to null on teardown (#13972)
  • [@jest/expect-utils] Update toStrictEqual() to be able to check jest.fn().mock.calls (#13960)
  • [@jest/test-result] Allow TestResultsProcessor type to return a Promise (#13950)

Chore & Maintenance

  • [jest-snapshot] Remove dependency on jest-haste-map (#13977)

New Contributors

Full Changelog: v29.4.3...v29.5.0

29.4.3

Features

  • [expect] Update toThrow() to be able to use error causes (#13606)
  • [jest-core] allow to use workerIdleMemoryLimit with only 1 worker or runInBand option (#13846)
  • [jest-message-util] Add support for error causes (#13868 & #13912)
  • [jest-runtime] Revert import assertions for JSON modules as it's been relegated to Stage 2 (#13911)

Fixes

  • [@jest/expect-utils] subsetEquality should consider also an object's inherited string keys (#13824)
  • [jest-mock] Clear mock state when jest.restoreAllMocks() is called (#13867)
  • [jest-mock] Prevent mockImplementationOnce and mockReturnValueOnce bleeding into withImplementation (#13888)
  • [jest-mock] Do not restore mocks when jest.resetAllMocks() is called (#13866)

New Contributors

Full Changelog: v29.4.2...v29.4.3

29.4.2

Features

Fixes

  • [expect, @jest/expect] Provide type of actual as a generic argument to Matchers to allow better-typed extensions (#13848)
  • [jest-circus] Added explicit mention of test failing because done() is not being called in error message (#13847)
  • [jest-runtime] Handle CJS re-exports of node core modules from ESM (#13856)
  • [jest-transform] Downgrade write-file-atomic to v4 (#13853)
  • [jest-worker] Ignore IPC messages not intended for Jest (#13543)

Chore & Maintenance

  • [*] make sure to exclude .eslintcache from published module (#13832)
  • [docs] Cleanup incorrect links in CHANGELOG.md (#13857)

New Contributors

Full Changelog: v29.4.1...v29.4.2

29.4.0

Features

  • [expect, @jest/expect-utils] Support custom equality testers (#13654)
  • [jest-config, jest-worker] Use os.availableParallelism if available to calculate number of workers to spawn (#13738)
  • [@jest/globals, jest-mock] Add jest.replaceProperty() that replaces property value (#13496)
  • [jest-haste-map] ignore Sapling vcs directories (.sl/) (#13674)
  • [jest-resolve] Support subpath imports (#13705, #13723, #13777)
  • [jest-runtime] Add jest.isolateModulesAsync for scoped module initialization of asynchronous functions (#13680)
  • [jest-runtime] Add jest.isEnvironmentTornDown function (#13741)
  • [jest-test-result] Added skipped and focused status to FormattedTestResult (#13700)
  • [jest-transform] Support for asynchronous createTransformer (#13762)

Fixes

  • [jest-environment-node] Fix non-configurable globals (#13687)
  • [@jest/expect-utils] toMatchObject should handle Symbol properties (#13639)
  • [jest-mock] Fix mockReset and resetAllMocks undefined return value(#13692)
  • [jest-resolve] Add global paths to require.resolve.paths (#13633)
  • [jest-resolve] Correct node core module detection when using node: specifiers (#13806)
  • [jest-runtime] Support WASM files that import JS resources (#13608)
  • [jest-runtime] Use the scriptTransformer cache in jest-runner (#13735)
  • [jest-runtime] Enforce import assertions when importing JSON in ESM (#12755 & #13805)
  • [jest-snapshot] Make sure to import babel outside of the sandbox (#13694)
  • [jest-transform] Ensure the correct configuration is passed to preprocessors specified multiple times in the transform option (#13770)

Chore & Maintenance

  • [@jest/fake-timers] Update @sinonjs/fake-timers (#13612)
  • [docs] Improve custom puppeteer example to prevent worker warnings (#13619)

New Contributors

Full Changelog: v29.3.1...v29.4.0

29.2.0

Features

  • [@jest/cli, jest-config] A seed for the test run will be randomly generated, or set by a CLI option (#13400)
  • [@jest/cli, jest-config] --show-seed will display the seed value in the report, and can be set via a CLI flag or through the config file (#13400)
  • [jest-config] Add readInitialConfig utility function (#13356)
  • [jest-core] Allow testResultsProcessor to be async (#13343)
  • [@jest/environment, jest-environment-node, jest-environment-jsdom, jest-runtime] Add getSeed() to the jest object (#13400)
  • [expect, @jest/expect-utils] Allow isA utility to take a type argument (#13355)
  • [expect] Expose AsyncExpectationResult and SyncExpectationResult types (#13411)

Fixes

  • [babel-plugin-jest-hoist] Ignore TSTypeQuery when checking for hoisted references (#13367)
  • [jest-core] Fix detectOpenHandles false positives for some special objects such as TLSWRAP (#13414)
  • [jest-mock] Fix mocking of getters and setters on classes (#13398)
  • [jest-reporters] Revert: Transform file paths into hyperlinks (#13399)
  • [@jest/types] Infer type of each table correctly when the table is a tuple or array (#13381)
  • [@jest/types] Rework typings to allow the *ReturnedWith matchers to be called with no argument (#13385)

Chore & Maintenance

  • [*] Update @babel/* deps, resulting in slightly different stack traces for each (#13422)

Performance

  • [jest-runner] Do not instrument v8 coverage data if coverage should not be collected (#13282)

New Contributors

Full Changelog: v29.1.2...v29.2.0

29.0.2

Features

  • [jest-transform] Expose TransformFactory type (#13184)

Fixes

  • [babel-plugin-jest-hoist] Support imported jest in mock factory (#13188)
  • [jest-mock] Align the behavior and return type of generateFromMetadata method (#13207)
  • [jest-runtime] Support jest.resetModules() with ESM (#13211)

New Contributors

Full Changelog: v29.0.1...v29.0.2

29.0.0

Blog post: https://jestjs.io/blog/2022/08/25/jest-29

Features

  • [expect] [BREAKING] Differentiate between MatcherContext MatcherUtils and MatcherState types (#13141)
  • [jest-circus] Add support for test.failing.each (#13142)
  • [jest-config] [BREAKING] Make snapshotFormat default to escapeString: false and printBasicPrototype: false (#13036)
  • [jest-config] [BREAKING] Remove undocumented collectCoverageOnlyFrom option (#13156)
  • [jest-environment-jsdom] [BREAKING] Upgrade to jsdom@20 (#13037, #13058)
  • [@jest/globals] Add jest.Mocked, jest.MockedClass, jest.MockedFunction and jest.MockedObject utility types (#12727)
  • [jest-mock] [BREAKING] Refactor Mocked* utility types. MaybeMockedDeep and MaybeMocked became Mocked and MockedShallow respectively; only deep mocked variants of MockedClass, MockedFunction and MockedObject are exported (#13123, #13124)
  • [jest-mock] [BREAKING] Change the default jest.mocked helper’s behavior to deep mocked (#13125)
  • [jest-snapshot] [BREAKING] Let babel find config when updating inline snapshots (#13150)
  • [@jest/test-result, @jest/types] [BREAKING] Replace Bytes and Milliseconds types with number (#13155)
  • [jest-worker] Adds workerIdleMemoryLimit option which is used as a check for worker memory leaks >= Node 16.11.0 and recycles child workers as required (#13056, #13105, #13106, #13107)
  • [pretty-format] [BREAKING] Remove ConvertAnsi plugin in favour of jest-serializer-ansi-escapes (#13040)
  • [pretty-format] Allow to opt out from sorting object keys with compareKeys: null (#12443)

Fixes

  • [jest-config] Fix testing multiple projects with TypeScript config files (#13099)
  • [@jest/expect-utils] Fix deep equality of ImmutableJS Record (#13055)
  • [jest-haste-map] Increase the maximum possible file size that jest-haste-map can handle (#13094)
  • [jest-runtime] Properly support CJS re-exports from dual packages (#13170)
  • [jest-snapshot] Make prettierPath optional in SnapshotState (#13149)
  • [jest-snapshot] Fix parsing error from inline snapshot files with JSX (#12760)
  • [jest-worker] When a process runs out of memory worker exits correctly and doesn't spin indefinitely (#13054)

Chore & Maintenance

  • [*] [BREAKING] Drop support for Node v12 and v17 (#13033)
  • [docs] Fix webpack name (#13049)
  • [docs] Explicit how to set n for --bail (#13128)
  • [docs] Update Enzyme URL (#13166)
  • [jest-leak-detector] Remove support for weak-napi (#13035)
  • [jest-snapshot] [BREAKING] Require rootDir as argument to SnapshotState (#13150)

New Contributors

Full Changelog: v28.1.3...v29.0.0

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ babel-preset-current-node-syntax (indirect, 1.0.1 → 1.2.0) · Repo

Release Notes

1.1.0

New features

  • Add support for import attributes (#11)

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by 16 commits:

↗️ babel-preset-jest (indirect, 28.1.3 → 30.0.1) · Repo · Changelog

Release Notes

30.0.1

What's Changed

Features

  • [jest-resolver] Implement the defaultAsyncResolver (#15679)

Fixes

  • [jest-resolver] Resolve builtin modules correctly (#15683)
  • [jest-environment-node, jest-util] Avoid setting globals cleanup protection symbol when feature is off (#15684)

Chore & Maintenance

  • [*] Remove and deprecate jest-repl package (#15673)
  • [jest-resolver] Replace custom isBuiltinModule with node's isBuiltin (#15685)

New Contributors

Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md

30.0.0

Today we are happy to announce the release of Jest 30. This release features a substantial number of changes, fixes, and improvements. While it is one of the largest major releases of Jest ever, we admit that three years for a major release is too long. In the future, we are aiming to make more frequent major releases to keep Jest great for the next decade.

If you want to skip all the news and just get going, run npm install jest@^30.0.0 and follow the migration guide: Upgrading from Jest 29 to 30.

Read the full blog post

Features

  • [*] Renamed globalsCleanupMode to globalsCleanup and --waitNextEventLoopTurnForUnhandledRejectionEvents to --waitForUnhandledRejections
  • [expect] Add ArrayOf asymmetric matcher for validating array elements. (#15567)
  • [babel-jest] Add option excludeJestPreset to allow opting out of babel-preset-jest (#15164)
  • [expect] Revert #15038 to fix expect(fn).toHaveBeenCalledWith(expect.objectContaining(...)) when there are multiple calls (#15508)
  • [jest-circus, jest-cli, jest-config] Add waitNextEventLoopTurnForUnhandledRejectionEvents flag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)
  • [jest-circus] Add a waitBeforeRetry option to jest.retryTimes (#14738)
  • [jest-circus] Add a retryImmediately option to jest.retryTimes (#14696)
  • [jest-circus, jest-jasmine2] Allow setupFilesAfterEnv to export an async function (#10962)
  • [jest-circus, jest-test-result] Add startedAt timestamp in TestCaseResultObject within onTestCaseResult (#15145)
  • [jest-cli] Export buildArgv (#15310)
  • [jest-config] [BREAKING] Add mts and cts to default moduleFileExtensions config (#14369)
  • [jest-config] [BREAKING] Update testMatch and testRegex default option for supporting mjs, cjs, mts, and cts (#14584)
  • [jest-config] Loads config file from provided path in package.json (#14044)
  • [jest-config] Allow loading jest.config.cts files (#14070)
  • [jest-config] Show rootDir in error message when a preset fails to load (#15194)
  • [jest-config] Support loading TS config files using esbuild-register via docblock loader (#15190)
  • [jest-config] Allow passing TS config loader options via docblock comment (#15234)
  • [jest-config] If Node is running with type stripping enabled, do not require a TS loader (#15480)
  • [@jest/core] Group together open handles with the same stack trace (#13417, & #14789)
  • [@jest/core] Add perfStats to surface test setup overhead (#14622)
  • [@jest/core] [BREAKING] Changed --filter to accept an object with shape { filtered: Array<string> } to match documentation (#13319)
  • [@jest/core] Support --outputFile option for --listTests (#14980)
  • [@jest/core] Stringify Errors properly with --json flag (#15329)
  • [@jest/core, @jest/test-sequencer] [BREAKING] Exposes globalConfig & contexts to TestSequencer (#14535, & #14543)
  • [jest-each] Introduce %$ option to add number of the test to its title (#14710)
  • [@jest/environment] [BREAKING] Remove deprecated jest.genMockFromModule() (#15042)
  • [@jest/environment] [BREAKING] Remove unnecessary defensive code (#15045)
  • [jest-environment-jsdom] [BREAKING] Upgrade JSDOM to v22 (#13825)
  • [@jest/environment-jsdom-abstract] Introduce new package which abstracts over the jsdom environment, allowing usage of custom versions of JSDOM (#14717)
  • [jest-environment-node] Update jest environment with dispose symbols Symbol (#14888 & #14909)
  • [expect, @jest/expect] [BREAKING] Add type inference for function parameters in CalledWith assertions (#15129)
  • [@jest/expect-utils] Properly compare all types of TypedArrays (#15178)
  • [@jest/fake-timers] [BREAKING] Upgrade @sinonjs/fake-timers to v13 (#14544 & #15470)
  • [@jest/fake-timers] Exposing new modern timers function advanceTimersToFrame() which advances all timers by the needed milliseconds to execute callbacks currently scheduled with requestAnimationFrame (#14598)
  • [jest-matcher-utils] Add SERIALIZABLE_PROPERTIES to allow custom serialization of objects (#14893)
  • [jest-mock] Add support for the Explicit Resource Management proposal to use the using keyword with jest.spyOn(object, methodName) (#14895)
  • [jest-reporters] Add support for DEC mode 2026 (#15008)
  • [jest-resolver] Support file:// URLs as paths (#15154)
  • [jest-resolve,jest-runtime,jest-resolve-dependencies] Pass the conditions when resolving stub modules (#15489)
  • [jest-runtime] Exposing new modern timers function jest.advanceTimersToFrame() from @jest/fake-timers (#14598)
  • [jest-runtime] Support import.meta.filename and import.meta.dirname (available from Node 20.11) (#14854)
  • [jest-runtime] Support import.meta.resolve (#14930)
  • [jest-runtime] [BREAKING] Make it mandatory to pass globalConfig to the Runtime constructor (#15044)
  • [jest-runtime] Add unstable_unmockModule (#15080)
  • [jest-runtime] Add onGenerateMock transformer callback for auto generated callbacks (#15433 & #15482)
  • [jest-runtime] [BREAKING] Use vm.compileFunction over vm.Script (#15461)
  • [@jest/schemas] Upgrade @sinclair/typebox to v0.34 (#15450)
  • [@jest/types] test.each(): Accept a readonly (as const) table properly (#14565)
  • [@jest/types] Improve argument type inference passed to test and describe callback functions from each tables (#14920)
  • [jest-snapshot] [BREAKING] Add support for Error causes in snapshots (#13965)
  • [jest-snapshot] Support Prettier 3 (#14566)
  • [@jest/util-snapshot] Extract utils used by tooling from jest-snapshot into its own package (#15095)
  • [pretty-format] [BREAKING] Do not render empty string children ('') in React plugin (#14470)

Fixes

  • [expect] Show AggregateError to display (#15346)
  • [*] Replace exit with exit-x (#15399)
  • [babel-plugin-jest-hoist] Use denylist instead of the deprecated blacklist for Babel 8 support (#14109)
  • [babel-plugin-jest-hoist] Do not rely on buggy Babel behaviour (#15415)
  • [expect] Check error instance type for toThrow/toThrowError (#14576)
  • [expect] Improve diff for failing expect.objectContaining (#15038)
  • [expect] Use Array.isArray to check if an array is an Array (#15101)
  • [expect] Fix Error cause assertion errors (#15339)
  • [jest-changed-files] Print underlying errors when VCS commands fail (#15052)
  • [jest-changed-files] Abort sl root call if output resembles a steam locomotive (#15053)
  • [jest-circus] [BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)
  • [jest-circus] Replace recursive makeTestResults implementation with iterative one (#14760)
  • [jest-circus] Omit expect.hasAssertions() errors if a test already has errors (#14866)
  • [jest-circus, jest-expect, jest-snapshot] Pass test.failing tests when containing failing snapshot matchers (#14313)
  • [jest-circus] Concurrent tests now emit jest circus events at the correct point and in the expected order. (#15381)
  • [jest-cli] [BREAKING] Validate CLI flags that require arguments receives them (#14783)
  • [jest-config] Make sure to respect runInBand option (#14578)
  • [jest-config] Support testTimeout in project config (#14697)
  • [jest-config] Support coverageReporters in project config (#14697)
  • [jest-config] Allow reporters in project config (#14768)
  • [jest-config] Allow Node16/NodeNext/Bundler moduleResolution in project's tsconfig (#14739)
  • [@jest/create-cache-key-function] Correct the return type of createCacheKey (#15159)
  • [jest-each] Allow $keypath templates with null or undefined values (#14831)
  • [@jest/expect-utils] Fix comparison of DataView (#14408)
  • [@jest/expect-utils] [BREAKING] exclude non-enumerable in object matching (#14670)
  • [@jest/expect-utils] Fix comparison of URL (#14672)
  • [@jest/expect-utils] Check Symbol properties in equality (#14688)
  • [@jest/expect-utils] Catch circular references within arrays when matching objects (#14894)
  • [@jest/expect-utils] Fix not addressing to Sets and Maps as objects without keys (#14873)
  • [jest-haste-map] Fix errors or clobbering with multiple hasteImplModulePaths (#15522)
  • [jest-leak-detector] Make leak-detector more aggressive when running GC (#14526)
  • [jest-runtime] Properly handle re-exported native modules in ESM via CJS (#14589)
  • [jest-runtime] Refactor _importCoreModel so required core module is consistent if modified while loading (#15077)
  • [jest-schemas, jest-types] [BREAKING] Fix type of testFailureExitCode config option(#15232)
  • [jest-util] Make sure isInteractive works in a browser (#14552)
  • [pretty-format] [BREAKING] Print ArrayBuffer and DataView correctly (#14290)
  • [pretty-format] Fixed a bug where "anonymous custom elements" were not being printed as expected. (#15138)
  • [jest-cli] When specifying paths on the command line, only match against the relative paths of the test files (#12519)
    • [BREAKING] Changes testPathPattern configuration option to testPathPatterns, which now takes a list of patterns instead of the regex.
    • [BREAKING] --testPathPattern is now --testPathPatterns
    • [BREAKING] Specifying testPathPatterns when programmatically calling watch must be specified as new TestPathPatterns(patterns), where TestPathPatterns can be imported from @jest/pattern
  • [jest-reporters, jest-runner] Unhandled errors without stack get correctly logged to console (#14619)
  • [jest-util] Always load mjs files with import (#15447)
  • [jest-worker] Properly handle a circular reference error when worker tries to send an assertion fails where either the expected or actual value is circular (#15191)
  • [jest-worker] Properly handle a BigInt when worker tries to send an assertion fails where either the expected or actual value is BigInt (#15191)
  • [expect] Resolve issue where ObjectContaining matched non-object values. ([#15463])(#15463).
    • Adds a conditional/check to ensure the argument passed to expect is an object.
    • Add unit tests for new ObjectContaining behavior.
    • Remove invalid/wrong test case assertions for ObjectContaining.
  • [jest-worker] Addresses incorrect state on exit (#15610)

Performance

  • [*] [BREAKING] Bundle all of Jest's modules into index.js (#12348, #14550 & #14661)
  • [jest-haste-map] Only spawn one process to check for watchman installation (#14826)
  • [jest-runner] Better cleanup source-map-support after test to resolve (minor) memory leak (#15233)
  • [jest-circus, jest-environment-node, jest-repl, jest-runner, jest-util] Cleanup global variables on environment teardown to reduce memory leaks (#15215 & #15636 & #15643)

Chore & Maintenance

  • [jest-environment-jsdom, jest-environment-jsdom-abstract] Increased version of jsdom to ^26.0.0 (#15325CVE-2024-37890)
  • [*] Increase version of micromatch to ^4.0.7 (#15082)
  • [*] [BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)
  • [*] [BREAKING] Drop support for typescript@4.3, minimum version is now 5.4 (#14542, #15621)
  • [*] Depend on exact versions of monorepo dependencies instead of ^ range (#14553)
  • [*] [BREAKING] Add ESM wrapper for all of Jest's modules (#14661)
  • [*] [BREAKING] Upgrade to glob@10 (#14509)
  • [*] Use TypeError over Error where appropriate (#14799)
  • [docs] Fix typos in CHANGELOG.md and packages/jest-validate/README.md (#14640)
  • [docs] Don't use alias matchers in docs (#14631)
  • [babel-jest, babel-preset-jest] [BREAKING] Increase peer dependency of @babel/core to ^7.11 (#14109)
  • [babel-jest, @jest/transform] Update babel-plugin-istanbul to v6 (#15156)
  • [babel-plugin-jest-hoist] Move unnecessary dependencies to devDependencies (#15010)
  • [expect] [BREAKING] Remove .toBeCalled(), .toBeCalledTimes(), .toBeCalledWith(), .lastCalledWith(), .nthCalledWith(), .toReturn(), .toReturnTimes(), .toReturnWith(), .lastReturnedWith(), .nthReturnedWith() and .toThrowError() matcher aliases (#14632)
  • [jest-cli, jest-config, @jest/types] [BREAKING] Remove deprecated --init argument (#14490)
  • [jest-config, @jest/core, jest-util] Upgrade ci-info (#14655)
  • [jest-mock] [BREAKING] Remove MockFunctionMetadataType, MockFunctionMetadata and SpyInstance types (#14621)
  • [@jest/reporters] Upgrade istanbul-lib-source-maps (#14924)
  • [jest-schemas] Upgrade @sinclair/typebox (#14775)
  • [jest-transform] Upgrade write-file-atomic (#14274)
  • [jest-util] Upgrade picomatch to v4 (#14653 & #14885)
  • [docs] Append to NODE_OPTIONS, not overwrite ([#14730](https://github.com/jestjs/jest/pull/14730))
  • [docs] Updated .toHaveBeenCalled() documentation to correctly reflect its functionality (#14842)
  • [docs] Link NestJS documentation on testing with Jest (#14940)
  • [docs] Revised documentation for .toHaveBeenCalled() to accurately depict its functionality. (#14853)
  • [docs] Removed ExpressJS reference link from documentation due to dead link (#15270)
  • [docs] Correct broken links in docs (#15359)

See the CHANGELOG.

29.6.3

Fixes

  • [expect, @jest/expect-utils] ObjectContaining support symbol as key (#14414)
  • [expect] Remove @types/node from dependencies (#14385)
  • [jest-core] Use workers in watch mode by default to avoid crashes (#14059 & #14085).
  • [jest-reporters] Update istanbul-lib-instrument dependency to v6. (#14401)
  • [jest-mock] Revert #13692 as it was a breaking change (#14429)
  • [jest-mock] Revert #13866 as it was a breaking change (#14429)
  • [jest-mock] Revert #13867 as it was a breaking change (#14429)
  • [@jest/reporters] Marks Reporter's hooks as optional (#14433)
  • [jest-runtime] Fix dynamic ESM import module bug when loaded module through jest.isolateModulesAsync (#14397)

Chore & Maintenance

  • [jest-changed-files, jest-circus, jest-console, @jest/core, @jest/runtime, @jest/transform] Use invariant and notEmpty from jest-util rather than own internal (#14366)

New Contributors

Full Changelog: v29.6.2...v29.6.3

29.5.0

Features

  • [jest-changed-files] Support Sapling (#13941)
  • [jest-circus, @jest/cli, jest-config] Add feature to randomize order of tests via CLI flag or through the config file(#12922)
  • [jest-cli, jest-config, @jest/core, jest-haste-map, @jest/reporters, jest-runner, jest-runtime, @jest/types] Add workerThreads configuration option to allow using worker threads for parallelization (#13939)
  • [jest-cli] Export yargsOptions (#13970)
  • [jest-config] Add openHandlesTimeout option to configure possible open handles warning. (#13875)
  • [@jest/create-cache-key-function] Allow passing length argument to createCacheKey() function and set its default value to 16 on Windows (#13827)
  • [jest-message-util] Add support for AggregateError (#13946 & #13947)
  • [jest-message-util] Add support for Error causes in test and it (#13935 & #13966)
  • [jest-reporters] Add summaryThreshold option to summary reporter to allow overriding the internal threshold that is used to print the summary of all failed tests when the number of test suites surpasses it (#13895)
  • [jest-runtime] Expose @sinonjs/fake-timers async APIs functions advanceTimersByTimeAsync(msToRun) (tickAsync(msToRun)), advanceTimersToNextTimerAsync(steps) (nextAsync), runAllTimersAsync (runAllAsync), and runOnlyPendingTimersAsync (runToLastAsync) (#13981)
  • [jest-runtime, @jest/transform] Allow V8 coverage provider to collect coverage from files which were not loaded explicitly (#13974)
  • [jest-snapshot] Add support to cts and mts TypeScript files to inline snapshots (#13975)
  • [jest-worker] Add start method to worker farms (#13937)
  • [jest-worker] Support passing a URL as path to worker (#13982)

Fixes

  • [babel-plugin-jest-hoist] Fix unwanted hoisting of nested jest usages (#13952)
  • [jest-circus] Send test case results for todo tests (#13915)
  • [jest-circus] Update message printed on test timeout (#13830)
  • [jest-circus] Avoid creating the word "testfalse" when takesDoneCallback is false in the message printed on test timeout AND updated timeouts test (#13954)
  • [jest-environment-jsdom] Stop setting document to null on teardown (#13972)
  • [@jest/expect-utils] Update toStrictEqual() to be able to check jest.fn().mock.calls (#13960)
  • [@jest/test-result] Allow TestResultsProcessor type to return a Promise (#13950)

Chore & Maintenance

  • [jest-snapshot] Remove dependency on jest-haste-map (#13977)

New Contributors

Full Changelog: v29.4.3...v29.5.0

29.4.3

Features

  • [expect] Update toThrow() to be able to use error causes (#13606)
  • [jest-core] allow to use workerIdleMemoryLimit with only 1 worker or runInBand option (#13846)
  • [jest-message-util] Add support for error causes (#13868 & #13912)
  • [jest-runtime] Revert import assertions for JSON modules as it's been relegated to Stage 2 (#13911)

Fixes

  • [@jest/expect-utils] subsetEquality should consider also an object's inherited string keys (#13824)
  • [jest-mock] Clear mock state when jest.restoreAllMocks() is called (#13867)
  • [jest-mock] Prevent mockImplementationOnce and mockReturnValueOnce bleeding into withImplementation (#13888)
  • [jest-mock] Do not restore mocks when jest.resetAllMocks() is called (#13866)

New Contributors

Full Changelog: v29.4.2...v29.4.3

29.4.2

Features

Fixes

  • [expect, @jest/expect] Provide type of actual as a generic argument to Matchers to allow better-typed extensions (#13848)
  • [jest-circus] Added explicit mention of test failing because done() is not being called in error message (#13847)
  • [jest-runtime] Handle CJS re-exports of node core modules from ESM (#13856)
  • [jest-transform] Downgrade write-file-atomic to v4 (#13853)
  • [jest-worker] Ignore IPC messages not intended for Jest (#13543)

Chore & Maintenance

  • [*] make sure to exclude .eslintcache from published module (#13832)
  • [docs] Cleanup incorrect links in CHANGELOG.md (#13857)

New Contributors

Full Changelog: v29.4.1...v29.4.2

29.4.0

Features

  • [expect, @jest/expect-utils] Support custom equality testers (#13654)
  • [jest-config, jest-worker] Use os.availableParallelism if available to calculate number of workers to spawn (#13738)
  • [@jest/globals, jest-mock] Add jest.replaceProperty() that replaces property value (#13496)
  • [jest-haste-map] ignore Sapling vcs directories (.sl/) (#13674)
  • [jest-resolve] Support subpath imports (#13705, #13723, #13777)
  • [jest-runtime] Add jest.isolateModulesAsync for scoped module initialization of asynchronous functions (#13680)
  • [jest-runtime] Add jest.isEnvironmentTornDown function (#13741)
  • [jest-test-result] Added skipped and focused status to FormattedTestResult (#13700)
  • [jest-transform] Support for asynchronous createTransformer (#13762)

Fixes

  • [jest-environment-node] Fix non-configurable globals (#13687)
  • [@jest/expect-utils] toMatchObject should handle Symbol properties (#13639)
  • [jest-mock] Fix mockReset and resetAllMocks undefined return value(#13692)
  • [jest-resolve] Add global paths to require.resolve.paths (#13633)
  • [jest-resolve] Correct node core module detection when using node: specifiers (#13806)
  • [jest-runtime] Support WASM files that import JS resources (#13608)
  • [jest-runtime] Use the scriptTransformer cache in jest-runner (#13735)
  • [jest-runtime] Enforce import assertions when importing JSON in ESM (#12755 & #13805)
  • [jest-snapshot] Make sure to import babel outside of the sandbox (#13694)
  • [jest-transform] Ensure the correct configuration is passed to preprocessors specified multiple times in the transform option (#13770)

Chore & Maintenance

  • [@jest/fake-timers] Update @sinonjs/fake-timers (#13612)
  • [docs] Improve custom puppeteer example to prevent worker warnings (#13619)

New Contributors

Full Changelog: v29.3.1...v29.4.0

29.2.0

Features

  • [@jest/cli, jest-config] A seed for the test run will be randomly generated, or set by a CLI option (#13400)
  • [@jest/cli, jest-config] --show-seed will display the seed value in the report, and can be set via a CLI flag or through the config file (#13400)
  • [jest-config] Add readInitialConfig utility function (#13356)
  • [jest-core] Allow testResultsProcessor to be async (#13343)
  • [@jest/environment, jest-environment-node, jest-environment-jsdom, jest-runtime] Add getSeed() to the jest object (#13400)
  • [expect, @jest/expect-utils] Allow isA utility to take a type argument (#13355)
  • [expect] Expose AsyncExpectationResult and SyncExpectationResult types (#13411)

Fixes

  • [babel-plugin-jest-hoist] Ignore TSTypeQuery when checking for hoisted references (#13367)
  • [jest-core] Fix detectOpenHandles false positives for some special objects such as TLSWRAP (#13414)
  • [jest-mock] Fix mocking of getters and setters on classes (#13398)
  • [jest-reporters] Revert: Transform file paths into hyperlinks (#13399)
  • [@jest/types] Infer type of each table correctly when the table is a tuple or array (#13381)
  • [@jest/types] Rework typings to allow the *ReturnedWith matchers to be called with no argument (#13385)

Chore & Maintenance

  • [*] Update @babel/* deps, resulting in slightly different stack traces for each (#13422)

Performance

  • [jest-runner] Do not instrument v8 coverage data if coverage should not be collected (#13282)

New Contributors

Full Changelog: v29.1.2...v29.2.0

29.0.2

Features

  • [jest-transform] Expose TransformFactory type (#13184)

Fixes

  • [babel-plugin-jest-hoist] Support imported jest in mock factory (#13188)
  • [jest-mock] Align the behavior and return type of generateFromMetadata method (#13207)
  • [jest-runtime] Support jest.resetModules() with ESM (#13211)

New Contributors

Full Changelog: v29.0.1...v29.0.2

29.0.0

Blog post: https://jestjs.io/blog/2022/08/25/jest-29

Features

  • [expect] [BREAKING] Differentiate between MatcherContext MatcherUtils and MatcherState types (#13141)
  • [jest-circus] Add support for test.failing.each (#13142)
  • [jest-config] [BREAKING] Make snapshotFormat default to escapeString: false and printBasicPrototype: false (#13036)
  • [jest-config] [BREAKING] Remove undocumented collectCoverageOnlyFrom option (#13156)
  • [jest-environment-jsdom] [BREAKING] Upgrade to jsdom@20 (#13037, #13058)
  • [@jest/globals] Add jest.Mocked, jest.MockedClass, jest.MockedFunction and jest.MockedObject utility types (#12727)
  • [jest-mock] [BREAKING] Refactor Mocked* utility types. MaybeMockedDeep and MaybeMocked became Mocked and MockedShallow respectively; only deep mocked variants of MockedClass, MockedFunction and MockedObject are exported (#13123, #13124)
  • [jest-mock] [BREAKING] Change the default jest.mocked helper’s behavior to deep mocked (#13125)
  • [jest-snapshot] [BREAKING] Let babel find config when updating inline snapshots (#13150)
  • [@jest/test-result, @jest/types] [BREAKING] Replace Bytes and Milliseconds types with number (#13155)
  • [jest-worker] Adds workerIdleMemoryLimit option which is used as a check for worker memory leaks >= Node 16.11.0 and recycles child workers as required (#13056, #13105, #13106, #13107)
  • [pretty-format] [BREAKING] Remove ConvertAnsi plugin in favour of jest-serializer-ansi-escapes (#13040)
  • [pretty-format] Allow to opt out from sorting object keys with compareKeys: null (#12443)

Fixes

  • [jest-config] Fix testing multiple projects with TypeScript config files (#13099)
  • [@jest/expect-utils] Fix deep equality of ImmutableJS Record (#13055)
  • [jest-haste-map] Increase the maximum possible file size that jest-haste-map can handle (#13094)
  • [jest-runtime] Properly support CJS re-exports from dual packages (#13170)
  • [jest-snapshot] Make prettierPath optional in SnapshotState (#13149)
  • [jest-snapshot] Fix parsing error from inline snapshot files with JSX (#12760)
  • [jest-worker] When a process runs out of memory worker exits correctly and doesn't spin indefinitely (#13054)

Chore & Maintenance

  • [*] [BREAKING] Drop support for Node v12 and v17 (#13033)
  • [docs] Fix webpack name (#13049)
  • [docs] Explicit how to set n for --bail (#13128)
  • [docs] Update Enzyme URL (#13166)
  • [jest-leak-detector] Remove support for weak-napi (#13035)
  • [jest-snapshot] [BREAKING] Require rootDir as argument to SnapshotState (#13150)

New Contributors

Full Changelog: v28.1.3...v29.0.0

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ braces (indirect, 3.0.2 → 3.0.3) · Repo · Changelog

Security Advisories 🚨

🚨 Uncontrolled resource consumption in braces

The NPM package braces fails to limit the number of characters it can handle, which could lead to Memory Exhaustion. In lib/parse.js, if a malicious user sends "imbalanced braces" as input, the parsing will enter a loop, which will cause the program to start allocating heap memory without freeing it at any moment of the loop. Eventually, the JavaScript heap limit is reached, and the program will crash.

Commits

See the full diff on Github. The new version differs by 12 commits:

↗️ browserslist (indirect, 4.20.2 → 4.25.4) · Repo · Changelog

Release Notes

Too many releases to show here. View the full release notes.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ caniuse-lite (indirect, 1.0.30001320 → 1.0.30001739) · Repo · Changelog

↗️ ci-info (indirect, 3.3.2 → 4.3.0) · Repo · Changelog

Release Notes

Too many releases to show here. View the full release notes.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ cjs-module-lexer (indirect, 1.2.2 → 2.1.0) · Repo · Changelog

Release Notes

2.1.0

What's Changed

  • Add instructions for creating a release to the readme. by @mhdawson in #109
  • fix: restore configuration through env variables by @mhdawson in #111

Full Changelog: 2.0.0...2.1.0

2.0.0

What's Changed

New Contributors

Full Changelog: 1.4.1...2.0.0

1.4.2

What's Changed

New Contributors

Full Changelog: 1.4.1...1.4.2

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by 31 commits:

↗️ cliui (indirect, 7.0.4 → 8.0.1) · Repo · Changelog

Release Notes

8.0.1

8.0.1 (2022-10-01)

Bug Fixes

  • deps: move rollup-plugin-ts to dev deps (#124) (7c8bd6b)

8.0.0

8.0.0 (2022-09-30)

BREAKING CHANGES

Bug Fixes

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by 6 commits:

↗️ collect-v8-coverage (indirect, 1.0.1 → 1.0.2) · Repo · Changelog

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ cross-spawn (indirect, 7.0.3 → 7.0.6) · Repo · Changelog

Security Advisories 🚨

🚨 Regular Expression Denial of Service (ReDoS) in cross-spawn

Versions of the package cross-spawn before 7.0.5 are vulnerable to Regular Expression Denial of Service (ReDoS) due to improper input sanitization. An attacker can increase the CPU usage and crash the program by crafting a very large and well crafted string.

Release Notes

7.0.6 (from changelog)

Bug Fixes

  • update cross-spawn version to 7.0.5 in package-lock.json (f700743)

7.0.5 (from changelog)

Bug Fixes

  • fix escaping bug introduced by backtracking (640d391)

7.0.4 (from changelog)

Bug Fixes

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by 15 commits:

↗️ dedent (indirect, 0.7.0 → 1.6.0) · Repo · Changelog

Release Notes

1.6.0

What's Changed

  • feat: add trimWhitespace option by @43081j in #97

New Contributors

Full Changelog: v1.5.3...v1.6.0

1.5.3

What's Changed

Full Changelog: v1.5.2...v1.5.3

1.5.2

What's Changed

New Contributors

Full Changelog: v1.5.1...v1.5.2

1.5.1

  • fix: add missing dedent.d.mts entry to package.json files (#73)

1.5.0

  • feat: add options with escapeSpecialCharacters (#65)

1.4.0

  • fix: fix missing ESM type definition file (#67)
  • fix: consume first level of escaping of $ and { characters (#46)

1.3.0

  • fix: add missing exports field to package.json (#59)

1.0.0

This version was given the beta tag in npm.

  • fix: add babel-plugin-add-module-exports (#40)
  • build: publish ESM and .d.ts (#32)
  • build: re-run build to refresh dist/dedent.js (#38)

Note: although this was a new major version, it contains no breaking changes from 0.x.
The versioning intent was purely to signal that the API is stable.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by 55 commits:

↗️ deepmerge (indirect, 4.2.2 → 4.3.1) · Repo · Changelog

Release Notes

4.3.1 (from changelog)

  • Fix type definition for arrayMerge options. #239

4.3.0 (from changelog)

  • Avoid thrown errors if the target doesn't have propertyIsEnumerable. #252

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by 20 commits:

↗️ electron-to-chromium (indirect, 1.4.96 → 1.5.213) · Repo · Changelog

Commits

See the full diff on Github. The new version differs by 2 commits:

↗️ emittery (indirect, 0.10.2 → 0.13.1) · Repo

Release Notes

0.13.1

v0.13.0...v0.13.1

0.13.0

  • Internal: Properly clean up listener storage (#103) 3641e7a

v0.12.1...v0.13.0

0.12.1

  • Internal: Use a different approach to prevent consumers from emitting meta events (#98) c07c783

v0.12.0...v0.12.1

0.12.0

  • Add an off method to the promise returned from .once() (#100) e0b4ba7
  • Make Emittery.mixin type support arguments in constructor 32ddcbe

v0.11.0...v0.12.0

0.11.0

v0.10.2...v0.11.0

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by 12 commits:

↗️ escalade (indirect, 3.1.1 → 3.2.0) · Repo

Release Notes

3.2.0

Patches

  • Declare separate ESM and CommonJS TypeScript definitions: a72e1c3
    Previously, only ESM definitions were shipped but were exported in a way that could cause tool/resolution ambiguity.

Chores

  • Update Node.js version matrix in CI suite: a8c6820

Full Changelog: v3.1.2...v3.2.0

3.1.2

Patches

Chores


Full Changelog: v3.1.1...v3.1.2

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by 7 commits:

↗️ expect (indirect, 28.1.3 → 30.1.2) · Repo · Changelog

Release Notes

Too many releases to show here. View the full release notes.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ fb-watchman (indirect, 2.0.1 → 2.0.2) · Repo

Sorry, we couldn’t find anything useful about this release.

↗️ fill-range (indirect, 7.0.1 → 7.1.1) · Repo

Commits

See the full diff on Github. The new version differs by 7 commits:

↗️ fsevents (indirect, 2.3.2 → 2.3.3) · Repo

Release Notes

2.3.3

Released to npm as v2.3.3

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by 7 commits:

↗️ graceful-fs (indirect, 4.2.9 → 4.2.11) · Repo

Commits

See the full diff on Github. The new version differs by 15 commits:

↗️ import-local (indirect, 3.1.0 → 3.2.0) · Repo

Release Notes

3.2.0

v3.1.0...v3.2.0

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by 3 commits:

↗️ istanbul-lib-coverage (indirect, 3.2.0 → 3.2.2) · Repo · Changelog

Release Notes

3.2.2 (from changelog)

Bug Fixes

3.2.1 (from changelog)

Bug Fixes

Does any of this look wrong? Please let us know.

↗️ istanbul-lib-instrument (indirect, 5.2.0 → 6.0.3) · Repo · Changelog

Release Notes

6.0.3 (from changelog)

Bug Fixes

  • allow use of importAttributes Babel parser plugin (#786) (a44a124)

6.0.2 (from changelog)

Bug Fixes

6.0.1 (from changelog)

Bug Fixes

6.0.0 (from changelog)

⚠ BREAKING CHANGES

  • deps: minimum Node version bumped to 10.

Bug Fixes

5.2.1 (from changelog)

Bug Fixes

  • handle error when inputSourceMap is not a plain object (#662) (3e3611f)

Does any of this look wrong? Please let us know.

↗️ istanbul-lib-report (indirect, 3.0.0 → 3.0.1) · Repo · Changelog

Release Notes

3.0.1 (from changelog)

Bug Fixes

Does any of this look wrong? Please let us know.

↗️ istanbul-lib-source-maps (indirect, 4.0.1 → 5.0.6) · Repo · Changelog

Release Notes

5.0.6 (from changelog)

Bug Fixes

  • istanbul-lib-source-maps implicit else crash edge case (#789) (bbb5815)

5.0.5 (from changelog)

Bug Fixes

  • istanbul-lib-source-maps to preserve implicit else when sourcemaps are used (#706) (d16a155)

Does any of this look wrong? Please let us know.

↗️ istanbul-reports (indirect, 3.1.5 → 3.2.0) · Repo · Changelog

Release Notes

3.2.0 (from changelog)

Features

  • update HTML report filter to take a RegEx (#796) (a739999)

Bug Fixes

3.1.7 (from changelog)

Bug Fixes

  • ux: address bug with firefox event handling (2207a87)

3.1.6 (from changelog)

Bug Fixes

  • clover: always close last open tag (07c6ea6)

Does any of this look wrong? Please let us know.

↗️ jest-changed-files (indirect, 28.1.3 → 30.0.5) · Repo · Changelog

Release Notes

30.0.5 (from changelog)

Features

  • [jest-config] Allow testMatch to take a string value
  • [jest-worker] Let workerIdleMemoryLimit accept 0 to always restart worker child processes

Fixes

  • [expect] Fix bigint error (#15702)

30.0.2

What's Changed

Fixes

  • [jest-matcher-utils] Make 'deepCyclicCopyObject' safer by setting descriptors to a null-prototype object (#15689)
  • [jest-util] Make garbage collection protection property writable (#15689)

Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md

30.0.1

What's Changed

Features

  • [jest-resolver] Implement the defaultAsyncResolver (#15679)

Fixes

  • [jest-resolver] Resolve builtin modules correctly (#15683)
  • [jest-environment-node, jest-util] Avoid setting globals cleanup protection symbol when feature is off (#15684)

Chore & Maintenance

  • [*] Remove and deprecate jest-repl package (#15673)
  • [jest-resolver] Replace custom isBuiltinModule with node's isBuiltin (#15685)

New Contributors

Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md

30.0.0

Today we are happy to announce the release of Jest 30. This release features a substantial number of changes, fixes, and improvements. While it is one of the largest major releases of Jest ever, we admit that three years for a major release is too long. In the future, we are aiming to make more frequent major releases to keep Jest great for the next decade.

If you want to skip all the news and just get going, run npm install jest@^30.0.0 and follow the migration guide: Upgrading from Jest 29 to 30.

Read the full blog post

Features

  • [*] Renamed globalsCleanupMode to globalsCleanup and --waitNextEventLoopTurnForUnhandledRejectionEvents to --waitForUnhandledRejections
  • [expect] Add ArrayOf asymmetric matcher for validating array elements. (#15567)
  • [babel-jest] Add option excludeJestPreset to allow opting out of babel-preset-jest (#15164)
  • [expect] Revert #15038 to fix expect(fn).toHaveBeenCalledWith(expect.objectContaining(...)) when there are multiple calls (#15508)
  • [jest-circus, jest-cli, jest-config] Add waitNextEventLoopTurnForUnhandledRejectionEvents flag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)
  • [jest-circus] Add a waitBeforeRetry option to jest.retryTimes (#14738)
  • [jest-circus] Add a retryImmediately option to jest.retryTimes (#14696)
  • [jest-circus, jest-jasmine2] Allow setupFilesAfterEnv to export an async function (#10962)
  • [jest-circus, jest-test-result] Add startedAt timestamp in TestCaseResultObject within onTestCaseResult (#15145)
  • [jest-cli] Export buildArgv (#15310)
  • [jest-config] [BREAKING] Add mts and cts to default moduleFileExtensions config (#14369)
  • [jest-config] [BREAKING] Update testMatch and testRegex default option for supporting mjs, cjs, mts, and cts (#14584)
  • [jest-config] Loads config file from provided path in package.json (#14044)
  • [jest-config] Allow loading jest.config.cts files (#14070)
  • [jest-config] Show rootDir in error message when a preset fails to load (#15194)
  • [jest-config] Support loading TS config files using esbuild-register via docblock loader (#15190)
  • [jest-config] Allow passing TS config loader options via docblock comment (#15234)
  • [jest-config] If Node is running with type stripping enabled, do not require a TS loader (#15480)
  • [@jest/core] Group together open handles with the same stack trace (#13417, & #14789)
  • [@jest/core] Add perfStats to surface test setup overhead (#14622)
  • [@jest/core] [BREAKING] Changed --filter to accept an object with shape { filtered: Array<string> } to match documentation (#13319)
  • [@jest/core] Support --outputFile option for --listTests (#14980)
  • [@jest/core] Stringify Errors properly with --json flag (#15329)
  • [@jest/core, @jest/test-sequencer] [BREAKING] Exposes globalConfig & contexts to TestSequencer (#14535, & #14543)
  • [jest-each] Introduce %$ option to add number of the test to its title (#14710)
  • [@jest/environment] [BREAKING] Remove deprecated jest.genMockFromModule() (#15042)
  • [@jest/environment] [BREAKING] Remove unnecessary defensive code (#15045)
  • [jest-environment-jsdom] [BREAKING] Upgrade JSDOM to v22 (#13825)
  • [@jest/environment-jsdom-abstract] Introduce new package which abstracts over the jsdom environment, allowing usage of custom versions of JSDOM (#14717)
  • [jest-environment-node] Update jest environment with dispose symbols Symbol (#14888 & #14909)
  • [expect, @jest/expect] [BREAKING] Add type inference for function parameters in CalledWith assertions (#15129)
  • [@jest/expect-utils] Properly compare all types of TypedArrays (#15178)
  • [@jest/fake-timers] [BREAKING] Upgrade @sinonjs/fake-timers to v13 (#14544 & #15470)
  • [@jest/fake-timers] Exposing new modern timers function advanceTimersToFrame() which advances all timers by the needed milliseconds to execute callbacks currently scheduled with requestAnimationFrame (#14598)
  • [jest-matcher-utils] Add SERIALIZABLE_PROPERTIES to allow custom serialization of objects (#14893)
  • [jest-mock] Add support for the Explicit Resource Management proposal to use the using keyword with jest.spyOn(object, methodName) (#14895)
  • [jest-reporters] Add support for DEC mode 2026 (#15008)
  • [jest-resolver] Support file:// URLs as paths (#15154)
  • [jest-resolve,jest-runtime,jest-resolve-dependencies] Pass the conditions when resolving stub modules (#15489)
  • [jest-runtime] Exposing new modern timers function jest.advanceTimersToFrame() from @jest/fake-timers (#14598)
  • [jest-runtime] Support import.meta.filename and import.meta.dirname (available from Node 20.11) (#14854)
  • [jest-runtime] Support import.meta.resolve (#14930)
  • [jest-runtime] [BREAKING] Make it mandatory to pass globalConfig to the Runtime constructor (#15044)
  • [jest-runtime] Add unstable_unmockModule (#15080)
  • [jest-runtime] Add onGenerateMock transformer callback for auto generated callbacks (#15433 & #15482)
  • [jest-runtime] [BREAKING] Use vm.compileFunction over vm.Script (#15461)
  • [@jest/schemas] Upgrade @sinclair/typebox to v0.34 (#15450)
  • [@jest/types] test.each(): Accept a readonly (as const) table properly (#14565)
  • [@jest/types] Improve argument type inference passed to test and describe callback functions from each tables (#14920)
  • [jest-snapshot] [BREAKING] Add support for Error causes in snapshots (#13965)
  • [jest-snapshot] Support Prettier 3 (#14566)
  • [@jest/util-snapshot] Extract utils used by tooling from jest-snapshot into its own package (#15095)
  • [pretty-format] [BREAKING] Do not render empty string children ('') in React plugin (#14470)

Fixes

  • [expect] Show AggregateError to display (#15346)
  • [*] Replace exit with exit-x (#15399)
  • [babel-plugin-jest-hoist] Use denylist instead of the deprecated blacklist for Babel 8 support (#14109)
  • [babel-plugin-jest-hoist] Do not rely on buggy Babel behaviour (#15415)
  • [expect] Check error instance type for toThrow/toThrowError (#14576)
  • [expect] Improve diff for failing expect.objectContaining (#15038)
  • [expect] Use Array.isArray to check if an array is an Array (#15101)
  • [expect] Fix Error cause assertion errors (#15339)
  • [jest-changed-files] Print underlying errors when VCS commands fail (#15052)
  • [jest-changed-files] Abort sl root call if output resembles a steam locomotive (#15053)
  • [jest-circus] [BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)
  • [jest-circus] Replace recursive makeTestResults implementation with iterative one (#14760)
  • [jest-circus] Omit expect.hasAssertions() errors if a test already has errors (#14866)
  • [jest-circus, jest-expect, jest-snapshot] Pass test.failing tests when containing failing snapshot matchers (#14313)
  • [jest-circus] Concurrent tests now emit jest circus events at the correct point and in the expected order. (#15381)
  • [jest-cli] [BREAKING] Validate CLI flags that require arguments receives them (#14783)
  • [jest-config] Make sure to respect runInBand option (#14578)
  • [jest-config] Support testTimeout in project config (#14697)
  • [jest-config] Support coverageReporters in project config (#14697)
  • [jest-config] Allow reporters in project config (#14768)
  • [jest-config] Allow Node16/NodeNext/Bundler moduleResolution in project's tsconfig (#14739)
  • [@jest/create-cache-key-function] Correct the return type of createCacheKey (#15159)
  • [jest-each] Allow $keypath templates with null or undefined values (#14831)
  • [@jest/expect-utils] Fix comparison of DataView (#14408)
  • [@jest/expect-utils] [BREAKING] exclude non-enumerable in object matching (#14670)
  • [@jest/expect-utils] Fix comparison of URL (#14672)
  • [@jest/expect-utils] Check Symbol properties in equality (#14688)
  • [@jest/expect-utils] Catch circular references within arrays when matching objects (#14894)
  • [@jest/expect-utils] Fix not addressing to Sets and Maps as objects without keys (#14873)
  • [jest-haste-map] Fix errors or clobbering with multiple hasteImplModulePaths (#15522)
  • [jest-leak-detector] Make leak-detector more aggressive when running GC (#14526)
  • [jest-runtime] Properly handle re-exported native modules in ESM via CJS (#14589)
  • [jest-runtime] Refactor _importCoreModel so required core module is consistent if modified while loading (#15077)
  • [jest-schemas, jest-types] [BREAKING] Fix type of testFailureExitCode config option(#15232)
  • [jest-util] Make sure isInteractive works in a browser (#14552)
  • [pretty-format] [BREAKING] Print ArrayBuffer and DataView correctly (#14290)
  • [pretty-format] Fixed a bug where "anonymous custom elements" were not being printed as expected. (#15138)
  • [jest-cli] When specifying paths on the command line, only match against the relative paths of the test files (#12519)
    • [BREAKING] Changes testPathPattern configuration option to testPathPatterns, which now takes a list of patterns instead of the regex.
    • [BREAKING] --testPathPattern is now --testPathPatterns
    • [BREAKING] Specifying testPathPatterns when programmatically calling watch must be specified as new TestPathPatterns(patterns), where TestPathPatterns can be imported from @jest/pattern
  • [jest-reporters, jest-runner] Unhandled errors without stack get correctly logged to console (#14619)
  • [jest-util] Always load mjs files with import (#15447)
  • [jest-worker] Properly handle a circular reference error when worker tries to send an assertion fails where either the expected or actual value is circular (#15191)
  • [jest-worker] Properly handle a BigInt when worker tries to send an assertion fails where either the expected or actual value is BigInt (#15191)
  • [expect] Resolve issue where ObjectContaining matched non-object values. ([#15463])(#15463).
    • Adds a conditional/check to ensure the argument passed to expect is an object.
    • Add unit tests for new ObjectContaining behavior.
    • Remove invalid/wrong test case assertions for ObjectContaining.
  • [jest-worker] Addresses incorrect state on exit (#15610)

Performance

  • [*] [BREAKING] Bundle all of Jest's modules into index.js (#12348, #14550 & #14661)
  • [jest-haste-map] Only spawn one process to check for watchman installation (#14826)
  • [jest-runner] Better cleanup source-map-support after test to resolve (minor) memory leak (#15233)
  • [jest-circus, jest-environment-node, jest-repl, jest-runner, jest-util] Cleanup global variables on environment teardown to reduce memory leaks (#15215 & #15636 & #15643)

Chore & Maintenance

  • [jest-environment-jsdom, jest-environment-jsdom-abstract] Increased version of jsdom to ^26.0.0 (#15325CVE-2024-37890)
  • [*] Increase version of micromatch to ^4.0.7 (#15082)
  • [*] [BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)
  • [*] [BREAKING] Drop support for typescript@4.3, minimum version is now 5.4 (#14542, #15621)
  • [*] Depend on exact versions of monorepo dependencies instead of ^ range (#14553)
  • [*] [BREAKING] Add ESM wrapper for all of Jest's modules (#14661)
  • [*] [BREAKING] Upgrade to glob@10 (#14509)
  • [*] Use TypeError over Error where appropriate (#14799)
  • [docs] Fix typos in CHANGELOG.md and packages/jest-validate/README.md (#14640)
  • [docs] Don't use alias matchers in docs (#14631)
  • [babel-jest, babel-preset-jest] [BREAKING] Increase peer dependency of @babel/core to ^7.11 (#14109)
  • [babel-jest, @jest/transform] Update babel-plugin-istanbul to v6 (#15156)
  • [babel-plugin-jest-hoist] Move unnecessary dependencies to devDependencies (#15010)
  • [expect] [BREAKING] Remove .toBeCalled(), .toBeCalledTimes(), .toBeCalledWith(), .lastCalledWith(), .nthCalledWith(), .toReturn(), .toReturnTimes(), .toReturnWith(), .lastReturnedWith(), .nthReturnedWith() and .toThrowError() matcher aliases (#14632)
  • [jest-cli, jest-config, @jest/types] [BREAKING] Remove deprecated --init argument (#14490)
  • [jest-config, @jest/core, jest-util] Upgrade ci-info (#14655)
  • [jest-mock] [BREAKING] Remove MockFunctionMetadataType, MockFunctionMetadata and SpyInstance types (#14621)
  • [@jest/reporters] Upgrade istanbul-lib-source-maps (#14924)
  • [jest-schemas] Upgrade @sinclair/typebox (#14775)
  • [jest-transform] Upgrade write-file-atomic (#14274)
  • [jest-util] Upgrade picomatch to v4 (#14653 & #14885)
  • [docs] Append to NODE_OPTIONS, not overwrite ([#14730](https://github.com/jestjs/jest/pull/14730))
  • [docs] Updated .toHaveBeenCalled() documentation to correctly reflect its functionality (#14842)
  • [docs] Link NestJS documentation on testing with Jest (#14940)
  • [docs] Revised documentation for .toHaveBeenCalled() to accurately depict its functionality. (#14853)
  • [docs] Removed ExpressJS reference link from documentation due to dead link (#15270)
  • [docs] Correct broken links in docs (#15359)

See the CHANGELOG.

29.7.0

Features

  • [create-jest] Add npm init / yarn create initialiser for Jest projects (#14465)
  • [jest-validate] Allow deprecation warnings for unknown options (#14499)

Fixes

  • [jest-resolver] Replace unmatched capture groups in moduleNameMapper with empty string instead of undefined (#14507)
  • [jest-snapshot] Allow for strings as well as template literals in inline snapshots (#14465)
  • [@jest/test-sequencer] Calculate test runtime if perStats.duration is missing (#14473)

Performance

  • [@jest/create-cache-key-function] Cache access of NODE_ENV and BABEL_ENV (#14455)

Chore & Maintenance

  • [jest-cli] Move internal config initialisation logic to the create-jest package (#14465)

New Contributors

Full Changelog: v29.6.4...v29.7.0

29.6.3

Fixes

  • [expect, @jest/expect-utils] ObjectContaining support symbol as key (#14414)
  • [expect] Remove @types/node from dependencies (#14385)
  • [jest-core] Use workers in watch mode by default to avoid crashes (#14059 & #14085).
  • [jest-reporters] Update istanbul-lib-instrument dependency to v6. (#14401)
  • [jest-mock] Revert #13692 as it was a breaking change (#14429)
  • [jest-mock] Revert #13866 as it was a breaking change (#14429)
  • [jest-mock] Revert #13867 as it was a breaking change (#14429)
  • [@jest/reporters] Marks Reporter's hooks as optional (#14433)
  • [jest-runtime] Fix dynamic ESM import module bug when loaded module through jest.isolateModulesAsync (#14397)

Chore & Maintenance

  • [jest-changed-files, jest-circus, jest-console, @jest/core, @jest/runtime, @jest/transform] Use invariant and notEmpty from jest-util rather than own internal (#14366)

New Contributors

Full Changelog: v29.6.2...v29.6.3

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ jest-circus (indirect, 28.1.3 → 30.1.3) · Repo · Changelog

Release Notes

Too many releases to show here. View the full release notes.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ jest-cli (indirect, 28.1.3 → 30.1.3) · Repo · Changelog

Release Notes

Too many releases to show here. View the full release notes.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ jest-config (indirect, 28.1.3 → 30.1.3) · Repo · Changelog

Release Notes

Too many releases to show here. View the full release notes.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ jest-diff (indirect, 28.1.3 → 30.1.2) · Repo · Changelog

Release Notes

Too many releases to show here. View the full release notes.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ jest-docblock (indirect, 28.1.1 → 30.0.1) · Repo · Changelog

Release Notes

30.0.1

What's Changed

Features

  • [jest-resolver] Implement the defaultAsyncResolver (#15679)

Fixes

  • [jest-resolver] Resolve builtin modules correctly (#15683)
  • [jest-environment-node, jest-util] Avoid setting globals cleanup protection symbol when feature is off (#15684)

Chore & Maintenance

  • [*] Remove and deprecate jest-repl package (#15673)
  • [jest-resolver] Replace custom isBuiltinModule with node's isBuiltin (#15685)

New Contributors

Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md

30.0.0

Today we are happy to announce the release of Jest 30. This release features a substantial number of changes, fixes, and improvements. While it is one of the largest major releases of Jest ever, we admit that three years for a major release is too long. In the future, we are aiming to make more frequent major releases to keep Jest great for the next decade.

If you want to skip all the news and just get going, run npm install jest@^30.0.0 and follow the migration guide: Upgrading from Jest 29 to 30.

Read the full blog post

Features

  • [*] Renamed globalsCleanupMode to globalsCleanup and --waitNextEventLoopTurnForUnhandledRejectionEvents to --waitForUnhandledRejections
  • [expect] Add ArrayOf asymmetric matcher for validating array elements. (#15567)
  • [babel-jest] Add option excludeJestPreset to allow opting out of babel-preset-jest (#15164)
  • [expect] Revert #15038 to fix expect(fn).toHaveBeenCalledWith(expect.objectContaining(...)) when there are multiple calls (#15508)
  • [jest-circus, jest-cli, jest-config] Add waitNextEventLoopTurnForUnhandledRejectionEvents flag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)
  • [jest-circus] Add a waitBeforeRetry option to jest.retryTimes (#14738)
  • [jest-circus] Add a retryImmediately option to jest.retryTimes (#14696)
  • [jest-circus, jest-jasmine2] Allow setupFilesAfterEnv to export an async function (#10962)
  • [jest-circus, jest-test-result] Add startedAt timestamp in TestCaseResultObject within onTestCaseResult (#15145)
  • [jest-cli] Export buildArgv (#15310)
  • [jest-config] [BREAKING] Add mts and cts to default moduleFileExtensions config (#14369)
  • [jest-config] [BREAKING] Update testMatch and testRegex default option for supporting mjs, cjs, mts, and cts (#14584)
  • [jest-config] Loads config file from provided path in package.json (#14044)
  • [jest-config] Allow loading jest.config.cts files (#14070)
  • [jest-config] Show rootDir in error message when a preset fails to load (#15194)
  • [jest-config] Support loading TS config files using esbuild-register via docblock loader (#15190)
  • [jest-config] Allow passing TS config loader options via docblock comment (#15234)
  • [jest-config] If Node is running with type stripping enabled, do not require a TS loader (#15480)
  • [@jest/core] Group together open handles with the same stack trace (#13417, & #14789)
  • [@jest/core] Add perfStats to surface test setup overhead (#14622)
  • [@jest/core] [BREAKING] Changed --filter to accept an object with shape { filtered: Array<string> } to match documentation (#13319)
  • [@jest/core] Support --outputFile option for --listTests (#14980)
  • [@jest/core] Stringify Errors properly with --json flag (#15329)
  • [@jest/core, @jest/test-sequencer] [BREAKING] Exposes globalConfig & contexts to TestSequencer (#14535, & #14543)
  • [jest-each] Introduce %$ option to add number of the test to its title (#14710)
  • [@jest/environment] [BREAKING] Remove deprecated jest.genMockFromModule() (#15042)
  • [@jest/environment] [BREAKING] Remove unnecessary defensive code (#15045)
  • [jest-environment-jsdom] [BREAKING] Upgrade JSDOM to v22 (#13825)
  • [@jest/environment-jsdom-abstract] Introduce new package which abstracts over the jsdom environment, allowing usage of custom versions of JSDOM (#14717)
  • [jest-environment-node] Update jest environment with dispose symbols Symbol (#14888 & #14909)
  • [expect, @jest/expect] [BREAKING] Add type inference for function parameters in CalledWith assertions (#15129)
  • [@jest/expect-utils] Properly compare all types of TypedArrays (#15178)
  • [@jest/fake-timers] [BREAKING] Upgrade @sinonjs/fake-timers to v13 (#14544 & #15470)
  • [@jest/fake-timers] Exposing new modern timers function advanceTimersToFrame() which advances all timers by the needed milliseconds to execute callbacks currently scheduled with requestAnimationFrame (#14598)
  • [jest-matcher-utils] Add SERIALIZABLE_PROPERTIES to allow custom serialization of objects (#14893)
  • [jest-mock] Add support for the Explicit Resource Management proposal to use the using keyword with jest.spyOn(object, methodName) (#14895)
  • [jest-reporters] Add support for DEC mode 2026 (#15008)
  • [jest-resolver] Support file:// URLs as paths (#15154)
  • [jest-resolve,jest-runtime,jest-resolve-dependencies] Pass the conditions when resolving stub modules (#15489)
  • [jest-runtime] Exposing new modern timers function jest.advanceTimersToFrame() from @jest/fake-timers (#14598)
  • [jest-runtime] Support import.meta.filename and import.meta.dirname (available from Node 20.11) (#14854)
  • [jest-runtime] Support import.meta.resolve (#14930)
  • [jest-runtime] [BREAKING] Make it mandatory to pass globalConfig to the Runtime constructor (#15044)
  • [jest-runtime] Add unstable_unmockModule (#15080)
  • [jest-runtime] Add onGenerateMock transformer callback for auto generated callbacks (#15433 & #15482)
  • [jest-runtime] [BREAKING] Use vm.compileFunction over vm.Script (#15461)
  • [@jest/schemas] Upgrade @sinclair/typebox to v0.34 (#15450)
  • [@jest/types] test.each(): Accept a readonly (as const) table properly (#14565)
  • [@jest/types] Improve argument type inference passed to test and describe callback functions from each tables (#14920)
  • [jest-snapshot] [BREAKING] Add support for Error causes in snapshots (#13965)
  • [jest-snapshot] Support Prettier 3 (#14566)
  • [@jest/util-snapshot] Extract utils used by tooling from jest-snapshot into its own package (#15095)
  • [pretty-format] [BREAKING] Do not render empty string children ('') in React plugin (#14470)

Fixes

  • [expect] Show AggregateError to display (#15346)
  • [*] Replace exit with exit-x (#15399)
  • [babel-plugin-jest-hoist] Use denylist instead of the deprecated blacklist for Babel 8 support (#14109)
  • [babel-plugin-jest-hoist] Do not rely on buggy Babel behaviour (#15415)
  • [expect] Check error instance type for toThrow/toThrowError (#14576)
  • [expect] Improve diff for failing expect.objectContaining (#15038)
  • [expect] Use Array.isArray to check if an array is an Array (#15101)
  • [expect] Fix Error cause assertion errors (#15339)
  • [jest-changed-files] Print underlying errors when VCS commands fail (#15052)
  • [jest-changed-files] Abort sl root call if output resembles a steam locomotive (#15053)
  • [jest-circus] [BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)
  • [jest-circus] Replace recursive makeTestResults implementation with iterative one (#14760)
  • [jest-circus] Omit expect.hasAssertions() errors if a test already has errors (#14866)
  • [jest-circus, jest-expect, jest-snapshot] Pass test.failing tests when containing failing snapshot matchers (#14313)
  • [jest-circus] Concurrent tests now emit jest circus events at the correct point and in the expected order. (#15381)
  • [jest-cli] [BREAKING] Validate CLI flags that require arguments receives them (#14783)
  • [jest-config] Make sure to respect runInBand option (#14578)
  • [jest-config] Support testTimeout in project config (#14697)
  • [jest-config] Support coverageReporters in project config (#14697)
  • [jest-config] Allow reporters in project config (#14768)
  • [jest-config] Allow Node16/NodeNext/Bundler moduleResolution in project's tsconfig (#14739)
  • [@jest/create-cache-key-function] Correct the return type of createCacheKey (#15159)
  • [jest-each] Allow $keypath templates with null or undefined values (#14831)
  • [@jest/expect-utils] Fix comparison of DataView (#14408)
  • [@jest/expect-utils] [BREAKING] exclude non-enumerable in object matching (#14670)
  • [@jest/expect-utils] Fix comparison of URL (#14672)
  • [@jest/expect-utils] Check Symbol properties in equality (#14688)
  • [@jest/expect-utils] Catch circular references within arrays when matching objects (#14894)
  • [@jest/expect-utils] Fix not addressing to Sets and Maps as objects without keys (#14873)
  • [jest-haste-map] Fix errors or clobbering with multiple hasteImplModulePaths (#15522)
  • [jest-leak-detector] Make leak-detector more aggressive when running GC (#14526)
  • [jest-runtime] Properly handle re-exported native modules in ESM via CJS (#14589)
  • [jest-runtime] Refactor _importCoreModel so required core module is consistent if modified while loading (#15077)
  • [jest-schemas, jest-types] [BREAKING] Fix type of testFailureExitCode config option(#15232)
  • [jest-util] Make sure isInteractive works in a browser (#14552)
  • [pretty-format] [BREAKING] Print ArrayBuffer and DataView correctly (#14290)
  • [pretty-format] Fixed a bug where "anonymous custom elements" were not being printed as expected. (#15138)
  • [jest-cli] When specifying paths on the command line, only match against the relative paths of the test files (#12519)
    • [BREAKING] Changes testPathPattern configuration option to testPathPatterns, which now takes a list of patterns instead of the regex.
    • [BREAKING] --testPathPattern is now --testPathPatterns
    • [BREAKING] Specifying testPathPatterns when programmatically calling watch must be specified as new TestPathPatterns(patterns), where TestPathPatterns can be imported from @jest/pattern
  • [jest-reporters, jest-runner] Unhandled errors without stack get correctly logged to console (#14619)
  • [jest-util] Always load mjs files with import (#15447)
  • [jest-worker] Properly handle a circular reference error when worker tries to send an assertion fails where either the expected or actual value is circular (#15191)
  • [jest-worker] Properly handle a BigInt when worker tries to send an assertion fails where either the expected or actual value is BigInt (#15191)
  • [expect] Resolve issue where ObjectContaining matched non-object values. ([#15463])(#15463).
    • Adds a conditional/check to ensure the argument passed to expect is an object.
    • Add unit tests for new ObjectContaining behavior.
    • Remove invalid/wrong test case assertions for ObjectContaining.
  • [jest-worker] Addresses incorrect state on exit (#15610)

Performance

  • [*] [BREAKING] Bundle all of Jest's modules into index.js (#12348, #14550 & #14661)
  • [jest-haste-map] Only spawn one process to check for watchman installation (#14826)
  • [jest-runner] Better cleanup source-map-support after test to resolve (minor) memory leak (#15233)
  • [jest-circus, jest-environment-node, jest-repl, jest-runner, jest-util] Cleanup global variables on environment teardown to reduce memory leaks (#15215 & #15636 & #15643)

Chore & Maintenance

  • [jest-environment-jsdom, jest-environment-jsdom-abstract] Increased version of jsdom to ^26.0.0 (#15325CVE-2024-37890)
  • [*] Increase version of micromatch to ^4.0.7 (#15082)
  • [*] [BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)
  • [*] [BREAKING] Drop support for typescript@4.3, minimum version is now 5.4 (#14542, #15621)
  • [*] Depend on exact versions of monorepo dependencies instead of ^ range (#14553)
  • [*] [BREAKING] Add ESM wrapper for all of Jest's modules (#14661)
  • [*] [BREAKING] Upgrade to glob@10 (#14509)
  • [*] Use TypeError over Error where appropriate (#14799)
  • [docs] Fix typos in CHANGELOG.md and packages/jest-validate/README.md (#14640)
  • [docs] Don't use alias matchers in docs (#14631)
  • [babel-jest, babel-preset-jest] [BREAKING] Increase peer dependency of @babel/core to ^7.11 (#14109)
  • [babel-jest, @jest/transform] Update babel-plugin-istanbul to v6 (#15156)
  • [babel-plugin-jest-hoist] Move unnecessary dependencies to devDependencies (#15010)
  • [expect] [BREAKING] Remove .toBeCalled(), .toBeCalledTimes(), .toBeCalledWith(), .lastCalledWith(), .nthCalledWith(), .toReturn(), .toReturnTimes(), .toReturnWith(), .lastReturnedWith(), .nthReturnedWith() and .toThrowError() matcher aliases (#14632)
  • [jest-cli, jest-config, @jest/types] [BREAKING] Remove deprecated --init argument (#14490)
  • [jest-config, @jest/core, jest-util] Upgrade ci-info (#14655)
  • [jest-mock] [BREAKING] Remove MockFunctionMetadataType, MockFunctionMetadata and SpyInstance types (#14621)
  • [@jest/reporters] Upgrade istanbul-lib-source-maps (#14924)
  • [jest-schemas] Upgrade @sinclair/typebox (#14775)
  • [jest-transform] Upgrade write-file-atomic (#14274)
  • [jest-util] Upgrade picomatch to v4 (#14653 & #14885)
  • [docs] Append to NODE_OPTIONS, not overwrite ([#14730](https://github.com/jestjs/jest/pull/14730))
  • [docs] Updated .toHaveBeenCalled() documentation to correctly reflect its functionality (#14842)
  • [docs] Link NestJS documentation on testing with Jest (#14940)
  • [docs] Revised documentation for .toHaveBeenCalled() to accurately depict its functionality. (#14853)
  • [docs] Removed ExpressJS reference link from documentation due to dead link (#15270)
  • [docs] Correct broken links in docs (#15359)

See the CHANGELOG.

29.7.0

Features

  • [create-jest] Add npm init / yarn create initialiser for Jest projects (#14465)
  • [jest-validate] Allow deprecation warnings for unknown options (#14499)

Fixes

  • [jest-resolver] Replace unmatched capture groups in moduleNameMapper with empty string instead of undefined (#14507)
  • [jest-snapshot] Allow for strings as well as template literals in inline snapshots (#14465)
  • [@jest/test-sequencer] Calculate test runtime if perStats.duration is missing (#14473)

Performance

  • [@jest/create-cache-key-function] Cache access of NODE_ENV and BABEL_ENV (#14455)

Chore & Maintenance

  • [jest-cli] Move internal config initialisation logic to the create-jest package (#14465)

New Contributors

Full Changelog: v29.6.4...v29.7.0

29.6.3

Fixes

  • [expect, @jest/expect-utils] ObjectContaining support symbol as key (#14414)
  • [expect] Remove @types/node from dependencies (#14385)
  • [jest-core] Use workers in watch mode by default to avoid crashes (#14059 & #14085).
  • [jest-reporters] Update istanbul-lib-instrument dependency to v6. (#14401)
  • [jest-mock] Revert #13692 as it was a breaking change (#14429)
  • [jest-mock] Revert #13866 as it was a breaking change (#14429)
  • [jest-mock] Revert #13867 as it was a breaking change (#14429)
  • [@jest/reporters] Marks Reporter's hooks as optional (#14433)
  • [jest-runtime] Fix dynamic ESM import module bug when loaded module through jest.isolateModulesAsync (#14397)

Chore & Maintenance

  • [jest-changed-files, jest-circus, jest-console, @jest/core, @jest/runtime, @jest/transform] Use invariant and notEmpty from jest-util rather than own internal (#14366)

New Contributors

Full Changelog: v29.6.2...v29.6.3

29.4.3

Features

  • [expect] Update toThrow() to be able to use error causes (#13606)
  • [jest-core] allow to use workerIdleMemoryLimit with only 1 worker or runInBand option (#13846)
  • [jest-message-util] Add support for error causes (#13868 & #13912)
  • [jest-runtime] Revert import assertions for JSON modules as it's been relegated to Stage 2 (#13911)

Fixes

  • [@jest/expect-utils] subsetEquality should consider also an object's inherited string keys (#13824)
  • [jest-mock] Clear mock state when jest.restoreAllMocks() is called (#13867)
  • [jest-mock] Prevent mockImplementationOnce and mockReturnValueOnce bleeding into withImplementation (#13888)
  • [jest-mock] Do not restore mocks when jest.resetAllMocks() is called (#13866)

New Contributors

Full Changelog: v29.4.2...v29.4.3

29.4.2

Features

Fixes

  • [expect, @jest/expect] Provide type of actual as a generic argument to Matchers to allow better-typed extensions (#13848)
  • [jest-circus] Added explicit mention of test failing because done() is not being called in error message (#13847)
  • [jest-runtime] Handle CJS re-exports of node core modules from ESM (#13856)
  • [jest-transform] Downgrade write-file-atomic to v4 (#13853)
  • [jest-worker] Ignore IPC messages not intended for Jest (#13543)

Chore & Maintenance

  • [*] make sure to exclude .eslintcache from published module (#13832)
  • [docs] Cleanup incorrect links in CHANGELOG.md (#13857)

New Contributors

Full Changelog: v29.4.1...v29.4.2

29.2.0

Features

  • [@jest/cli, jest-config] A seed for the test run will be randomly generated, or set by a CLI option (#13400)
  • [@jest/cli, jest-config] --show-seed will display the seed value in the report, and can be set via a CLI flag or through the config file (#13400)
  • [jest-config] Add readInitialConfig utility function (#13356)
  • [jest-core] Allow testResultsProcessor to be async (#13343)
  • [@jest/environment, jest-environment-node, jest-environment-jsdom, jest-runtime] Add getSeed() to the jest object (#13400)
  • [expect, @jest/expect-utils] Allow isA utility to take a type argument (#13355)
  • [expect] Expose AsyncExpectationResult and SyncExpectationResult types (#13411)

Fixes

  • [babel-plugin-jest-hoist] Ignore TSTypeQuery when checking for hoisted references (#13367)
  • [jest-core] Fix detectOpenHandles false positives for some special objects such as TLSWRAP (#13414)
  • [jest-mock] Fix mocking of getters and setters on classes (#13398)
  • [jest-reporters] Revert: Transform file paths into hyperlinks (#13399)
  • [@jest/types] Infer type of each table correctly when the table is a tuple or array (#13381)
  • [@jest/types] Rework typings to allow the *ReturnedWith matchers to be called with no argument (#13385)

Chore & Maintenance

  • [*] Update @babel/* deps, resulting in slightly different stack traces for each (#13422)

Performance

  • [jest-runner] Do not instrument v8 coverage data if coverage should not be collected (#13282)

New Contributors

Full Changelog: v29.1.2...v29.2.0

29.0.0

Blog post: https://jestjs.io/blog/2022/08/25/jest-29

Features

  • [expect] [BREAKING] Differentiate between MatcherContext MatcherUtils and MatcherState types (#13141)
  • [jest-circus] Add support for test.failing.each (#13142)
  • [jest-config] [BREAKING] Make snapshotFormat default to escapeString: false and printBasicPrototype: false (#13036)
  • [jest-config] [BREAKING] Remove undocumented collectCoverageOnlyFrom option (#13156)
  • [jest-environment-jsdom] [BREAKING] Upgrade to jsdom@20 (#13037, #13058)
  • [@jest/globals] Add jest.Mocked, jest.MockedClass, jest.MockedFunction and jest.MockedObject utility types (#12727)
  • [jest-mock] [BREAKING] Refactor Mocked* utility types. MaybeMockedDeep and MaybeMocked became Mocked and MockedShallow respectively; only deep mocked variants of MockedClass, MockedFunction and MockedObject are exported (#13123, #13124)
  • [jest-mock] [BREAKING] Change the default jest.mocked helper’s behavior to deep mocked (#13125)
  • [jest-snapshot] [BREAKING] Let babel find config when updating inline snapshots (#13150)
  • [@jest/test-result, @jest/types] [BREAKING] Replace Bytes and Milliseconds types with number (#13155)
  • [jest-worker] Adds workerIdleMemoryLimit option which is used as a check for worker memory leaks >= Node 16.11.0 and recycles child workers as required (#13056, #13105, #13106, #13107)
  • [pretty-format] [BREAKING] Remove ConvertAnsi plugin in favour of jest-serializer-ansi-escapes (#13040)
  • [pretty-format] Allow to opt out from sorting object keys with compareKeys: null (#12443)

Fixes

  • [jest-config] Fix testing multiple projects with TypeScript config files (#13099)
  • [@jest/expect-utils] Fix deep equality of ImmutableJS Record (#13055)
  • [jest-haste-map] Increase the maximum possible file size that jest-haste-map can handle (#13094)
  • [jest-runtime] Properly support CJS re-exports from dual packages (#13170)
  • [jest-snapshot] Make prettierPath optional in SnapshotState (#13149)
  • [jest-snapshot] Fix parsing error from inline snapshot files with JSX (#12760)
  • [jest-worker] When a process runs out of memory worker exits correctly and doesn't spin indefinitely (#13054)

Chore & Maintenance

  • [*] [BREAKING] Drop support for Node v12 and v17 (#13033)
  • [docs] Fix webpack name (#13049)
  • [docs] Explicit how to set n for --bail (#13128)
  • [docs] Update Enzyme URL (#13166)
  • [jest-leak-detector] Remove support for weak-napi (#13035)
  • [jest-snapshot] [BREAKING] Require rootDir as argument to SnapshotState (#13150)

New Contributors

Full Changelog: v28.1.3...v29.0.0

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ jest-each (indirect, 28.1.3 → 30.1.0) · Repo · Changelog

Release Notes

Too many releases to show here. View the full release notes.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ jest-environment-node (indirect, 28.1.3 → 30.1.2) · Repo · Changelog

Release Notes

Too many releases to show here. View the full release notes.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ jest-haste-map (indirect, 28.1.3 → 30.1.0) · Repo · Changelog

Release Notes

Too many releases to show here. View the full release notes.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ jest-leak-detector (indirect, 28.1.3 → 30.1.0) · Repo · Changelog

Release Notes

30.1.0

Features

  • [jest-leak-detector] Configurable GC aggressiveness regarding to V8 heap snapshot generation (#15793)
  • [jest-runtime] Reduce redundant ReferenceError messages
  • [jest-core] Include test modules that failed to load when --onlyFailures is active

Fixes

  • `[jest-snapshot-utils] Fix deprecated goo.gl snapshot guide link not getting replaced with fully canonical URL (#15787)
  • [jest-circus] Fix it.concurrent not working with describe.skip (#15765)
  • [jest-snapshot] Fix mangled inline snapshot updates when used with Prettier 3 and CRLF line endings
  • [jest-runtime] Importing from @jest/globals in more than one file no longer breaks relative paths (#15772)

Chore

  • [expect] Update docblock for toContain() to display info on substring check (#15789)

30.0.5 (from changelog)

Features

  • [jest-config] Allow testMatch to take a string value
  • [jest-worker] Let workerIdleMemoryLimit accept 0 to always restart worker child processes

Fixes

  • [expect] Fix bigint error (#15702)

30.0.2

What's Changed

Fixes

  • [jest-matcher-utils] Make 'deepCyclicCopyObject' safer by setting descriptors to a null-prototype object (#15689)
  • [jest-util] Make garbage collection protection property writable (#15689)

Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md

30.0.1

What's Changed

Features

  • [jest-resolver] Implement the defaultAsyncResolver (#15679)

Fixes

  • [jest-resolver] Resolve builtin modules correctly (#15683)
  • [jest-environment-node, jest-util] Avoid setting globals cleanup protection symbol when feature is off (#15684)

Chore & Maintenance

  • [*] Remove and deprecate jest-repl package (#15673)
  • [jest-resolver] Replace custom isBuiltinModule with node's isBuiltin (#15685)

New Contributors

Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md

30.0.0

Today we are happy to announce the release of Jest 30. This release features a substantial number of changes, fixes, and improvements. While it is one of the largest major releases of Jest ever, we admit that three years for a major release is too long. In the future, we are aiming to make more frequent major releases to keep Jest great for the next decade.

If you want to skip all the news and just get going, run npm install jest@^30.0.0 and follow the migration guide: Upgrading from Jest 29 to 30.

Read the full blog post

Features

  • [*] Renamed globalsCleanupMode to globalsCleanup and --waitNextEventLoopTurnForUnhandledRejectionEvents to --waitForUnhandledRejections
  • [expect] Add ArrayOf asymmetric matcher for validating array elements. (#15567)
  • [babel-jest] Add option excludeJestPreset to allow opting out of babel-preset-jest (#15164)
  • [expect] Revert #15038 to fix expect(fn).toHaveBeenCalledWith(expect.objectContaining(...)) when there are multiple calls (#15508)
  • [jest-circus, jest-cli, jest-config] Add waitNextEventLoopTurnForUnhandledRejectionEvents flag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)
  • [jest-circus] Add a waitBeforeRetry option to jest.retryTimes (#14738)
  • [jest-circus] Add a retryImmediately option to jest.retryTimes (#14696)
  • [jest-circus, jest-jasmine2] Allow setupFilesAfterEnv to export an async function (#10962)
  • [jest-circus, jest-test-result] Add startedAt timestamp in TestCaseResultObject within onTestCaseResult (#15145)
  • [jest-cli] Export buildArgv (#15310)
  • [jest-config] [BREAKING] Add mts and cts to default moduleFileExtensions config (#14369)
  • [jest-config] [BREAKING] Update testMatch and testRegex default option for supporting mjs, cjs, mts, and cts (#14584)
  • [jest-config] Loads config file from provided path in package.json (#14044)
  • [jest-config] Allow loading jest.config.cts files (#14070)
  • [jest-config] Show rootDir in error message when a preset fails to load (#15194)
  • [jest-config] Support loading TS config files using esbuild-register via docblock loader (#15190)
  • [jest-config] Allow passing TS config loader options via docblock comment (#15234)
  • [jest-config] If Node is running with type stripping enabled, do not require a TS loader (#15480)
  • [@jest/core] Group together open handles with the same stack trace (#13417, & #14789)
  • [@jest/core] Add perfStats to surface test setup overhead (#14622)
  • [@jest/core] [BREAKING] Changed --filter to accept an object with shape { filtered: Array<string> } to match documentation (#13319)
  • [@jest/core] Support --outputFile option for --listTests (#14980)
  • [@jest/core] Stringify Errors properly with --json flag (#15329)
  • [@jest/core, @jest/test-sequencer] [BREAKING] Exposes globalConfig & contexts to TestSequencer (#14535, & #14543)
  • [jest-each] Introduce %$ option to add number of the test to its title (#14710)
  • [@jest/environment] [BREAKING] Remove deprecated jest.genMockFromModule() (#15042)
  • [@jest/environment] [BREAKING] Remove unnecessary defensive code (#15045)
  • [jest-environment-jsdom] [BREAKING] Upgrade JSDOM to v22 (#13825)
  • [@jest/environment-jsdom-abstract] Introduce new package which abstracts over the jsdom environment, allowing usage of custom versions of JSDOM (#14717)
  • [jest-environment-node] Update jest environment with dispose symbols Symbol (#14888 & #14909)
  • [expect, @jest/expect] [BREAKING] Add type inference for function parameters in CalledWith assertions (#15129)
  • [@jest/expect-utils] Properly compare all types of TypedArrays (#15178)
  • [@jest/fake-timers] [BREAKING] Upgrade @sinonjs/fake-timers to v13 (#14544 & #15470)
  • [@jest/fake-timers] Exposing new modern timers function advanceTimersToFrame() which advances all timers by the needed milliseconds to execute callbacks currently scheduled with requestAnimationFrame (#14598)
  • [jest-matcher-utils] Add SERIALIZABLE_PROPERTIES to allow custom serialization of objects (#14893)
  • [jest-mock] Add support for the Explicit Resource Management proposal to use the using keyword with jest.spyOn(object, methodName) (#14895)
  • [jest-reporters] Add support for DEC mode 2026 (#15008)
  • [jest-resolver] Support file:// URLs as paths (#15154)
  • [jest-resolve,jest-runtime,jest-resolve-dependencies] Pass the conditions when resolving stub modules (#15489)
  • [jest-runtime] Exposing new modern timers function jest.advanceTimersToFrame() from @jest/fake-timers (#14598)
  • [jest-runtime] Support import.meta.filename and import.meta.dirname (available from Node 20.11) (#14854)
  • [jest-runtime] Support import.meta.resolve (#14930)
  • [jest-runtime] [BREAKING] Make it mandatory to pass globalConfig to the Runtime constructor (#15044)
  • [jest-runtime] Add unstable_unmockModule (#15080)
  • [jest-runtime] Add onGenerateMock transformer callback for auto generated callbacks (#15433 & #15482)
  • [jest-runtime] [BREAKING] Use vm.compileFunction over vm.Script (#15461)
  • [@jest/schemas] Upgrade @sinclair/typebox to v0.34 (#15450)
  • [@jest/types] test.each(): Accept a readonly (as const) table properly (#14565)
  • [@jest/types] Improve argument type inference passed to test and describe callback functions from each tables (#14920)
  • [jest-snapshot] [BREAKING] Add support for Error causes in snapshots (#13965)
  • [jest-snapshot] Support Prettier 3 (#14566)
  • [@jest/util-snapshot] Extract utils used by tooling from jest-snapshot into its own package (#15095)
  • [pretty-format] [BREAKING] Do not render empty string children ('') in React plugin (#14470)

Fixes

  • [expect] Show AggregateError to display (#15346)
  • [*] Replace exit with exit-x (#15399)
  • [babel-plugin-jest-hoist] Use denylist instead of the deprecated blacklist for Babel 8 support (#14109)
  • [babel-plugin-jest-hoist] Do not rely on buggy Babel behaviour (#15415)
  • [expect] Check error instance type for toThrow/toThrowError (#14576)
  • [expect] Improve diff for failing expect.objectContaining (#15038)
  • [expect] Use Array.isArray to check if an array is an Array (#15101)
  • [expect] Fix Error cause assertion errors (#15339)
  • [jest-changed-files] Print underlying errors when VCS commands fail (#15052)
  • [jest-changed-files] Abort sl root call if output resembles a steam locomotive (#15053)
  • [jest-circus] [BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)
  • [jest-circus] Replace recursive makeTestResults implementation with iterative one (#14760)
  • [jest-circus] Omit expect.hasAssertions() errors if a test already has errors (#14866)
  • [jest-circus, jest-expect, jest-snapshot] Pass test.failing tests when containing failing snapshot matchers (#14313)
  • [jest-circus] Concurrent tests now emit jest circus events at the correct point and in the expected order. (#15381)
  • [jest-cli] [BREAKING] Validate CLI flags that require arguments receives them (#14783)
  • [jest-config] Make sure to respect runInBand option (#14578)
  • [jest-config] Support testTimeout in project config (#14697)
  • [jest-config] Support coverageReporters in project config (#14697)
  • [jest-config] Allow reporters in project config (#14768)
  • [jest-config] Allow Node16/NodeNext/Bundler moduleResolution in project's tsconfig (#14739)
  • [@jest/create-cache-key-function] Correct the return type of createCacheKey (#15159)
  • [jest-each] Allow $keypath templates with null or undefined values (#14831)
  • [@jest/expect-utils] Fix comparison of DataView (#14408)
  • [@jest/expect-utils] [BREAKING] exclude non-enumerable in object matching (#14670)
  • [@jest/expect-utils] Fix comparison of URL (#14672)
  • [@jest/expect-utils] Check Symbol properties in equality (#14688)
  • [@jest/expect-utils] Catch circular references within arrays when matching objects (#14894)
  • [@jest/expect-utils] Fix not addressing to Sets and Maps as objects without keys (#14873)
  • [jest-haste-map] Fix errors or clobbering with multiple hasteImplModulePaths (#15522)
  • [jest-leak-detector] Make leak-detector more aggressive when running GC (#14526)
  • [jest-runtime] Properly handle re-exported native modules in ESM via CJS (#14589)
  • [jest-runtime] Refactor _importCoreModel so required core module is consistent if modified while loading (#15077)
  • [jest-schemas, jest-types] [BREAKING] Fix type of testFailureExitCode config option(#15232)
  • [jest-util] Make sure isInteractive works in a browser (#14552)
  • [pretty-format] [BREAKING] Print ArrayBuffer and DataView correctly (#14290)
  • [pretty-format] Fixed a bug where "anonymous custom elements" were not being printed as expected. (#15138)
  • [jest-cli] When specifying paths on the command line, only match against the relative paths of the test files (#12519)
    • [BREAKING] Changes testPathPattern configuration option to testPathPatterns, which now takes a list of patterns instead of the regex.
    • [BREAKING] --testPathPattern is now --testPathPatterns
    • [BREAKING] Specifying testPathPatterns when programmatically calling watch must be specified as new TestPathPatterns(patterns), where TestPathPatterns can be imported from @jest/pattern
  • [jest-reporters, jest-runner] Unhandled errors without stack get correctly logged to console (#14619)
  • [jest-util] Always load mjs files with import (#15447)
  • [jest-worker] Properly handle a circular reference error when worker tries to send an assertion fails where either the expected or actual value is circular (#15191)
  • [jest-worker] Properly handle a BigInt when worker tries to send an assertion fails where either the expected or actual value is BigInt (#15191)
  • [expect] Resolve issue where ObjectContaining matched non-object values. ([#15463])(#15463).
    • Adds a conditional/check to ensure the argument passed to expect is an object.
    • Add unit tests for new ObjectContaining behavior.
    • Remove invalid/wrong test case assertions for ObjectContaining.
  • [jest-worker] Addresses incorrect state on exit (#15610)

Performance

  • [*] [BREAKING] Bundle all of Jest's modules into index.js (#12348, #14550 & #14661)
  • [jest-haste-map] Only spawn one process to check for watchman installation (#14826)
  • [jest-runner] Better cleanup source-map-support after test to resolve (minor) memory leak (#15233)
  • [jest-circus, jest-environment-node, jest-repl, jest-runner, jest-util] Cleanup global variables on environment teardown to reduce memory leaks (#15215 & #15636 & #15643)

Chore & Maintenance

  • [jest-environment-jsdom, jest-environment-jsdom-abstract] Increased version of jsdom to ^26.0.0 (#15325CVE-2024-37890)
  • [*] Increase version of micromatch to ^4.0.7 (#15082)
  • [*] [BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)
  • [*] [BREAKING] Drop support for typescript@4.3, minimum version is now 5.4 (#14542, #15621)
  • [*] Depend on exact versions of monorepo dependencies instead of ^ range (#14553)
  • [*] [BREAKING] Add ESM wrapper for all of Jest's modules (#14661)
  • [*] [BREAKING] Upgrade to glob@10 (#14509)
  • [*] Use TypeError over Error where appropriate (#14799)
  • [docs] Fix typos in CHANGELOG.md and packages/jest-validate/README.md (#14640)
  • [docs] Don't use alias matchers in docs (#14631)
  • [babel-jest, babel-preset-jest] [BREAKING] Increase peer dependency of @babel/core to ^7.11 (#14109)
  • [babel-jest, @jest/transform] Update babel-plugin-istanbul to v6 (#15156)
  • [babel-plugin-jest-hoist] Move unnecessary dependencies to devDependencies (#15010)
  • [expect] [BREAKING] Remove .toBeCalled(), .toBeCalledTimes(), .toBeCalledWith(), .lastCalledWith(), .nthCalledWith(), .toReturn(), .toReturnTimes(), .toReturnWith(), .lastReturnedWith(), .nthReturnedWith() and .toThrowError() matcher aliases (#14632)
  • [jest-cli, jest-config, @jest/types] [BREAKING] Remove deprecated --init argument (#14490)
  • [jest-config, @jest/core, jest-util] Upgrade ci-info (#14655)
  • [jest-mock] [BREAKING] Remove MockFunctionMetadataType, MockFunctionMetadata and SpyInstance types (#14621)
  • [@jest/reporters] Upgrade istanbul-lib-source-maps (#14924)
  • [jest-schemas] Upgrade @sinclair/typebox (#14775)
  • [jest-transform] Upgrade write-file-atomic (#14274)
  • [jest-util] Upgrade picomatch to v4 (#14653 & #14885)
  • [docs] Append to NODE_OPTIONS, not overwrite ([#14730](https://github.com/jestjs/jest/pull/14730))
  • [docs] Updated .toHaveBeenCalled() documentation to correctly reflect its functionality (#14842)
  • [docs] Link NestJS documentation on testing with Jest (#14940)
  • [docs] Revised documentation for .toHaveBeenCalled() to accurately depict its functionality. (#14853)
  • [docs] Removed ExpressJS reference link from documentation due to dead link (#15270)
  • [docs] Correct broken links in docs (#15359)

See the CHANGELOG.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ jest-matcher-utils (indirect, 28.1.3 → 30.1.2) · Repo · Changelog

Release Notes

Too many releases to show here. View the full release notes.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ jest-message-util (indirect, 28.1.3 → 30.1.0) · Repo · Changelog

Release Notes

30.1.0

Features

  • [jest-leak-detector] Configurable GC aggressiveness regarding to V8 heap snapshot generation (#15793)
  • [jest-runtime] Reduce redundant ReferenceError messages
  • [jest-core] Include test modules that failed to load when --onlyFailures is active

Fixes

  • `[jest-snapshot-utils] Fix deprecated goo.gl snapshot guide link not getting replaced with fully canonical URL (#15787)
  • [jest-circus] Fix it.concurrent not working with describe.skip (#15765)
  • [jest-snapshot] Fix mangled inline snapshot updates when used with Prettier 3 and CRLF line endings
  • [jest-runtime] Importing from @jest/globals in more than one file no longer breaks relative paths (#15772)

Chore

  • [expect] Update docblock for toContain() to display info on substring check (#15789)

30.0.5 (from changelog)

Features

  • [jest-config] Allow testMatch to take a string value
  • [jest-worker] Let workerIdleMemoryLimit accept 0 to always restart worker child processes

Fixes

  • [expect] Fix bigint error (#15702)

30.0.2

What's Changed

Fixes

  • [jest-matcher-utils] Make 'deepCyclicCopyObject' safer by setting descriptors to a null-prototype object (#15689)
  • [jest-util] Make garbage collection protection property writable (#15689)

Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md

30.0.1

What's Changed

Features

  • [jest-resolver] Implement the defaultAsyncResolver (#15679)

Fixes

  • [jest-resolver] Resolve builtin modules correctly (#15683)
  • [jest-environment-node, jest-util] Avoid setting globals cleanup protection symbol when feature is off (#15684)

Chore & Maintenance

  • [*] Remove and deprecate jest-repl package (#15673)
  • [jest-resolver] Replace custom isBuiltinModule with node's isBuiltin (#15685)

New Contributors

Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md

30.0.0

Today we are happy to announce the release of Jest 30. This release features a substantial number of changes, fixes, and improvements. While it is one of the largest major releases of Jest ever, we admit that three years for a major release is too long. In the future, we are aiming to make more frequent major releases to keep Jest great for the next decade.

If you want to skip all the news and just get going, run npm install jest@^30.0.0 and follow the migration guide: Upgrading from Jest 29 to 30.

Read the full blog post

Features

  • [*] Renamed globalsCleanupMode to globalsCleanup and --waitNextEventLoopTurnForUnhandledRejectionEvents to --waitForUnhandledRejections
  • [expect] Add ArrayOf asymmetric matcher for validating array elements. (#15567)
  • [babel-jest] Add option excludeJestPreset to allow opting out of babel-preset-jest (#15164)
  • [expect] Revert #15038 to fix expect(fn).toHaveBeenCalledWith(expect.objectContaining(...)) when there are multiple calls (#15508)
  • [jest-circus, jest-cli, jest-config] Add waitNextEventLoopTurnForUnhandledRejectionEvents flag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)
  • [jest-circus] Add a waitBeforeRetry option to jest.retryTimes (#14738)
  • [jest-circus] Add a retryImmediately option to jest.retryTimes (#14696)
  • [jest-circus, jest-jasmine2] Allow setupFilesAfterEnv to export an async function (#10962)
  • [jest-circus, jest-test-result] Add startedAt timestamp in TestCaseResultObject within onTestCaseResult (#15145)
  • [jest-cli] Export buildArgv (#15310)
  • [jest-config] [BREAKING] Add mts and cts to default moduleFileExtensions config (#14369)
  • [jest-config] [BREAKING] Update testMatch and testRegex default option for supporting mjs, cjs, mts, and cts (#14584)
  • [jest-config] Loads config file from provided path in package.json (#14044)
  • [jest-config] Allow loading jest.config.cts files (#14070)
  • [jest-config] Show rootDir in error message when a preset fails to load (#15194)
  • [jest-config] Support loading TS config files using esbuild-register via docblock loader (#15190)
  • [jest-config] Allow passing TS config loader options via docblock comment (#15234)
  • [jest-config] If Node is running with type stripping enabled, do not require a TS loader (#15480)
  • [@jest/core] Group together open handles with the same stack trace (#13417, & #14789)
  • [@jest/core] Add perfStats to surface test setup overhead (#14622)
  • [@jest/core] [BREAKING] Changed --filter to accept an object with shape { filtered: Array<string> } to match documentation (#13319)
  • [@jest/core] Support --outputFile option for --listTests (#14980)
  • [@jest/core] Stringify Errors properly with --json flag (#15329)
  • [@jest/core, @jest/test-sequencer] [BREAKING] Exposes globalConfig & contexts to TestSequencer (#14535, & #14543)
  • [jest-each] Introduce %$ option to add number of the test to its title (#14710)
  • [@jest/environment] [BREAKING] Remove deprecated jest.genMockFromModule() (#15042)
  • [@jest/environment] [BREAKING] Remove unnecessary defensive code (#15045)
  • [jest-environment-jsdom] [BREAKING] Upgrade JSDOM to v22 (#13825)
  • [@jest/environment-jsdom-abstract] Introduce new package which abstracts over the jsdom environment, allowing usage of custom versions of JSDOM (#14717)
  • [jest-environment-node] Update jest environment with dispose symbols Symbol (#14888 & #14909)
  • [expect, @jest/expect] [BREAKING] Add type inference for function parameters in CalledWith assertions (#15129)
  • [@jest/expect-utils] Properly compare all types of TypedArrays (#15178)
  • [@jest/fake-timers] [BREAKING] Upgrade @sinonjs/fake-timers to v13 (#14544 & #15470)
  • [@jest/fake-timers] Exposing new modern timers function advanceTimersToFrame() which advances all timers by the needed milliseconds to execute callbacks currently scheduled with requestAnimationFrame (#14598)
  • [jest-matcher-utils] Add SERIALIZABLE_PROPERTIES to allow custom serialization of objects (#14893)
  • [jest-mock] Add support for the Explicit Resource Management proposal to use the using keyword with jest.spyOn(object, methodName) (#14895)
  • [jest-reporters] Add support for DEC mode 2026 (#15008)
  • [jest-resolver] Support file:// URLs as paths (#15154)
  • [jest-resolve,jest-runtime,jest-resolve-dependencies] Pass the conditions when resolving stub modules (#15489)
  • [jest-runtime] Exposing new modern timers function jest.advanceTimersToFrame() from @jest/fake-timers (#14598)
  • [jest-runtime] Support import.meta.filename and import.meta.dirname (available from Node 20.11) (#14854)
  • [jest-runtime] Support import.meta.resolve (#14930)
  • [jest-runtime] [BREAKING] Make it mandatory to pass globalConfig to the Runtime constructor (#15044)
  • [jest-runtime] Add unstable_unmockModule (#15080)
  • [jest-runtime] Add onGenerateMock transformer callback for auto generated callbacks (#15433 & #15482)
  • [jest-runtime] [BREAKING] Use vm.compileFunction over vm.Script (#15461)
  • [@jest/schemas] Upgrade @sinclair/typebox to v0.34 (#15450)
  • [@jest/types] test.each(): Accept a readonly (as const) table properly (#14565)
  • [@jest/types] Improve argument type inference passed to test and describe callback functions from each tables (#14920)
  • [jest-snapshot] [BREAKING] Add support for Error causes in snapshots (#13965)
  • [jest-snapshot] Support Prettier 3 (#14566)
  • [@jest/util-snapshot] Extract utils used by tooling from jest-snapshot into its own package (#15095)
  • [pretty-format] [BREAKING] Do not render empty string children ('') in React plugin (#14470)

Fixes

  • [expect] Show AggregateError to display (#15346)
  • [*] Replace exit with exit-x (#15399)
  • [babel-plugin-jest-hoist] Use denylist instead of the deprecated blacklist for Babel 8 support (#14109)
  • [babel-plugin-jest-hoist] Do not rely on buggy Babel behaviour (#15415)
  • [expect] Check error instance type for toThrow/toThrowError (#14576)
  • [expect] Improve diff for failing expect.objectContaining (#15038)
  • [expect] Use Array.isArray to check if an array is an Array (#15101)
  • [expect] Fix Error cause assertion errors (#15339)
  • [jest-changed-files] Print underlying errors when VCS commands fail (#15052)
  • [jest-changed-files] Abort sl root call if output resembles a steam locomotive (#15053)
  • [jest-circus] [BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)
  • [jest-circus] Replace recursive makeTestResults implementation with iterative one (#14760)
  • [jest-circus] Omit expect.hasAssertions() errors if a test already has errors (#14866)
  • [jest-circus, jest-expect, jest-snapshot] Pass test.failing tests when containing failing snapshot matchers (#14313)
  • [jest-circus] Concurrent tests now emit jest circus events at the correct point and in the expected order. (#15381)
  • [jest-cli] [BREAKING] Validate CLI flags that require arguments receives them (#14783)
  • [jest-config] Make sure to respect runInBand option (#14578)
  • [jest-config] Support testTimeout in project config (#14697)
  • [jest-config] Support coverageReporters in project config (#14697)
  • [jest-config] Allow reporters in project config (#14768)
  • [jest-config] Allow Node16/NodeNext/Bundler moduleResolution in project's tsconfig (#14739)
  • [@jest/create-cache-key-function] Correct the return type of createCacheKey (#15159)
  • [jest-each] Allow $keypath templates with null or undefined values (#14831)
  • [@jest/expect-utils] Fix comparison of DataView (#14408)
  • [@jest/expect-utils] [BREAKING] exclude non-enumerable in object matching (#14670)
  • [@jest/expect-utils] Fix comparison of URL (#14672)
  • [@jest/expect-utils] Check Symbol properties in equality (#14688)
  • [@jest/expect-utils] Catch circular references within arrays when matching objects (#14894)
  • [@jest/expect-utils] Fix not addressing to Sets and Maps as objects without keys (#14873)
  • [jest-haste-map] Fix errors or clobbering with multiple hasteImplModulePaths (#15522)
  • [jest-leak-detector] Make leak-detector more aggressive when running GC (#14526)
  • [jest-runtime] Properly handle re-exported native modules in ESM via CJS (#14589)
  • [jest-runtime] Refactor _importCoreModel so required core module is consistent if modified while loading (#15077)
  • [jest-schemas, jest-types] [BREAKING] Fix type of testFailureExitCode config option(#15232)
  • [jest-util] Make sure isInteractive works in a browser (#14552)
  • [pretty-format] [BREAKING] Print ArrayBuffer and DataView correctly (#14290)
  • [pretty-format] Fixed a bug where "anonymous custom elements" were not being printed as expected. (#15138)
  • [jest-cli] When specifying paths on the command line, only match against the relative paths of the test files (#12519)
    • [BREAKING] Changes testPathPattern configuration option to testPathPatterns, which now takes a list of patterns instead of the regex.
    • [BREAKING] --testPathPattern is now --testPathPatterns
    • [BREAKING] Specifying testPathPatterns when programmatically calling watch must be specified as new TestPathPatterns(patterns), where TestPathPatterns can be imported from @jest/pattern
  • [jest-reporters, jest-runner] Unhandled errors without stack get correctly logged to console (#14619)
  • [jest-util] Always load mjs files with import (#15447)
  • [jest-worker] Properly handle a circular reference error when worker tries to send an assertion fails where either the expected or actual value is circular (#15191)
  • [jest-worker] Properly handle a BigInt when worker tries to send an assertion fails where either the expected or actual value is BigInt (#15191)
  • [expect] Resolve issue where ObjectContaining matched non-object values. ([#15463])(#15463).
    • Adds a conditional/check to ensure the argument passed to expect is an object.
    • Add unit tests for new ObjectContaining behavior.
    • Remove invalid/wrong test case assertions for ObjectContaining.
  • [jest-worker] Addresses incorrect state on exit (#15610)

Performance

  • [*] [BREAKING] Bundle all of Jest's modules into index.js (#12348, #14550 & #14661)
  • [jest-haste-map] Only spawn one process to check for watchman installation (#14826)
  • [jest-runner] Better cleanup source-map-support after test to resolve (minor) memory leak (#15233)
  • [jest-circus, jest-environment-node, jest-repl, jest-runner, jest-util] Cleanup global variables on environment teardown to reduce memory leaks (#15215 & #15636 & #15643)

Chore & Maintenance

  • [jest-environment-jsdom, jest-environment-jsdom-abstract] Increased version of jsdom to ^26.0.0 (#15325CVE-2024-37890)
  • [*] Increase version of micromatch to ^4.0.7 (#15082)
  • [*] [BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)
  • [*] [BREAKING] Drop support for typescript@4.3, minimum version is now 5.4 (#14542, #15621)
  • [*] Depend on exact versions of monorepo dependencies instead of ^ range (#14553)
  • [*] [BREAKING] Add ESM wrapper for all of Jest's modules (#14661)
  • [*] [BREAKING] Upgrade to glob@10 (#14509)
  • [*] Use TypeError over Error where appropriate (#14799)
  • [docs] Fix typos in CHANGELOG.md and packages/jest-validate/README.md (#14640)
  • [docs] Don't use alias matchers in docs (#14631)
  • [babel-jest, babel-preset-jest] [BREAKING] Increase peer dependency of @babel/core to ^7.11 (#14109)
  • [babel-jest, @jest/transform] Update babel-plugin-istanbul to v6 (#15156)
  • [babel-plugin-jest-hoist] Move unnecessary dependencies to devDependencies (#15010)
  • [expect] [BREAKING] Remove .toBeCalled(), .toBeCalledTimes(), .toBeCalledWith(), .lastCalledWith(), .nthCalledWith(), .toReturn(), .toReturnTimes(), .toReturnWith(), .lastReturnedWith(), .nthReturnedWith() and .toThrowError() matcher aliases (#14632)
  • [jest-cli, jest-config, @jest/types] [BREAKING] Remove deprecated --init argument (#14490)
  • [jest-config, @jest/core, jest-util] Upgrade ci-info (#14655)
  • [jest-mock] [BREAKING] Remove MockFunctionMetadataType, MockFunctionMetadata and SpyInstance types (#14621)
  • [@jest/reporters] Upgrade istanbul-lib-source-maps (#14924)
  • [jest-schemas] Upgrade @sinclair/typebox (#14775)
  • [jest-transform] Upgrade write-file-atomic (#14274)
  • [jest-util] Upgrade picomatch to v4 (#14653 & #14885)
  • [docs] Append to NODE_OPTIONS, not overwrite ([#14730](https://github.com/jestjs/jest/pull/14730))
  • [docs] Updated .toHaveBeenCalled() documentation to correctly reflect its functionality (#14842)
  • [docs] Link NestJS documentation on testing with Jest (#14940)
  • [docs] Revised documentation for .toHaveBeenCalled() to accurately depict its functionality. (#14853)
  • [docs] Removed ExpressJS reference link from documentation due to dead link (#15270)
  • [docs] Correct broken links in docs (#15359)

See the CHANGELOG.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ jest-mock (indirect, 28.1.3 → 30.0.5) · Repo · Changelog

Release Notes

Too many releases to show here. View the full release notes.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ jest-pnp-resolver (indirect, 1.2.2 → 1.2.3) · Repo

Sorry, we couldn’t find anything useful about this release.

↗️ jest-regex-util (indirect, 28.0.2 → 30.0.1) · Repo · Changelog

Release Notes

30.0.1

What's Changed

Features

  • [jest-resolver] Implement the defaultAsyncResolver (#15679)

Fixes

  • [jest-resolver] Resolve builtin modules correctly (#15683)
  • [jest-environment-node, jest-util] Avoid setting globals cleanup protection symbol when feature is off (#15684)

Chore & Maintenance

  • [*] Remove and deprecate jest-repl package (#15673)
  • [jest-resolver] Replace custom isBuiltinModule with node's isBuiltin (#15685)

New Contributors

Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md

30.0.0

Today we are happy to announce the release of Jest 30. This release features a substantial number of changes, fixes, and improvements. While it is one of the largest major releases of Jest ever, we admit that three years for a major release is too long. In the future, we are aiming to make more frequent major releases to keep Jest great for the next decade.

If you want to skip all the news and just get going, run npm install jest@^30.0.0 and follow the migration guide: Upgrading from Jest 29 to 30.

Read the full blog post

Features

  • [*] Renamed globalsCleanupMode to globalsCleanup and --waitNextEventLoopTurnForUnhandledRejectionEvents to --waitForUnhandledRejections
  • [expect] Add ArrayOf asymmetric matcher for validating array elements. (#15567)
  • [babel-jest] Add option excludeJestPreset to allow opting out of babel-preset-jest (#15164)
  • [expect] Revert #15038 to fix expect(fn).toHaveBeenCalledWith(expect.objectContaining(...)) when there are multiple calls (#15508)
  • [jest-circus, jest-cli, jest-config] Add waitNextEventLoopTurnForUnhandledRejectionEvents flag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)
  • [jest-circus] Add a waitBeforeRetry option to jest.retryTimes (#14738)
  • [jest-circus] Add a retryImmediately option to jest.retryTimes (#14696)
  • [jest-circus, jest-jasmine2] Allow setupFilesAfterEnv to export an async function (#10962)
  • [jest-circus, jest-test-result] Add startedAt timestamp in TestCaseResultObject within onTestCaseResult (#15145)
  • [jest-cli] Export buildArgv (#15310)
  • [jest-config] [BREAKING] Add mts and cts to default moduleFileExtensions config (#14369)
  • [jest-config] [BREAKING] Update testMatch and testRegex default option for supporting mjs, cjs, mts, and cts (#14584)
  • [jest-config] Loads config file from provided path in package.json (#14044)
  • [jest-config] Allow loading jest.config.cts files (#14070)
  • [jest-config] Show rootDir in error message when a preset fails to load (#15194)
  • [jest-config] Support loading TS config files using esbuild-register via docblock loader (#15190)
  • [jest-config] Allow passing TS config loader options via docblock comment (#15234)
  • [jest-config] If Node is running with type stripping enabled, do not require a TS loader (#15480)
  • [@jest/core] Group together open handles with the same stack trace (#13417, & #14789)
  • [@jest/core] Add perfStats to surface test setup overhead (#14622)
  • [@jest/core] [BREAKING] Changed --filter to accept an object with shape { filtered: Array<string> } to match documentation (#13319)
  • [@jest/core] Support --outputFile option for --listTests (#14980)
  • [@jest/core] Stringify Errors properly with --json flag (#15329)
  • [@jest/core, @jest/test-sequencer] [BREAKING] Exposes globalConfig & contexts to TestSequencer (#14535, & #14543)
  • [jest-each] Introduce %$ option to add number of the test to its title (#14710)
  • [@jest/environment] [BREAKING] Remove deprecated jest.genMockFromModule() (#15042)
  • [@jest/environment] [BREAKING] Remove unnecessary defensive code (#15045)
  • [jest-environment-jsdom] [BREAKING] Upgrade JSDOM to v22 (#13825)
  • [@jest/environment-jsdom-abstract] Introduce new package which abstracts over the jsdom environment, allowing usage of custom versions of JSDOM (#14717)
  • [jest-environment-node] Update jest environment with dispose symbols Symbol (#14888 & #14909)
  • [expect, @jest/expect] [BREAKING] Add type inference for function parameters in CalledWith assertions (#15129)
  • [@jest/expect-utils] Properly compare all types of TypedArrays (#15178)
  • [@jest/fake-timers] [BREAKING] Upgrade @sinonjs/fake-timers to v13 (#14544 & #15470)
  • [@jest/fake-timers] Exposing new modern timers function advanceTimersToFrame() which advances all timers by the needed milliseconds to execute callbacks currently scheduled with requestAnimationFrame (#14598)
  • [jest-matcher-utils] Add SERIALIZABLE_PROPERTIES to allow custom serialization of objects (#14893)
  • [jest-mock] Add support for the Explicit Resource Management proposal to use the using keyword with jest.spyOn(object, methodName) (#14895)
  • [jest-reporters] Add support for DEC mode 2026 (#15008)
  • [jest-resolver] Support file:// URLs as paths (#15154)
  • [jest-resolve,jest-runtime,jest-resolve-dependencies] Pass the conditions when resolving stub modules (#15489)
  • [jest-runtime] Exposing new modern timers function jest.advanceTimersToFrame() from @jest/fake-timers (#14598)
  • [jest-runtime] Support import.meta.filename and import.meta.dirname (available from Node 20.11) (#14854)
  • [jest-runtime] Support import.meta.resolve (#14930)
  • [jest-runtime] [BREAKING] Make it mandatory to pass globalConfig to the Runtime constructor (#15044)
  • [jest-runtime] Add unstable_unmockModule (#15080)
  • [jest-runtime] Add onGenerateMock transformer callback for auto generated callbacks (#15433 & #15482)
  • [jest-runtime] [BREAKING] Use vm.compileFunction over vm.Script (#15461)
  • [@jest/schemas] Upgrade @sinclair/typebox to v0.34 (#15450)
  • [@jest/types] test.each(): Accept a readonly (as const) table properly (#14565)
  • [@jest/types] Improve argument type inference passed to test and describe callback functions from each tables (#14920)
  • [jest-snapshot] [BREAKING] Add support for Error causes in snapshots (#13965)
  • [jest-snapshot] Support Prettier 3 (#14566)
  • [@jest/util-snapshot] Extract utils used by tooling from jest-snapshot into its own package (#15095)
  • [pretty-format] [BREAKING] Do not render empty string children ('') in React plugin (#14470)

Fixes

  • [expect] Show AggregateError to display (#15346)
  • [*] Replace exit with exit-x (#15399)
  • [babel-plugin-jest-hoist] Use denylist instead of the deprecated blacklist for Babel 8 support (#14109)
  • [babel-plugin-jest-hoist] Do not rely on buggy Babel behaviour (#15415)
  • [expect] Check error instance type for toThrow/toThrowError (#14576)
  • [expect] Improve diff for failing expect.objectContaining (#15038)
  • [expect] Use Array.isArray to check if an array is an Array (#15101)
  • [expect] Fix Error cause assertion errors (#15339)
  • [jest-changed-files] Print underlying errors when VCS commands fail (#15052)
  • [jest-changed-files] Abort sl root call if output resembles a steam locomotive (#15053)
  • [jest-circus] [BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)
  • [jest-circus] Replace recursive makeTestResults implementation with iterative one (#14760)
  • [jest-circus] Omit expect.hasAssertions() errors if a test already has errors (#14866)
  • [jest-circus, jest-expect, jest-snapshot] Pass test.failing tests when containing failing snapshot matchers (#14313)
  • [jest-circus] Concurrent tests now emit jest circus events at the correct point and in the expected order. (#15381)
  • [jest-cli] [BREAKING] Validate CLI flags that require arguments receives them (#14783)
  • [jest-config] Make sure to respect runInBand option (#14578)
  • [jest-config] Support testTimeout in project config (#14697)
  • [jest-config] Support coverageReporters in project config (#14697)
  • [jest-config] Allow reporters in project config (#14768)
  • [jest-config] Allow Node16/NodeNext/Bundler moduleResolution in project's tsconfig (#14739)
  • [@jest/create-cache-key-function] Correct the return type of createCacheKey (#15159)
  • [jest-each] Allow $keypath templates with null or undefined values (#14831)
  • [@jest/expect-utils] Fix comparison of DataView (#14408)
  • [@jest/expect-utils] [BREAKING] exclude non-enumerable in object matching (#14670)
  • [@jest/expect-utils] Fix comparison of URL (#14672)
  • [@jest/expect-utils] Check Symbol properties in equality (#14688)
  • [@jest/expect-utils] Catch circular references within arrays when matching objects (#14894)
  • [@jest/expect-utils] Fix not addressing to Sets and Maps as objects without keys (#14873)
  • [jest-haste-map] Fix errors or clobbering with multiple hasteImplModulePaths (#15522)
  • [jest-leak-detector] Make leak-detector more aggressive when running GC (#14526)
  • [jest-runtime] Properly handle re-exported native modules in ESM via CJS (#14589)
  • [jest-runtime] Refactor _importCoreModel so required core module is consistent if modified while loading (#15077)
  • [jest-schemas, jest-types] [BREAKING] Fix type of testFailureExitCode config option(#15232)
  • [jest-util] Make sure isInteractive works in a browser (#14552)
  • [pretty-format] [BREAKING] Print ArrayBuffer and DataView correctly (#14290)
  • [pretty-format] Fixed a bug where "anonymous custom elements" were not being printed as expected. (#15138)
  • [jest-cli] When specifying paths on the command line, only match against the relative paths of the test files (#12519)
    • [BREAKING] Changes testPathPattern configuration option to testPathPatterns, which now takes a list of patterns instead of the regex.
    • [BREAKING] --testPathPattern is now --testPathPatterns
    • [BREAKING] Specifying testPathPatterns when programmatically calling watch must be specified as new TestPathPatterns(patterns), where TestPathPatterns can be imported from @jest/pattern
  • [jest-reporters, jest-runner] Unhandled errors without stack get correctly logged to console (#14619)
  • [jest-util] Always load mjs files with import (#15447)
  • [jest-worker] Properly handle a circular reference error when worker tries to send an assertion fails where either the expected or actual value is circular (#15191)
  • [jest-worker] Properly handle a BigInt when worker tries to send an assertion fails where either the expected or actual value is BigInt (#15191)
  • [expect] Resolve issue where ObjectContaining matched non-object values. ([#15463])(#15463).
    • Adds a conditional/check to ensure the argument passed to expect is an object.
    • Add unit tests for new ObjectContaining behavior.
    • Remove invalid/wrong test case assertions for ObjectContaining.
  • [jest-worker] Addresses incorrect state on exit (#15610)

Performance

  • [*] [BREAKING] Bundle all of Jest's modules into index.js (#12348, #14550 & #14661)
  • [jest-haste-map] Only spawn one process to check for watchman installation (#14826)
  • [jest-runner] Better cleanup source-map-support after test to resolve (minor) memory leak (#15233)
  • [jest-circus, jest-environment-node, jest-repl, jest-runner, jest-util] Cleanup global variables on environment teardown to reduce memory leaks (#15215 & #15636 & #15643)

Chore & Maintenance

  • [jest-environment-jsdom, jest-environment-jsdom-abstract] Increased version of jsdom to ^26.0.0 (#15325CVE-2024-37890)
  • [*] Increase version of micromatch to ^4.0.7 (#15082)
  • [*] [BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)
  • [*] [BREAKING] Drop support for typescript@4.3, minimum version is now 5.4 (#14542, #15621)
  • [*] Depend on exact versions of monorepo dependencies instead of ^ range (#14553)
  • [*] [BREAKING] Add ESM wrapper for all of Jest's modules (#14661)
  • [*] [BREAKING] Upgrade to glob@10 (#14509)
  • [*] Use TypeError over Error where appropriate (#14799)
  • [docs] Fix typos in CHANGELOG.md and packages/jest-validate/README.md (#14640)
  • [docs] Don't use alias matchers in docs (#14631)
  • [babel-jest, babel-preset-jest] [BREAKING] Increase peer dependency of @babel/core to ^7.11 (#14109)
  • [babel-jest, @jest/transform] Update babel-plugin-istanbul to v6 (#15156)
  • [babel-plugin-jest-hoist] Move unnecessary dependencies to devDependencies (#15010)
  • [expect] [BREAKING] Remove .toBeCalled(), .toBeCalledTimes(), .toBeCalledWith(), .lastCalledWith(), .nthCalledWith(), .toReturn(), .toReturnTimes(), .toReturnWith(), .lastReturnedWith(), .nthReturnedWith() and .toThrowError() matcher aliases (#14632)
  • [jest-cli, jest-config, @jest/types] [BREAKING] Remove deprecated --init argument (#14490)
  • [jest-config, @jest/core, jest-util] Upgrade ci-info (#14655)
  • [jest-mock] [BREAKING] Remove MockFunctionMetadataType, MockFunctionMetadata and SpyInstance types (#14621)
  • [@jest/reporters] Upgrade istanbul-lib-source-maps (#14924)
  • [jest-schemas] Upgrade @sinclair/typebox (#14775)
  • [jest-transform] Upgrade write-file-atomic (#14274)
  • [jest-util] Upgrade picomatch to v4 (#14653 & #14885)
  • [docs] Append to NODE_OPTIONS, not overwrite ([#14730](https://github.com/jestjs/jest/pull/14730))
  • [docs] Updated .toHaveBeenCalled() documentation to correctly reflect its functionality (#14842)
  • [docs] Link NestJS documentation on testing with Jest (#14940)
  • [docs] Revised documentation for .toHaveBeenCalled() to accurately depict its functionality. (#14853)
  • [docs] Removed ExpressJS reference link from documentation due to dead link (#15270)
  • [docs] Correct broken links in docs (#15359)

See the CHANGELOG.

29.6.3

Fixes

  • [expect, @jest/expect-utils] ObjectContaining support symbol as key (#14414)
  • [expect] Remove @types/node from dependencies (#14385)
  • [jest-core] Use workers in watch mode by default to avoid crashes (#14059 & #14085).
  • [jest-reporters] Update istanbul-lib-instrument dependency to v6. (#14401)
  • [jest-mock] Revert #13692 as it was a breaking change (#14429)
  • [jest-mock] Revert #13866 as it was a breaking change (#14429)
  • [jest-mock] Revert #13867 as it was a breaking change (#14429)
  • [@jest/reporters] Marks Reporter's hooks as optional (#14433)
  • [jest-runtime] Fix dynamic ESM import module bug when loaded module through jest.isolateModulesAsync (#14397)

Chore & Maintenance

  • [jest-changed-files, jest-circus, jest-console, @jest/core, @jest/runtime, @jest/transform] Use invariant and notEmpty from jest-util rather than own internal (#14366)

New Contributors

Full Changelog: v29.6.2...v29.6.3

29.4.3

Features

  • [expect] Update toThrow() to be able to use error causes (#13606)
  • [jest-core] allow to use workerIdleMemoryLimit with only 1 worker or runInBand option (#13846)
  • [jest-message-util] Add support for error causes (#13868 & #13912)
  • [jest-runtime] Revert import assertions for JSON modules as it's been relegated to Stage 2 (#13911)

Fixes

  • [@jest/expect-utils] subsetEquality should consider also an object's inherited string keys (#13824)
  • [jest-mock] Clear mock state when jest.restoreAllMocks() is called (#13867)
  • [jest-mock] Prevent mockImplementationOnce and mockReturnValueOnce bleeding into withImplementation (#13888)
  • [jest-mock] Do not restore mocks when jest.resetAllMocks() is called (#13866)

New Contributors

Full Changelog: v29.4.2...v29.4.3

29.4.2

Features

Fixes

  • [expect, @jest/expect] Provide type of actual as a generic argument to Matchers to allow better-typed extensions (#13848)
  • [jest-circus] Added explicit mention of test failing because done() is not being called in error message (#13847)
  • [jest-runtime] Handle CJS re-exports of node core modules from ESM (#13856)
  • [jest-transform] Downgrade write-file-atomic to v4 (#13853)
  • [jest-worker] Ignore IPC messages not intended for Jest (#13543)

Chore & Maintenance

  • [*] make sure to exclude .eslintcache from published module (#13832)
  • [docs] Cleanup incorrect links in CHANGELOG.md (#13857)

New Contributors

Full Changelog: v29.4.1...v29.4.2

29.2.0

Features

  • [@jest/cli, jest-config] A seed for the test run will be randomly generated, or set by a CLI option (#13400)
  • [@jest/cli, jest-config] --show-seed will display the seed value in the report, and can be set via a CLI flag or through the config file (#13400)
  • [jest-config] Add readInitialConfig utility function (#13356)
  • [jest-core] Allow testResultsProcessor to be async (#13343)
  • [@jest/environment, jest-environment-node, jest-environment-jsdom, jest-runtime] Add getSeed() to the jest object (#13400)
  • [expect, @jest/expect-utils] Allow isA utility to take a type argument (#13355)
  • [expect] Expose AsyncExpectationResult and SyncExpectationResult types (#13411)

Fixes

  • [babel-plugin-jest-hoist] Ignore TSTypeQuery when checking for hoisted references (#13367)
  • [jest-core] Fix detectOpenHandles false positives for some special objects such as TLSWRAP (#13414)
  • [jest-mock] Fix mocking of getters and setters on classes (#13398)
  • [jest-reporters] Revert: Transform file paths into hyperlinks (#13399)
  • [@jest/types] Infer type of each table correctly when the table is a tuple or array (#13381)
  • [@jest/types] Rework typings to allow the *ReturnedWith matchers to be called with no argument (#13385)

Chore & Maintenance

  • [*] Update @babel/* deps, resulting in slightly different stack traces for each (#13422)

Performance

  • [jest-runner] Do not instrument v8 coverage data if coverage should not be collected (#13282)

New Contributors

Full Changelog: v29.1.2...v29.2.0

29.0.0

Blog post: https://jestjs.io/blog/2022/08/25/jest-29

Features

  • [expect] [BREAKING] Differentiate between MatcherContext MatcherUtils and MatcherState types (#13141)
  • [jest-circus] Add support for test.failing.each (#13142)
  • [jest-config] [BREAKING] Make snapshotFormat default to escapeString: false and printBasicPrototype: false (#13036)
  • [jest-config] [BREAKING] Remove undocumented collectCoverageOnlyFrom option (#13156)
  • [jest-environment-jsdom] [BREAKING] Upgrade to jsdom@20 (#13037, #13058)
  • [@jest/globals] Add jest.Mocked, jest.MockedClass, jest.MockedFunction and jest.MockedObject utility types (#12727)
  • [jest-mock] [BREAKING] Refactor Mocked* utility types. MaybeMockedDeep and MaybeMocked became Mocked and MockedShallow respectively; only deep mocked variants of MockedClass, MockedFunction and MockedObject are exported (#13123, #13124)
  • [jest-mock] [BREAKING] Change the default jest.mocked helper’s behavior to deep mocked (#13125)
  • [jest-snapshot] [BREAKING] Let babel find config when updating inline snapshots (#13150)
  • [@jest/test-result, @jest/types] [BREAKING] Replace Bytes and Milliseconds types with number (#13155)
  • [jest-worker] Adds workerIdleMemoryLimit option which is used as a check for worker memory leaks >= Node 16.11.0 and recycles child workers as required (#13056, #13105, #13106, #13107)
  • [pretty-format] [BREAKING] Remove ConvertAnsi plugin in favour of jest-serializer-ansi-escapes (#13040)
  • [pretty-format] Allow to opt out from sorting object keys with compareKeys: null (#12443)

Fixes

  • [jest-config] Fix testing multiple projects with TypeScript config files (#13099)
  • [@jest/expect-utils] Fix deep equality of ImmutableJS Record (#13055)
  • [jest-haste-map] Increase the maximum possible file size that jest-haste-map can handle (#13094)
  • [jest-runtime] Properly support CJS re-exports from dual packages (#13170)
  • [jest-snapshot] Make prettierPath optional in SnapshotState (#13149)
  • [jest-snapshot] Fix parsing error from inline snapshot files with JSX (#12760)
  • [jest-worker] When a process runs out of memory worker exits correctly and doesn't spin indefinitely (#13054)

Chore & Maintenance

  • [*] [BREAKING] Drop support for Node v12 and v17 (#13033)
  • [docs] Fix webpack name (#13049)
  • [docs] Explicit how to set n for --bail (#13128)
  • [docs] Update Enzyme URL (#13166)
  • [jest-leak-detector] Remove support for weak-napi (#13035)
  • [jest-snapshot] [BREAKING] Require rootDir as argument to SnapshotState (#13150)

New Contributors

Full Changelog: v28.1.3...v29.0.0

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ jest-resolve (indirect, 28.1.3 → 30.1.3) · Repo · Changelog

Release Notes

Too many releases to show here. View the full release notes.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ jest-resolve-dependencies (indirect, 28.1.3 → 30.1.3) · Repo · Changelog

Release Notes

Too many releases to show here. View the full release notes.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ jest-runner (indirect, 28.1.3 → 30.1.3) · Repo · Changelog

Release Notes

Too many releases to show here. View the full release notes.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ jest-runtime (indirect, 28.1.3 → 30.1.3) · Repo · Changelog

Release Notes

Too many releases to show here. View the full release notes.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ jest-snapshot (indirect, 28.1.3 → 30.1.2) · Repo · Changelog

Release Notes

Too many releases to show here. View the full release notes.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ jest-util (indirect, 28.1.3 → 30.0.5) · Repo · Changelog

Release Notes

30.0.5 (from changelog)

Features

  • [jest-config] Allow testMatch to take a string value
  • [jest-worker] Let workerIdleMemoryLimit accept 0 to always restart worker child processes

Fixes

  • [expect] Fix bigint error (#15702)

30.0.2

What's Changed

Fixes

  • [jest-matcher-utils] Make 'deepCyclicCopyObject' safer by setting descriptors to a null-prototype object (#15689)
  • [jest-util] Make garbage collection protection property writable (#15689)

Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md

30.0.1

What's Changed

Features

  • [jest-resolver] Implement the defaultAsyncResolver (#15679)

Fixes

  • [jest-resolver] Resolve builtin modules correctly (#15683)
  • [jest-environment-node, jest-util] Avoid setting globals cleanup protection symbol when feature is off (#15684)

Chore & Maintenance

  • [*] Remove and deprecate jest-repl package (#15673)
  • [jest-resolver] Replace custom isBuiltinModule with node's isBuiltin (#15685)

New Contributors

Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md

30.0.0

Today we are happy to announce the release of Jest 30. This release features a substantial number of changes, fixes, and improvements. While it is one of the largest major releases of Jest ever, we admit that three years for a major release is too long. In the future, we are aiming to make more frequent major releases to keep Jest great for the next decade.

If you want to skip all the news and just get going, run npm install jest@^30.0.0 and follow the migration guide: Upgrading from Jest 29 to 30.

Read the full blog post

Features

  • [*] Renamed globalsCleanupMode to globalsCleanup and --waitNextEventLoopTurnForUnhandledRejectionEvents to --waitForUnhandledRejections
  • [expect] Add ArrayOf asymmetric matcher for validating array elements. (#15567)
  • [babel-jest] Add option excludeJestPreset to allow opting out of babel-preset-jest (#15164)
  • [expect] Revert #15038 to fix expect(fn).toHaveBeenCalledWith(expect.objectContaining(...)) when there are multiple calls (#15508)
  • [jest-circus, jest-cli, jest-config] Add waitNextEventLoopTurnForUnhandledRejectionEvents flag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)
  • [jest-circus] Add a waitBeforeRetry option to jest.retryTimes (#14738)
  • [jest-circus] Add a retryImmediately option to jest.retryTimes (#14696)
  • [jest-circus, jest-jasmine2] Allow setupFilesAfterEnv to export an async function (#10962)
  • [jest-circus, jest-test-result] Add startedAt timestamp in TestCaseResultObject within onTestCaseResult (#15145)
  • [jest-cli] Export buildArgv (#15310)
  • [jest-config] [BREAKING] Add mts and cts to default moduleFileExtensions config (#14369)
  • [jest-config] [BREAKING] Update testMatch and testRegex default option for supporting mjs, cjs, mts, and cts (#14584)
  • [jest-config] Loads config file from provided path in package.json (#14044)
  • [jest-config] Allow loading jest.config.cts files (#14070)
  • [jest-config] Show rootDir in error message when a preset fails to load (#15194)
  • [jest-config] Support loading TS config files using esbuild-register via docblock loader (#15190)
  • [jest-config] Allow passing TS config loader options via docblock comment (#15234)
  • [jest-config] If Node is running with type stripping enabled, do not require a TS loader (#15480)
  • [@jest/core] Group together open handles with the same stack trace (#13417, & #14789)
  • [@jest/core] Add perfStats to surface test setup overhead (#14622)
  • [@jest/core] [BREAKING] Changed --filter to accept an object with shape { filtered: Array<string> } to match documentation (#13319)
  • [@jest/core] Support --outputFile option for --listTests (#14980)
  • [@jest/core] Stringify Errors properly with --json flag (#15329)
  • [@jest/core, @jest/test-sequencer] [BREAKING] Exposes globalConfig & contexts to TestSequencer (#14535, & #14543)
  • [jest-each] Introduce %$ option to add number of the test to its title (#14710)
  • [@jest/environment] [BREAKING] Remove deprecated jest.genMockFromModule() (#15042)
  • [@jest/environment] [BREAKING] Remove unnecessary defensive code (#15045)
  • [jest-environment-jsdom] [BREAKING] Upgrade JSDOM to v22 (#13825)
  • [@jest/environment-jsdom-abstract] Introduce new package which abstracts over the jsdom environment, allowing usage of custom versions of JSDOM (#14717)
  • [jest-environment-node] Update jest environment with dispose symbols Symbol (#14888 & #14909)
  • [expect, @jest/expect] [BREAKING] Add type inference for function parameters in CalledWith assertions (#15129)
  • [@jest/expect-utils] Properly compare all types of TypedArrays (#15178)
  • [@jest/fake-timers] [BREAKING] Upgrade @sinonjs/fake-timers to v13 (#14544 & #15470)
  • [@jest/fake-timers] Exposing new modern timers function advanceTimersToFrame() which advances all timers by the needed milliseconds to execute callbacks currently scheduled with requestAnimationFrame (#14598)
  • [jest-matcher-utils] Add SERIALIZABLE_PROPERTIES to allow custom serialization of objects (#14893)
  • [jest-mock] Add support for the Explicit Resource Management proposal to use the using keyword with jest.spyOn(object, methodName) (#14895)
  • [jest-reporters] Add support for DEC mode 2026 (#15008)
  • [jest-resolver] Support file:// URLs as paths (#15154)
  • [jest-resolve,jest-runtime,jest-resolve-dependencies] Pass the conditions when resolving stub modules (#15489)
  • [jest-runtime] Exposing new modern timers function jest.advanceTimersToFrame() from @jest/fake-timers (#14598)
  • [jest-runtime] Support import.meta.filename and import.meta.dirname (available from Node 20.11) (#14854)
  • [jest-runtime] Support import.meta.resolve (#14930)
  • [jest-runtime] [BREAKING] Make it mandatory to pass globalConfig to the Runtime constructor (#15044)
  • [jest-runtime] Add unstable_unmockModule (#15080)
  • [jest-runtime] Add onGenerateMock transformer callback for auto generated callbacks (#15433 & #15482)
  • [jest-runtime] [BREAKING] Use vm.compileFunction over vm.Script (#15461)
  • [@jest/schemas] Upgrade @sinclair/typebox to v0.34 (#15450)
  • [@jest/types] test.each(): Accept a readonly (as const) table properly (#14565)
  • [@jest/types] Improve argument type inference passed to test and describe callback functions from each tables (#14920)
  • [jest-snapshot] [BREAKING] Add support for Error causes in snapshots (#13965)
  • [jest-snapshot] Support Prettier 3 (#14566)
  • [@jest/util-snapshot] Extract utils used by tooling from jest-snapshot into its own package (#15095)
  • [pretty-format] [BREAKING] Do not render empty string children ('') in React plugin (#14470)

Fixes

  • [expect] Show AggregateError to display (#15346)
  • [*] Replace exit with exit-x (#15399)
  • [babel-plugin-jest-hoist] Use denylist instead of the deprecated blacklist for Babel 8 support (#14109)
  • [babel-plugin-jest-hoist] Do not rely on buggy Babel behaviour (#15415)
  • [expect] Check error instance type for toThrow/toThrowError (#14576)
  • [expect] Improve diff for failing expect.objectContaining (#15038)
  • [expect] Use Array.isArray to check if an array is an Array (#15101)
  • [expect] Fix Error cause assertion errors (#15339)
  • [jest-changed-files] Print underlying errors when VCS commands fail (#15052)
  • [jest-changed-files] Abort sl root call if output resembles a steam locomotive (#15053)
  • [jest-circus] [BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)
  • [jest-circus] Replace recursive makeTestResults implementation with iterative one (#14760)
  • [jest-circus] Omit expect.hasAssertions() errors if a test already has errors (#14866)
  • [jest-circus, jest-expect, jest-snapshot] Pass test.failing tests when containing failing snapshot matchers (#14313)
  • [jest-circus] Concurrent tests now emit jest circus events at the correct point and in the expected order. (#15381)
  • [jest-cli] [BREAKING] Validate CLI flags that require arguments receives them (#14783)
  • [jest-config] Make sure to respect runInBand option (#14578)
  • [jest-config] Support testTimeout in project config (#14697)
  • [jest-config] Support coverageReporters in project config (#14697)
  • [jest-config] Allow reporters in project config (#14768)
  • [jest-config] Allow Node16/NodeNext/Bundler moduleResolution in project's tsconfig (#14739)
  • [@jest/create-cache-key-function] Correct the return type of createCacheKey (#15159)
  • [jest-each] Allow $keypath templates with null or undefined values (#14831)
  • [@jest/expect-utils] Fix comparison of DataView (#14408)
  • [@jest/expect-utils] [BREAKING] exclude non-enumerable in object matching (#14670)
  • [@jest/expect-utils] Fix comparison of URL (#14672)
  • [@jest/expect-utils] Check Symbol properties in equality (#14688)
  • [@jest/expect-utils] Catch circular references within arrays when matching objects (#14894)
  • [@jest/expect-utils] Fix not addressing to Sets and Maps as objects without keys (#14873)
  • [jest-haste-map] Fix errors or clobbering with multiple hasteImplModulePaths (#15522)
  • [jest-leak-detector] Make leak-detector more aggressive when running GC (#14526)
  • [jest-runtime] Properly handle re-exported native modules in ESM via CJS (#14589)
  • [jest-runtime] Refactor _importCoreModel so required core module is consistent if modified while loading (#15077)
  • [jest-schemas, jest-types] [BREAKING] Fix type of testFailureExitCode config option(#15232)
  • [jest-util] Make sure isInteractive works in a browser (#14552)
  • [pretty-format] [BREAKING] Print ArrayBuffer and DataView correctly (#14290)
  • [pretty-format] Fixed a bug where "anonymous custom elements" were not being printed as expected. (#15138)
  • [jest-cli] When specifying paths on the command line, only match against the relative paths of the test files (#12519)
    • [BREAKING] Changes testPathPattern configuration option to testPathPatterns, which now takes a list of patterns instead of the regex.
    • [BREAKING] --testPathPattern is now --testPathPatterns
    • [BREAKING] Specifying testPathPatterns when programmatically calling watch must be specified as new TestPathPatterns(patterns), where TestPathPatterns can be imported from @jest/pattern
  • [jest-reporters, jest-runner] Unhandled errors without stack get correctly logged to console (#14619)
  • [jest-util] Always load mjs files with import (#15447)
  • [jest-worker] Properly handle a circular reference error when worker tries to send an assertion fails where either the expected or actual value is circular (#15191)
  • [jest-worker] Properly handle a BigInt when worker tries to send an assertion fails where either the expected or actual value is BigInt (#15191)
  • [expect] Resolve issue where ObjectContaining matched non-object values. ([#15463])(#15463).
    • Adds a conditional/check to ensure the argument passed to expect is an object.
    • Add unit tests for new ObjectContaining behavior.
    • Remove invalid/wrong test case assertions for ObjectContaining.
  • [jest-worker] Addresses incorrect state on exit (#15610)

Performance

  • [*] [BREAKING] Bundle all of Jest's modules into index.js (#12348, #14550 & #14661)
  • [jest-haste-map] Only spawn one process to check for watchman installation (#14826)
  • [jest-runner] Better cleanup source-map-support after test to resolve (minor) memory leak (#15233)
  • [jest-circus, jest-environment-node, jest-repl, jest-runner, jest-util] Cleanup global variables on environment teardown to reduce memory leaks (#15215 & #15636 & #15643)

Chore & Maintenance

  • [jest-environment-jsdom, jest-environment-jsdom-abstract] Increased version of jsdom to ^26.0.0 (#15325CVE-2024-37890)
  • [*] Increase version of micromatch to ^4.0.7 (#15082)
  • [*] [BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)
  • [*] [BREAKING] Drop support for typescript@4.3, minimum version is now 5.4 (#14542, #15621)
  • [*] Depend on exact versions of monorepo dependencies instead of ^ range (#14553)
  • [*] [BREAKING] Add ESM wrapper for all of Jest's modules (#14661)
  • [*] [BREAKING] Upgrade to glob@10 (#14509)
  • [*] Use TypeError over Error where appropriate (#14799)
  • [docs] Fix typos in CHANGELOG.md and packages/jest-validate/README.md (#14640)
  • [docs] Don't use alias matchers in docs (#14631)
  • [babel-jest, babel-preset-jest] [BREAKING] Increase peer dependency of @babel/core to ^7.11 (#14109)
  • [babel-jest, @jest/transform] Update babel-plugin-istanbul to v6 (#15156)
  • [babel-plugin-jest-hoist] Move unnecessary dependencies to devDependencies (#15010)
  • [expect] [BREAKING] Remove .toBeCalled(), .toBeCalledTimes(), .toBeCalledWith(), .lastCalledWith(), .nthCalledWith(), .toReturn(), .toReturnTimes(), .toReturnWith(), .lastReturnedWith(), .nthReturnedWith() and .toThrowError() matcher aliases (#14632)
  • [jest-cli, jest-config, @jest/types] [BREAKING] Remove deprecated --init argument (#14490)
  • [jest-config, @jest/core, jest-util] Upgrade ci-info (#14655)
  • [jest-mock] [BREAKING] Remove MockFunctionMetadataType, MockFunctionMetadata and SpyInstance types (#14621)
  • [@jest/reporters] Upgrade istanbul-lib-source-maps (#14924)
  • [jest-schemas] Upgrade @sinclair/typebox (#14775)
  • [jest-transform] Upgrade write-file-atomic (#14274)
  • [jest-util] Upgrade picomatch to v4 (#14653 & #14885)
  • [docs] Append to NODE_OPTIONS, not overwrite ([#14730](https://github.com/jestjs/jest/pull/14730))
  • [docs] Updated .toHaveBeenCalled() documentation to correctly reflect its functionality (#14842)
  • [docs] Link NestJS documentation on testing with Jest (#14940)
  • [docs] Revised documentation for .toHaveBeenCalled() to accurately depict its functionality. (#14853)
  • [docs] Removed ExpressJS reference link from documentation due to dead link (#15270)
  • [docs] Correct broken links in docs (#15359)

See the CHANGELOG.

29.7.0

Features

  • [create-jest] Add npm init / yarn create initialiser for Jest projects (#14465)
  • [jest-validate] Allow deprecation warnings for unknown options (#14499)

Fixes

  • [jest-resolver] Replace unmatched capture groups in moduleNameMapper with empty string instead of undefined (#14507)
  • [jest-snapshot] Allow for strings as well as template literals in inline snapshots (#14465)
  • [@jest/test-sequencer] Calculate test runtime if perStats.duration is missing (#14473)

Performance

  • [@jest/create-cache-key-function] Cache access of NODE_ENV and BABEL_ENV (#14455)

Chore & Maintenance

  • [jest-cli] Move internal config initialisation logic to the create-jest package (#14465)

New Contributors

Full Changelog: v29.6.4...v29.7.0

29.6.3

Fixes

  • [expect, @jest/expect-utils] ObjectContaining support symbol as key (#14414)
  • [expect] Remove @types/node from dependencies (#14385)
  • [jest-core] Use workers in watch mode by default to avoid crashes (#14059 & #14085).
  • [jest-reporters] Update istanbul-lib-instrument dependency to v6. (#14401)
  • [jest-mock] Revert #13692 as it was a breaking change (#14429)
  • [jest-mock] Revert #13866 as it was a breaking change (#14429)
  • [jest-mock] Revert #13867 as it was a breaking change (#14429)
  • [@jest/reporters] Marks Reporter's hooks as optional (#14433)
  • [jest-runtime] Fix dynamic ESM import module bug when loaded module through jest.isolateModulesAsync (#14397)

Chore & Maintenance

  • [jest-changed-files, jest-circus, jest-console, @jest/core, @jest/runtime, @jest/transform] Use invariant and notEmpty from jest-util rather than own internal (#14366)

New Contributors

Full Changelog: v29.6.2...v29.6.3

29.6.2

Fixes

  • [jest-circus] Fix snapshot matchers in concurrent tests when nr of tests exceeds maxConcurrency (#14335)
  • [@jest/core] When running global setup and teardown, do not try to change the message property of the thrown error object when the message property is unwritable (#14113)
  • [jest-snapshot] Move @types/prettier from dependencies to devDependencies (#14328)
  • [jest-snapshot] Throw an explicit error if Prettier v3 is used (#14367)
  • [jest-reporters] Add "skipped" and "todo" symbols to Github Actions Reporter (#14309)

Chore & Maintenance

  • [@jest/core] Use pluralize from jest-util rather than own internal (#14322)

New Contributors

Full Changelog: v29.6.1...v29.6.2

29.6.1

Fixes

  • [jest-circus] Revert #14110 as it was a breaking change (#14304)

Full Changelog: v29.6.0...v29.6.1

29.6.0

Features

  • [jest-circus, jest-snapshot] Add support for snapshot matchers in concurrent tests (#14139)
  • [jest-cli] Include type definitions to generated config files (#14078)
  • [jest-snapshot] Support arrays as property matchers (#14025)
  • [jest-core, jest-circus, jest-reporter, jest-runner] Added support for reporting about start individual test cases using jest-circus (#14174)

Fixes

  • [jest-circus] Prevent false test failures caused by promise rejections handled asynchronously (#14110)
  • [jest-config] Handle frozen config object (#14054)
  • [jest-config] Allow coverageDirectory and collectCoverageFrom in project config (#14180)
  • [jest-core] Always use workers in watch mode to avoid crashes (#14059).
  • [jest-environment-jsdom, jest-environment-node] Fix assignment of customExportConditions via testEnvironmentOptions when custom env subclass defines a default value (#13989)
  • [jest-matcher-utils] Fix copying value of inherited getters (#14007)
  • [jest-mock] Tweak typings to allow jest.replaceProperty() replace methods (#14008)
  • [jest-mock] Improve user input validation and error messages of spyOn and replaceProperty methods (#14087)
  • [jest-runtime] Bind jest.isolateModulesAsync to this (#14083)
  • [jest-runtime] Forward wrapperLength to the Script constructor as columnOffset for accurate debugging (#14148)
  • [jest-runtime] Guard _isMockFunction access with in (#14188)
  • [jest-snapshot] Fix a potential bug when not using prettier and improve performance (#14036)
  • [@jest/transform] Do not instrument .json modules (#14048)

Chore & Maintenance

  • [*] Update semver dependency to get vulnerability fix (#14262)
  • [docs] Updated documentation for the --runTestsByPath CLI command (#14004)
  • [docs] Updated documentation regarding the synchronous fallback when asynchronous code transforms are unavailable (#14056)
  • [docs] Update jest statistics of use and downloads in website Index.

New Contributors

Full Changelog: v29.5.0...v29.6.0

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ jest-validate (indirect, 28.1.3 → 30.1.0) · Repo · Changelog

Release Notes

30.1.0

Features

  • [jest-leak-detector] Configurable GC aggressiveness regarding to V8 heap snapshot generation (#15793)
  • [jest-runtime] Reduce redundant ReferenceError messages
  • [jest-core] Include test modules that failed to load when --onlyFailures is active

Fixes

  • `[jest-snapshot-utils] Fix deprecated goo.gl snapshot guide link not getting replaced with fully canonical URL (#15787)
  • [jest-circus] Fix it.concurrent not working with describe.skip (#15765)
  • [jest-snapshot] Fix mangled inline snapshot updates when used with Prettier 3 and CRLF line endings
  • [jest-runtime] Importing from @jest/globals in more than one file no longer breaks relative paths (#15772)

Chore

  • [expect] Update docblock for toContain() to display info on substring check (#15789)

30.0.5 (from changelog)

Features

  • [jest-config] Allow testMatch to take a string value
  • [jest-worker] Let workerIdleMemoryLimit accept 0 to always restart worker child processes

Fixes

  • [expect] Fix bigint error (#15702)

30.0.2

What's Changed

Fixes

  • [jest-matcher-utils] Make 'deepCyclicCopyObject' safer by setting descriptors to a null-prototype object (#15689)
  • [jest-util] Make garbage collection protection property writable (#15689)

Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md

30.0.1

What's Changed

Features

  • [jest-resolver] Implement the defaultAsyncResolver (#15679)

Fixes

  • [jest-resolver] Resolve builtin modules correctly (#15683)
  • [jest-environment-node, jest-util] Avoid setting globals cleanup protection symbol when feature is off (#15684)

Chore & Maintenance

  • [*] Remove and deprecate jest-repl package (#15673)
  • [jest-resolver] Replace custom isBuiltinModule with node's isBuiltin (#15685)

New Contributors

Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md

30.0.0

Today we are happy to announce the release of Jest 30. This release features a substantial number of changes, fixes, and improvements. While it is one of the largest major releases of Jest ever, we admit that three years for a major release is too long. In the future, we are aiming to make more frequent major releases to keep Jest great for the next decade.

If you want to skip all the news and just get going, run npm install jest@^30.0.0 and follow the migration guide: Upgrading from Jest 29 to 30.

Read the full blog post

Features

  • [*] Renamed globalsCleanupMode to globalsCleanup and --waitNextEventLoopTurnForUnhandledRejectionEvents to --waitForUnhandledRejections
  • [expect] Add ArrayOf asymmetric matcher for validating array elements. (#15567)
  • [babel-jest] Add option excludeJestPreset to allow opting out of babel-preset-jest (#15164)
  • [expect] Revert #15038 to fix expect(fn).toHaveBeenCalledWith(expect.objectContaining(...)) when there are multiple calls (#15508)
  • [jest-circus, jest-cli, jest-config] Add waitNextEventLoopTurnForUnhandledRejectionEvents flag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)
  • [jest-circus] Add a waitBeforeRetry option to jest.retryTimes (#14738)
  • [jest-circus] Add a retryImmediately option to jest.retryTimes (#14696)
  • [jest-circus, jest-jasmine2] Allow setupFilesAfterEnv to export an async function (#10962)
  • [jest-circus, jest-test-result] Add startedAt timestamp in TestCaseResultObject within onTestCaseResult (#15145)
  • [jest-cli] Export buildArgv (#15310)
  • [jest-config] [BREAKING] Add mts and cts to default moduleFileExtensions config (#14369)
  • [jest-config] [BREAKING] Update testMatch and testRegex default option for supporting mjs, cjs, mts, and cts (#14584)
  • [jest-config] Loads config file from provided path in package.json (#14044)
  • [jest-config] Allow loading jest.config.cts files (#14070)
  • [jest-config] Show rootDir in error message when a preset fails to load (#15194)
  • [jest-config] Support loading TS config files using esbuild-register via docblock loader (#15190)
  • [jest-config] Allow passing TS config loader options via docblock comment (#15234)
  • [jest-config] If Node is running with type stripping enabled, do not require a TS loader (#15480)
  • [@jest/core] Group together open handles with the same stack trace (#13417, & #14789)
  • [@jest/core] Add perfStats to surface test setup overhead (#14622)
  • [@jest/core] [BREAKING] Changed --filter to accept an object with shape { filtered: Array<string> } to match documentation (#13319)
  • [@jest/core] Support --outputFile option for --listTests (#14980)
  • [@jest/core] Stringify Errors properly with --json flag (#15329)
  • [@jest/core, @jest/test-sequencer] [BREAKING] Exposes globalConfig & contexts to TestSequencer (#14535, & #14543)
  • [jest-each] Introduce %$ option to add number of the test to its title (#14710)
  • [@jest/environment] [BREAKING] Remove deprecated jest.genMockFromModule() (#15042)
  • [@jest/environment] [BREAKING] Remove unnecessary defensive code (#15045)
  • [jest-environment-jsdom] [BREAKING] Upgrade JSDOM to v22 (#13825)
  • [@jest/environment-jsdom-abstract] Introduce new package which abstracts over the jsdom environment, allowing usage of custom versions of JSDOM (#14717)
  • [jest-environment-node] Update jest environment with dispose symbols Symbol (#14888 & #14909)
  • [expect, @jest/expect] [BREAKING] Add type inference for function parameters in CalledWith assertions (#15129)
  • [@jest/expect-utils] Properly compare all types of TypedArrays (#15178)
  • [@jest/fake-timers] [BREAKING] Upgrade @sinonjs/fake-timers to v13 (#14544 & #15470)
  • [@jest/fake-timers] Exposing new modern timers function advanceTimersToFrame() which advances all timers by the needed milliseconds to execute callbacks currently scheduled with requestAnimationFrame (#14598)
  • [jest-matcher-utils] Add SERIALIZABLE_PROPERTIES to allow custom serialization of objects (#14893)
  • [jest-mock] Add support for the Explicit Resource Management proposal to use the using keyword with jest.spyOn(object, methodName) (#14895)
  • [jest-reporters] Add support for DEC mode 2026 (#15008)
  • [jest-resolver] Support file:// URLs as paths (#15154)
  • [jest-resolve,jest-runtime,jest-resolve-dependencies] Pass the conditions when resolving stub modules (#15489)
  • [jest-runtime] Exposing new modern timers function jest.advanceTimersToFrame() from @jest/fake-timers (#14598)
  • [jest-runtime] Support import.meta.filename and import.meta.dirname (available from Node 20.11) (#14854)
  • [jest-runtime] Support import.meta.resolve (#14930)
  • [jest-runtime] [BREAKING] Make it mandatory to pass globalConfig to the Runtime constructor (#15044)
  • [jest-runtime] Add unstable_unmockModule (#15080)
  • [jest-runtime] Add onGenerateMock transformer callback for auto generated callbacks (#15433 & #15482)
  • [jest-runtime] [BREAKING] Use vm.compileFunction over vm.Script (#15461)
  • [@jest/schemas] Upgrade @sinclair/typebox to v0.34 (#15450)
  • [@jest/types] test.each(): Accept a readonly (as const) table properly (#14565)
  • [@jest/types] Improve argument type inference passed to test and describe callback functions from each tables (#14920)
  • [jest-snapshot] [BREAKING] Add support for Error causes in snapshots (#13965)
  • [jest-snapshot] Support Prettier 3 (#14566)
  • [@jest/util-snapshot] Extract utils used by tooling from jest-snapshot into its own package (#15095)
  • [pretty-format] [BREAKING] Do not render empty string children ('') in React plugin (#14470)

Fixes

  • [expect] Show AggregateError to display (#15346)
  • [*] Replace exit with exit-x (#15399)
  • [babel-plugin-jest-hoist] Use denylist instead of the deprecated blacklist for Babel 8 support (#14109)
  • [babel-plugin-jest-hoist] Do not rely on buggy Babel behaviour (#15415)
  • [expect] Check error instance type for toThrow/toThrowError (#14576)
  • [expect] Improve diff for failing expect.objectContaining (#15038)
  • [expect] Use Array.isArray to check if an array is an Array (#15101)
  • [expect] Fix Error cause assertion errors (#15339)
  • [jest-changed-files] Print underlying errors when VCS commands fail (#15052)
  • [jest-changed-files] Abort sl root call if output resembles a steam locomotive (#15053)
  • [jest-circus] [BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)
  • [jest-circus] Replace recursive makeTestResults implementation with iterative one (#14760)
  • [jest-circus] Omit expect.hasAssertions() errors if a test already has errors (#14866)
  • [jest-circus, jest-expect, jest-snapshot] Pass test.failing tests when containing failing snapshot matchers (#14313)
  • [jest-circus] Concurrent tests now emit jest circus events at the correct point and in the expected order. (#15381)
  • [jest-cli] [BREAKING] Validate CLI flags that require arguments receives them (#14783)
  • [jest-config] Make sure to respect runInBand option (#14578)
  • [jest-config] Support testTimeout in project config (#14697)
  • [jest-config] Support coverageReporters in project config (#14697)
  • [jest-config] Allow reporters in project config (#14768)
  • [jest-config] Allow Node16/NodeNext/Bundler moduleResolution in project's tsconfig (#14739)
  • [@jest/create-cache-key-function] Correct the return type of createCacheKey (#15159)
  • [jest-each] Allow $keypath templates with null or undefined values (#14831)
  • [@jest/expect-utils] Fix comparison of DataView (#14408)
  • [@jest/expect-utils] [BREAKING] exclude non-enumerable in object matching (#14670)
  • [@jest/expect-utils] Fix comparison of URL (#14672)
  • [@jest/expect-utils] Check Symbol properties in equality (#14688)
  • [@jest/expect-utils] Catch circular references within arrays when matching objects (#14894)
  • [@jest/expect-utils] Fix not addressing to Sets and Maps as objects without keys (#14873)
  • [jest-haste-map] Fix errors or clobbering with multiple hasteImplModulePaths (#15522)
  • [jest-leak-detector] Make leak-detector more aggressive when running GC (#14526)
  • [jest-runtime] Properly handle re-exported native modules in ESM via CJS (#14589)
  • [jest-runtime] Refactor _importCoreModel so required core module is consistent if modified while loading (#15077)
  • [jest-schemas, jest-types] [BREAKING] Fix type of testFailureExitCode config option(#15232)
  • [jest-util] Make sure isInteractive works in a browser (#14552)
  • [pretty-format] [BREAKING] Print ArrayBuffer and DataView correctly (#14290)
  • [pretty-format] Fixed a bug where "anonymous custom elements" were not being printed as expected. (#15138)
  • [jest-cli] When specifying paths on the command line, only match against the relative paths of the test files (#12519)
    • [BREAKING] Changes testPathPattern configuration option to testPathPatterns, which now takes a list of patterns instead of the regex.
    • [BREAKING] --testPathPattern is now --testPathPatterns
    • [BREAKING] Specifying testPathPatterns when programmatically calling watch must be specified as new TestPathPatterns(patterns), where TestPathPatterns can be imported from @jest/pattern
  • [jest-reporters, jest-runner] Unhandled errors without stack get correctly logged to console (#14619)
  • [jest-util] Always load mjs files with import (#15447)
  • [jest-worker] Properly handle a circular reference error when worker tries to send an assertion fails where either the expected or actual value is circular (#15191)
  • [jest-worker] Properly handle a BigInt when worker tries to send an assertion fails where either the expected or actual value is BigInt (#15191)
  • [expect] Resolve issue where ObjectContaining matched non-object values. ([#15463])(#15463).
    • Adds a conditional/check to ensure the argument passed to expect is an object.
    • Add unit tests for new ObjectContaining behavior.
    • Remove invalid/wrong test case assertions for ObjectContaining.
  • [jest-worker] Addresses incorrect state on exit (#15610)

Performance

  • [*] [BREAKING] Bundle all of Jest's modules into index.js (#12348, #14550 & #14661)
  • [jest-haste-map] Only spawn one process to check for watchman installation (#14826)
  • [jest-runner] Better cleanup source-map-support after test to resolve (minor) memory leak (#15233)
  • [jest-circus, jest-environment-node, jest-repl, jest-runner, jest-util] Cleanup global variables on environment teardown to reduce memory leaks (#15215 & #15636 & #15643)

Chore & Maintenance

  • [jest-environment-jsdom, jest-environment-jsdom-abstract] Increased version of jsdom to ^26.0.0 (#15325CVE-2024-37890)
  • [*] Increase version of micromatch to ^4.0.7 (#15082)
  • [*] [BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)
  • [*] [BREAKING] Drop support for typescript@4.3, minimum version is now 5.4 (#14542, #15621)
  • [*] Depend on exact versions of monorepo dependencies instead of ^ range (#14553)
  • [*] [BREAKING] Add ESM wrapper for all of Jest's modules (#14661)
  • [*] [BREAKING] Upgrade to glob@10 (#14509)
  • [*] Use TypeError over Error where appropriate (#14799)
  • [docs] Fix typos in CHANGELOG.md and packages/jest-validate/README.md (#14640)
  • [docs] Don't use alias matchers in docs (#14631)
  • [babel-jest, babel-preset-jest] [BREAKING] Increase peer dependency of @babel/core to ^7.11 (#14109)
  • [babel-jest, @jest/transform] Update babel-plugin-istanbul to v6 (#15156)
  • [babel-plugin-jest-hoist] Move unnecessary dependencies to devDependencies (#15010)
  • [expect] [BREAKING] Remove .toBeCalled(), .toBeCalledTimes(), .toBeCalledWith(), .lastCalledWith(), .nthCalledWith(), .toReturn(), .toReturnTimes(), .toReturnWith(), .lastReturnedWith(), .nthReturnedWith() and .toThrowError() matcher aliases (#14632)
  • [jest-cli, jest-config, @jest/types] [BREAKING] Remove deprecated --init argument (#14490)
  • [jest-config, @jest/core, jest-util] Upgrade ci-info (#14655)
  • [jest-mock] [BREAKING] Remove MockFunctionMetadataType, MockFunctionMetadata and SpyInstance types (#14621)
  • [@jest/reporters] Upgrade istanbul-lib-source-maps (#14924)
  • [jest-schemas] Upgrade @sinclair/typebox (#14775)
  • [jest-transform] Upgrade write-file-atomic (#14274)
  • [jest-util] Upgrade picomatch to v4 (#14653 & #14885)
  • [docs] Append to NODE_OPTIONS, not overwrite ([#14730](https://github.com/jestjs/jest/pull/14730))
  • [docs] Updated .toHaveBeenCalled() documentation to correctly reflect its functionality (#14842)
  • [docs] Link NestJS documentation on testing with Jest (#14940)
  • [docs] Revised documentation for .toHaveBeenCalled() to accurately depict its functionality. (#14853)
  • [docs] Removed ExpressJS reference link from documentation due to dead link (#15270)
  • [docs] Correct broken links in docs (#15359)

See the CHANGELOG.

29.7.0

Features

  • [create-jest] Add npm init / yarn create initialiser for Jest projects (#14465)
  • [jest-validate] Allow deprecation warnings for unknown options (#14499)

Fixes

  • [jest-resolver] Replace unmatched capture groups in moduleNameMapper with empty string instead of undefined (#14507)
  • [jest-snapshot] Allow for strings as well as template literals in inline snapshots (#14465)
  • [@jest/test-sequencer] Calculate test runtime if perStats.duration is missing (#14473)

Performance

  • [@jest/create-cache-key-function] Cache access of NODE_ENV and BABEL_ENV (#14455)

Chore & Maintenance

  • [jest-cli] Move internal config initialisation logic to the create-jest package (#14465)

New Contributors

Full Changelog: v29.6.4...v29.7.0

29.6.3

Fixes

  • [expect, @jest/expect-utils] ObjectContaining support symbol as key (#14414)
  • [expect] Remove @types/node from dependencies (#14385)
  • [jest-core] Use workers in watch mode by default to avoid crashes (#14059 & #14085).
  • [jest-reporters] Update istanbul-lib-instrument dependency to v6. (#14401)
  • [jest-mock] Revert #13692 as it was a breaking change (#14429)
  • [jest-mock] Revert #13866 as it was a breaking change (#14429)
  • [jest-mock] Revert #13867 as it was a breaking change (#14429)
  • [@jest/reporters] Marks Reporter's hooks as optional (#14433)
  • [jest-runtime] Fix dynamic ESM import module bug when loaded module through jest.isolateModulesAsync (#14397)

Chore & Maintenance

  • [jest-changed-files, jest-circus, jest-console, @jest/core, @jest/runtime, @jest/transform] Use invariant and notEmpty from jest-util rather than own internal (#14366)

New Contributors

Full Changelog: v29.6.2...v29.6.3

29.6.2

Fixes

  • [jest-circus] Fix snapshot matchers in concurrent tests when nr of tests exceeds maxConcurrency (#14335)
  • [@jest/core] When running global setup and teardown, do not try to change the message property of the thrown error object when the message property is unwritable (#14113)
  • [jest-snapshot] Move @types/prettier from dependencies to devDependencies (#14328)
  • [jest-snapshot] Throw an explicit error if Prettier v3 is used (#14367)
  • [jest-reporters] Add "skipped" and "todo" symbols to Github Actions Reporter (#14309)

Chore & Maintenance

  • [@jest/core] Use pluralize from jest-util rather than own internal (#14322)

New Contributors

Full Changelog: v29.6.1...v29.6.2

29.6.1

Fixes

  • [jest-circus] Revert #14110 as it was a breaking change (#14304)

Full Changelog: v29.6.0...v29.6.1

29.6.0

Features

  • [jest-circus, jest-snapshot] Add support for snapshot matchers in concurrent tests (#14139)
  • [jest-cli] Include type definitions to generated config files (#14078)
  • [jest-snapshot] Support arrays as property matchers (#14025)
  • [jest-core, jest-circus, jest-reporter, jest-runner] Added support for reporting about start individual test cases using jest-circus (#14174)

Fixes

  • [jest-circus] Prevent false test failures caused by promise rejections handled asynchronously (#14110)
  • [jest-config] Handle frozen config object (#14054)
  • [jest-config] Allow coverageDirectory and collectCoverageFrom in project config (#14180)
  • [jest-core] Always use workers in watch mode to avoid crashes (#14059).
  • [jest-environment-jsdom, jest-environment-node] Fix assignment of customExportConditions via testEnvironmentOptions when custom env subclass defines a default value (#13989)
  • [jest-matcher-utils] Fix copying value of inherited getters (#14007)
  • [jest-mock] Tweak typings to allow jest.replaceProperty() replace methods (#14008)
  • [jest-mock] Improve user input validation and error messages of spyOn and replaceProperty methods (#14087)
  • [jest-runtime] Bind jest.isolateModulesAsync to this (#14083)
  • [jest-runtime] Forward wrapperLength to the Script constructor as columnOffset for accurate debugging (#14148)
  • [jest-runtime] Guard _isMockFunction access with in (#14188)
  • [jest-snapshot] Fix a potential bug when not using prettier and improve performance (#14036)
  • [@jest/transform] Do not instrument .json modules (#14048)

Chore & Maintenance

  • [*] Update semver dependency to get vulnerability fix (#14262)
  • [docs] Updated documentation for the --runTestsByPath CLI command (#14004)
  • [docs] Updated documentation regarding the synchronous fallback when asynchronous code transforms are unavailable (#14056)
  • [docs] Update jest statistics of use and downloads in website Index.

New Contributors

Full Changelog: v29.5.0...v29.6.0

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ jest-watcher (indirect, 28.1.3 → 30.1.3) · Repo · Changelog

Release Notes

30.1.3

Fixes

  • Fix unstable_mockModule with node: prefixed core modules.

30.1.2 (from changelog)

Fixes

  • [jest-snapshot-utils] Correct snapshot header regexp to work with newline across OSes (#15803)

30.1.1

Fixes

  • [jest-snapshot-utils] Fix deprecated goo.gl snapshot warning not handling Windows end-of-line sequences (#15800)

30.1.0

Features

  • [jest-leak-detector] Configurable GC aggressiveness regarding to V8 heap snapshot generation (#15793)
  • [jest-runtime] Reduce redundant ReferenceError messages
  • [jest-core] Include test modules that failed to load when --onlyFailures is active

Fixes

  • `[jest-snapshot-utils] Fix deprecated goo.gl snapshot guide link not getting replaced with fully canonical URL (#15787)
  • [jest-circus] Fix it.concurrent not working with describe.skip (#15765)
  • [jest-snapshot] Fix mangled inline snapshot updates when used with Prettier 3 and CRLF line endings
  • [jest-runtime] Importing from @jest/globals in more than one file no longer breaks relative paths (#15772)

Chore

  • [expect] Update docblock for toContain() to display info on substring check (#15789)

30.0.5 (from changelog)

Features

  • [jest-config] Allow testMatch to take a string value
  • [jest-worker] Let workerIdleMemoryLimit accept 0 to always restart worker child processes

Fixes

  • [expect] Fix bigint error (#15702)

30.0.4 (from changelog)

Features

  • [expect] The Inverse type is now exported (#15714)
  • [expect] feat: support async functions in toBe (#15704)

Fixes

  • [jest] jest --onlyFailures --listTests now correctly lists only failed tests (#15700)
  • [jest-snapshot] Handle line endings in snapshots (#15708)

30.0.2

What's Changed

Fixes

  • [jest-matcher-utils] Make 'deepCyclicCopyObject' safer by setting descriptors to a null-prototype object (#15689)
  • [jest-util] Make garbage collection protection property writable (#15689)

Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md

30.0.1

What's Changed

Features

  • [jest-resolver] Implement the defaultAsyncResolver (#15679)

Fixes

  • [jest-resolver] Resolve builtin modules correctly (#15683)
  • [jest-environment-node, jest-util] Avoid setting globals cleanup protection symbol when feature is off (#15684)

Chore & Maintenance

  • [*] Remove and deprecate jest-repl package (#15673)
  • [jest-resolver] Replace custom isBuiltinModule with node's isBuiltin (#15685)

New Contributors

Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md

30.0.0

Today we are happy to announce the release of Jest 30. This release features a substantial number of changes, fixes, and improvements. While it is one of the largest major releases of Jest ever, we admit that three years for a major release is too long. In the future, we are aiming to make more frequent major releases to keep Jest great for the next decade.

If you want to skip all the news and just get going, run npm install jest@^30.0.0 and follow the migration guide: Upgrading from Jest 29 to 30.

Read the full blog post

Features

  • [*] Renamed globalsCleanupMode to globalsCleanup and --waitNextEventLoopTurnForUnhandledRejectionEvents to --waitForUnhandledRejections
  • [expect] Add ArrayOf asymmetric matcher for validating array elements. (#15567)
  • [babel-jest] Add option excludeJestPreset to allow opting out of babel-preset-jest (#15164)
  • [expect] Revert #15038 to fix expect(fn).toHaveBeenCalledWith(expect.objectContaining(...)) when there are multiple calls (#15508)
  • [jest-circus, jest-cli, jest-config] Add waitNextEventLoopTurnForUnhandledRejectionEvents flag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)
  • [jest-circus] Add a waitBeforeRetry option to jest.retryTimes (#14738)
  • [jest-circus] Add a retryImmediately option to jest.retryTimes (#14696)
  • [jest-circus, jest-jasmine2] Allow setupFilesAfterEnv to export an async function (#10962)
  • [jest-circus, jest-test-result] Add startedAt timestamp in TestCaseResultObject within onTestCaseResult (#15145)
  • [jest-cli] Export buildArgv (#15310)
  • [jest-config] [BREAKING] Add mts and cts to default moduleFileExtensions config (#14369)
  • [jest-config] [BREAKING] Update testMatch and testRegex default option for supporting mjs, cjs, mts, and cts (#14584)
  • [jest-config] Loads config file from provided path in package.json (#14044)
  • [jest-config] Allow loading jest.config.cts files (#14070)
  • [jest-config] Show rootDir in error message when a preset fails to load (#15194)
  • [jest-config] Support loading TS config files using esbuild-register via docblock loader (#15190)
  • [jest-config] Allow passing TS config loader options via docblock comment (#15234)
  • [jest-config] If Node is running with type stripping enabled, do not require a TS loader (#15480)
  • [@jest/core] Group together open handles with the same stack trace (#13417, & #14789)
  • [@jest/core] Add perfStats to surface test setup overhead (#14622)
  • [@jest/core] [BREAKING] Changed --filter to accept an object with shape { filtered: Array<string> } to match documentation (#13319)
  • [@jest/core] Support --outputFile option for --listTests (#14980)
  • [@jest/core] Stringify Errors properly with --json flag (#15329)
  • [@jest/core, @jest/test-sequencer] [BREAKING] Exposes globalConfig & contexts to TestSequencer (#14535, & #14543)
  • [jest-each] Introduce %$ option to add number of the test to its title (#14710)
  • [@jest/environment] [BREAKING] Remove deprecated jest.genMockFromModule() (#15042)
  • [@jest/environment] [BREAKING] Remove unnecessary defensive code (#15045)
  • [jest-environment-jsdom] [BREAKING] Upgrade JSDOM to v22 (#13825)
  • [@jest/environment-jsdom-abstract] Introduce new package which abstracts over the jsdom environment, allowing usage of custom versions of JSDOM (#14717)
  • [jest-environment-node] Update jest environment with dispose symbols Symbol (#14888 & #14909)
  • [expect, @jest/expect] [BREAKING] Add type inference for function parameters in CalledWith assertions (#15129)
  • [@jest/expect-utils] Properly compare all types of TypedArrays (#15178)
  • [@jest/fake-timers] [BREAKING] Upgrade @sinonjs/fake-timers to v13 (#14544 & #15470)
  • [@jest/fake-timers] Exposing new modern timers function advanceTimersToFrame() which advances all timers by the needed milliseconds to execute callbacks currently scheduled with requestAnimationFrame (#14598)
  • [jest-matcher-utils] Add SERIALIZABLE_PROPERTIES to allow custom serialization of objects (#14893)
  • [jest-mock] Add support for the Explicit Resource Management proposal to use the using keyword with jest.spyOn(object, methodName) (#14895)
  • [jest-reporters] Add support for DEC mode 2026 (#15008)
  • [jest-resolver] Support file:// URLs as paths (#15154)
  • [jest-resolve,jest-runtime,jest-resolve-dependencies] Pass the conditions when resolving stub modules (#15489)
  • [jest-runtime] Exposing new modern timers function jest.advanceTimersToFrame() from @jest/fake-timers (#14598)
  • [jest-runtime] Support import.meta.filename and import.meta.dirname (available from Node 20.11) (#14854)
  • [jest-runtime] Support import.meta.resolve (#14930)
  • [jest-runtime] [BREAKING] Make it mandatory to pass globalConfig to the Runtime constructor (#15044)
  • [jest-runtime] Add unstable_unmockModule (#15080)
  • [jest-runtime] Add onGenerateMock transformer callback for auto generated callbacks (#15433 & #15482)
  • [jest-runtime] [BREAKING] Use vm.compileFunction over vm.Script (#15461)
  • [@jest/schemas] Upgrade @sinclair/typebox to v0.34 (#15450)
  • [@jest/types] test.each(): Accept a readonly (as const) table properly (#14565)
  • [@jest/types] Improve argument type inference passed to test and describe callback functions from each tables (#14920)
  • [jest-snapshot] [BREAKING] Add support for Error causes in snapshots (#13965)
  • [jest-snapshot] Support Prettier 3 (#14566)
  • [@jest/util-snapshot] Extract utils used by tooling from jest-snapshot into its own package (#15095)
  • [pretty-format] [BREAKING] Do not render empty string children ('') in React plugin (#14470)

Fixes

  • [expect] Show AggregateError to display (#15346)
  • [*] Replace exit with exit-x (#15399)
  • [babel-plugin-jest-hoist] Use denylist instead of the deprecated blacklist for Babel 8 support (#14109)
  • [babel-plugin-jest-hoist] Do not rely on buggy Babel behaviour (#15415)
  • [expect] Check error instance type for toThrow/toThrowError (#14576)
  • [expect] Improve diff for failing expect.objectContaining (#15038)
  • [expect] Use Array.isArray to check if an array is an Array (#15101)
  • [expect] Fix Error cause assertion errors (#15339)
  • [jest-changed-files] Print underlying errors when VCS commands fail (#15052)
  • [jest-changed-files] Abort sl root call if output resembles a steam locomotive (#15053)
  • [jest-circus] [BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)
  • [jest-circus] Replace recursive makeTestResults implementation with iterative one (#14760)
  • [jest-circus] Omit expect.hasAssertions() errors if a test already has errors (#14866)
  • [jest-circus, jest-expect, jest-snapshot] Pass test.failing tests when containing failing snapshot matchers (#14313)
  • [jest-circus] Concurrent tests now emit jest circus events at the correct point and in the expected order. (#15381)
  • [jest-cli] [BREAKING] Validate CLI flags that require arguments receives them (#14783)
  • [jest-config] Make sure to respect runInBand option (#14578)
  • [jest-config] Support testTimeout in project config (#14697)
  • [jest-config] Support coverageReporters in project config (#14697)
  • [jest-config] Allow reporters in project config (#14768)
  • [jest-config] Allow Node16/NodeNext/Bundler moduleResolution in project's tsconfig (#14739)
  • [@jest/create-cache-key-function] Correct the return type of createCacheKey (#15159)
  • [jest-each] Allow $keypath templates with null or undefined values (#14831)
  • [@jest/expect-utils] Fix comparison of DataView (#14408)
  • [@jest/expect-utils] [BREAKING] exclude non-enumerable in object matching (#14670)
  • [@jest/expect-utils] Fix comparison of URL (#14672)
  • [@jest/expect-utils] Check Symbol properties in equality (#14688)
  • [@jest/expect-utils] Catch circular references within arrays when matching objects (#14894)
  • [@jest/expect-utils] Fix not addressing to Sets and Maps as objects without keys (#14873)
  • [jest-haste-map] Fix errors or clobbering with multiple hasteImplModulePaths (#15522)
  • [jest-leak-detector] Make leak-detector more aggressive when running GC (#14526)
  • [jest-runtime] Properly handle re-exported native modules in ESM via CJS (#14589)
  • [jest-runtime] Refactor _importCoreModel so required core module is consistent if modified while loading (#15077)
  • [jest-schemas, jest-types] [BREAKING] Fix type of testFailureExitCode config option(#15232)
  • [jest-util] Make sure isInteractive works in a browser (#14552)
  • [pretty-format] [BREAKING] Print ArrayBuffer and DataView correctly (#14290)
  • [pretty-format] Fixed a bug where "anonymous custom elements" were not being printed as expected. (#15138)
  • [jest-cli] When specifying paths on the command line, only match against the relative paths of the test files (#12519)
    • [BREAKING] Changes testPathPattern configuration option to testPathPatterns, which now takes a list of patterns instead of the regex.
    • [BREAKING] --testPathPattern is now --testPathPatterns
    • [BREAKING] Specifying testPathPatterns when programmatically calling watch must be specified as new TestPathPatterns(patterns), where TestPathPatterns can be imported from @jest/pattern
  • [jest-reporters, jest-runner] Unhandled errors without stack get correctly logged to console (#14619)
  • [jest-util] Always load mjs files with import (#15447)
  • [jest-worker] Properly handle a circular reference error when worker tries to send an assertion fails where either the expected or actual value is circular (#15191)
  • [jest-worker] Properly handle a BigInt when worker tries to send an assertion fails where either the expected or actual value is BigInt (#15191)
  • [expect] Resolve issue where ObjectContaining matched non-object values. ([#15463])(#15463).
    • Adds a conditional/check to ensure the argument passed to expect is an object.
    • Add unit tests for new ObjectContaining behavior.
    • Remove invalid/wrong test case assertions for ObjectContaining.
  • [jest-worker] Addresses incorrect state on exit (#15610)

Performance

  • [*] [BREAKING] Bundle all of Jest's modules into index.js (#12348, #14550 & #14661)
  • [jest-haste-map] Only spawn one process to check for watchman installation (#14826)
  • [jest-runner] Better cleanup source-map-support after test to resolve (minor) memory leak (#15233)
  • [jest-circus, jest-environment-node, jest-repl, jest-runner, jest-util] Cleanup global variables on environment teardown to reduce memory leaks (#15215 & #15636 & #15643)

Chore & Maintenance

  • [jest-environment-jsdom, jest-environment-jsdom-abstract] Increased version of jsdom to ^26.0.0 (#15325CVE-2024-37890)
  • [*] Increase version of micromatch to ^4.0.7 (#15082)
  • [*] [BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)
  • [*] [BREAKING] Drop support for typescript@4.3, minimum version is now 5.4 (#14542, #15621)
  • [*] Depend on exact versions of monorepo dependencies instead of ^ range (#14553)
  • [*] [BREAKING] Add ESM wrapper for all of Jest's modules (#14661)
  • [*] [BREAKING] Upgrade to glob@10 (#14509)
  • [*] Use TypeError over Error where appropriate (#14799)
  • [docs] Fix typos in CHANGELOG.md and packages/jest-validate/README.md (#14640)
  • [docs] Don't use alias matchers in docs (#14631)
  • [babel-jest, babel-preset-jest] [BREAKING] Increase peer dependency of @babel/core to ^7.11 (#14109)
  • [babel-jest, @jest/transform] Update babel-plugin-istanbul to v6 (#15156)
  • [babel-plugin-jest-hoist] Move unnecessary dependencies to devDependencies (#15010)
  • [expect] [BREAKING] Remove .toBeCalled(), .toBeCalledTimes(), .toBeCalledWith(), .lastCalledWith(), .nthCalledWith(), .toReturn(), .toReturnTimes(), .toReturnWith(), .lastReturnedWith(), .nthReturnedWith() and .toThrowError() matcher aliases (#14632)
  • [jest-cli, jest-config, @jest/types] [BREAKING] Remove deprecated --init argument (#14490)
  • [jest-config, @jest/core, jest-util] Upgrade ci-info (#14655)
  • [jest-mock] [BREAKING] Remove MockFunctionMetadataType, MockFunctionMetadata and SpyInstance types (#14621)
  • [@jest/reporters] Upgrade istanbul-lib-source-maps (#14924)
  • [jest-schemas] Upgrade @sinclair/typebox (#14775)
  • [jest-transform] Upgrade write-file-atomic (#14274)
  • [jest-util] Upgrade picomatch to v4 (#14653 & #14885)
  • [docs] Append to NODE_OPTIONS, not overwrite ([#14730](https://github.com/jestjs/jest/pull/14730))
  • [docs] Updated .toHaveBeenCalled() documentation to correctly reflect its functionality (#14842)
  • [docs] Link NestJS documentation on testing with Jest (#14940)
  • [docs] Revised documentation for .toHaveBeenCalled() to accurately depict its functionality. (#14853)
  • [docs] Removed ExpressJS reference link from documentation due to dead link (#15270)
  • [docs] Correct broken links in docs (#15359)

See the CHANGELOG.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ jsesc (indirect, 2.5.2 → 3.1.0) · Repo

Commits

See the full diff on Github. The new version differs by 18 commits:

↗️ make-dir (indirect, 3.1.0 → 4.0.0) · Repo

Release Notes

4.0.0

Breaking

Improvements

v3.1.0...v4.0.0

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by 10 commits:

↗️ micromatch (indirect, 4.0.5 → 4.0.8) · Repo · Changelog

Security Advisories 🚨

🚨 Regular Expression Denial of Service (ReDoS) in micromatch

The NPM package micromatch prior to version 4.0.8 is vulnerable to Regular Expression Denial of Service (ReDoS). The vulnerability occurs in micromatch.braces() in index.js because the pattern .* will greedily match anything. By passing a malicious payload, the pattern matching will keep backtracking to the input while it doesn't find the closing bracket. As the input size increases, the consumption time will also increase until it causes the application to hang or slow down. There was a merged fix but further testing shows the issue persisted prior to #266. This issue should be mitigated by using a safe pattern that won't start backtracking the regular expression due to greedy matching.

Commits

See the full diff on Github. The new version differs by 16 commits:

↗️ node-releases (indirect, 2.0.2 → 2.0.19) · Repo

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ picocolors (indirect, 1.0.0 → 1.1.1) · Repo · Changelog

Release Notes

1.1.1

What's new?

  • Moved TypeScript declarations to a d.ts file #82
  • Reworked color detection algorithm to properly work with empty strings in NO_COLOR and FORCE_COLOR env variables #87
  • Eliminated require() call to make the package compatible with some tools #87

1.1.0

What's new?

  • Added bright color variants #55

1.0.1

What's new?

  • Updated color detection mechanism to work properly on Vercel Edge Runtime #64
  • Remove use of recursion to avoid possible stack overflow for very long inputs #56

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by 16 commits:

↗️ pirates (indirect, 4.0.5 → 4.0.7) · Repo

Release Notes

4.0.7

4.0.7 (2025-03-27)

Bug Fixes

  • remove build process and ship source directly (924ccc3)
  • Update some wording and fix grammar in messages (#121) (f39d729)

4.0.6

4.0.6 (2023-06-20)

Bug Fixes

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by 48 commits:

↗️ pretty-format (indirect, 28.1.3 → 30.0.5) · Repo · Changelog

Release Notes

Too many releases to show here. View the full release notes.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ react-is (indirect, 18.2.0 → 18.3.1) · Repo · Changelog

Release Notes

18.3.1

  • Export act from react f1338f

18.3.0

This release is identical to 18.2 but adds warnings for deprecated APIs and other changes that are needed for React 19.

Read the React 19 Upgrade Guide for more info.

React

  • Allow writing to this.refs to support string ref codemod 909071
  • Warn for deprecated findDOMNode outside StrictMode c3b283
  • Warn for deprecated test-utils methods d4ea75
  • Warn for deprecated Legacy Context outside StrictMode 415ee0
  • Warn for deprecated string refs outside StrictMode #25383
  • Warn for deprecated defaultProps for function components #25699
  • Warn when spreading key #25697
  • Warn when using act from test-utils d4ea75

React DOM

  • Warn for deprecated unmountComponentAtNode 8a015b
  • Warn for deprecated renderToStaticNodeStream #28874

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by 12 commits:

↗️ semver (indirect, 6.3.0 → 6.3.1) · Repo · Changelog

Security Advisories 🚨

🚨 semver vulnerable to Regular Expression Denial of Service

Versions of the package semver before 7.5.2 on the 7.x branch, before 6.3.1 on the 6.x branch, and all other versions before 5.7.2 are vulnerable to Regular Expression Denial of Service (ReDoS) via the function new Range, when untrusted user data is provided as a range.

Release Notes

6.3.1

6.3.1 (2023-07-10)

Bug Fixes

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by 3 commits:

↗️ stack-utils (indirect, 2.0.5 → 2.0.6) · Repo

Commits

See the full diff on Github. The new version differs by 11 commits:

↗️ v8-to-istanbul (indirect, 9.0.1 → 9.3.0) · Repo · Changelog

Release Notes

9.3.0

9.3.0 (2024-06-22)

Features

9.2.0

9.2.0 (2023-11-22)

Features

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by 26 commits:

↗️ write-file-atomic (indirect, 4.0.1 → 5.0.1) · Repo · Changelog

Release Notes

5.0.1

5.0.1 (2023-04-26)

Dependencies

5.0.0

5.0.0 (2022-10-10)

⚠️ BREAKING CHANGES

  • write-file-atomic is now compatible with the following semver range for node: ^14.17.0 || ^16.13.0 || >=18.0.0

Features

4.0.2

4.0.2 (2022-08-16)

Bug Fixes

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by 42 commits:

↗️ yargs (indirect, 17.5.1 → 17.7.2) · Repo · Changelog

Release Notes

17.7.2

17.7.2 (2023-04-27)

Bug Fixes

  • do not crash completion when having negated options (#2322) (7f42848)

17.7.1

17.7.1 (2023-02-21)

Bug Fixes

  • address display bug with default sub-commands (#2303) (9aa2490)

17.7.0

17.7.0 (2023-02-13)

Features

  • add method to hide option extras (#2156) (2c144c4)
  • convert line break to whitespace for the description of the option (#2271) (4cb41dc)

Bug Fixes

  • copy the description of the option to its alias in completion (#2269) (f37ee6f)

17.6.2

17.6.2 (2022-11-03)

Bug Fixes

  • deps: update dependency yargs-parser to v21.1.1 (#2231) (75b4d52)
  • lang: typo in Finnish unknown argument singular form (#2222) (a6dfd0a)

17.6.1

17.6.1 (2022-11-02)

Bug Fixes

  • lang: fix "Not enough non-option arguments" message for the Czech language (#2242) (3987b13)

17.6.0

17.6.0 (2022-10-01)

Features

Bug Fixes

  • deno: use 'globalThis' instead of 'window' (#2186) (#2215) (561fc7a)
  • deps: cliui with forced strip-ansi update (#2241) (38e8df1)
  • dont clobber description for multiple option calls (#2171) (f91d9b3)
  • typescript: address warning with objectKeys (394f5f8)

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by 29 commits:

🆕 @​babel/helper-globals (added, 7.28.0)

🆕 @​babel/helper-string-parser (added, 7.27.1)

🆕 @​babel/plugin-syntax-class-static-block (added, 7.14.5)

🆕 @​babel/plugin-syntax-import-attributes (added, 7.27.1)

🆕 @​babel/plugin-syntax-jsx (added, 7.27.1)

🆕 @​babel/plugin-syntax-private-property-in-object (added, 7.14.5)

🆕 @​emnapi/core (added, 1.5.0)

🆕 @​emnapi/runtime (added, 1.5.0)

🆕 @​emnapi/wasi-threads (added, 1.1.0)

🆕 @​isaacs/cliui (added, 8.0.2)

🆕 @​jest/diff-sequences (added, 30.0.1)

🆕 @​jest/get-type (added, 30.1.0)

🆕 @​jest/pattern (added, 30.0.1)

🆕 @​jest/snapshot-utils (added, 30.1.2)

🆕 @​napi-rs/wasm-runtime (added, 0.2.12)

🆕 @​pkgjs/parseargs (added, 0.11.0)

🆕 @​pkgr/core (added, 0.2.9)

🆕 @​tybys/wasm-util (added, 0.10.0)

🆕 @​ungap/structured-clone (added, 1.3.0)

🆕 @​unrs/resolver-binding-android-arm-eabi (added, 1.11.1)

🆕 @​unrs/resolver-binding-android-arm64 (added, 1.11.1)

🆕 @​unrs/resolver-binding-darwin-arm64 (added, 1.11.1)

🆕 @​unrs/resolver-binding-darwin-x64 (added, 1.11.1)

🆕 @​unrs/resolver-binding-freebsd-x64 (added, 1.11.1)

🆕 @​unrs/resolver-binding-linux-arm-gnueabihf (added, 1.11.1)

🆕 @​unrs/resolver-binding-linux-arm-musleabihf (added, 1.11.1)

🆕 @​unrs/resolver-binding-linux-arm64-gnu (added, 1.11.1)

🆕 @​unrs/resolver-binding-linux-arm64-musl (added, 1.11.1)

🆕 @​unrs/resolver-binding-linux-ppc64-gnu (added, 1.11.1)

🆕 @​unrs/resolver-binding-linux-riscv64-gnu (added, 1.11.1)

🆕 @​unrs/resolver-binding-linux-riscv64-musl (added, 1.11.1)

🆕 @​unrs/resolver-binding-linux-s390x-gnu (added, 1.11.1)

🆕 @​unrs/resolver-binding-linux-x64-gnu (added, 1.11.1)

🆕 @​unrs/resolver-binding-linux-x64-musl (added, 1.11.1)

🆕 @​unrs/resolver-binding-wasm32-wasi (added, 1.11.1)

🆕 @​unrs/resolver-binding-win32-arm64-msvc (added, 1.11.1)

🆕 @​unrs/resolver-binding-win32-ia32-msvc (added, 1.11.1)

🆕 @​unrs/resolver-binding-win32-x64-msvc (added, 1.11.1)

🆕 eastasianwidth (added, 0.2.0)

🆕 exit-x (added, 0.2.2)

🆕 foreground-child (added, 3.3.1)

🆕 jackspeak (added, 3.4.3)

🆕 napi-postinstall (added, 0.3.3)

🆕 package-json-from-dist (added, 1.0.1)

🆕 path-scurry (added, 1.11.1)

🆕 pure-rand (added, 7.0.1)

🆕 string-width-cjs (added, npm:string-width@4.2.3)

🆕 strip-ansi-cjs (added, npm:strip-ansi@6.0.1)

🆕 synckit (added, 0.11.11)

🆕 tslib (added, 2.8.1)

🆕 unrs-resolver (added, 1.11.1)

🆕 update-browserslist-db (added, 1.1.3)

🆕 wrap-ansi-cjs (added, npm:wrap-ansi@7.0.0)

🗑️ @​babel/helper-environment-visitor (removed)

🗑️ @​babel/helper-function-name (removed)

🗑️ @​babel/helper-hoist-variables (removed)

🗑️ @​babel/helper-simple-access (removed)

🗑️ @​babel/helper-split-export-declaration (removed)

🗑️ @​babel/highlight (removed)

🗑️ @​jridgewell/set-array (removed)

🗑️ @​types/graceful-fs (removed)

🗑️ @​types/prettier (removed)

🗑️ diff-sequences (removed)

🗑️ exit (removed)

🗑️ globals (removed)

🗑️ jest-get-type (removed)

🗑️ kleur (removed)

🗑️ prompts (removed)

🗑️ resolve.exports (removed)

🗑️ sisteransi (removed)

🗑️ to-fast-properties (removed)