🚨 [security] Update jest 28.1.3 → 30.1.2 (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.2) · Repo · Changelog
Release Notes
Too many releases to show here. View the full release notes.
↗️ @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:
v7.27.1Bumped picocolors to 1.1.1 (#17279)Rebuild Makefile.mjs (#17275)Allow `using of` as lexical declaration within for (#17254)fix invalid gulp watch usage (#17273)Update actions/checkout action to v4 (#17269)[babel 8] Remove unnecessary CJS ESM wrapper (#17261)Remove unused `regenerator-runtime` dep in `@babel/runtime` (#17263)[babel 8] Drop CJS support from `@babel/parser` (#17265)Update Yarn to 4.9.1 (#17266)Update fixture (#17264)Update fixturefix: do expressions should allow early exit (#17137)Include Babel 8 in coverage report (#17260)Ignore browser-only files in coverage reports (#17262)Update test262 (#17259)Fix: propagate argument evaluation errors through async promise chain (#17251)Tune plugin compat data (#17256)chore: bump compat-data sources (#17253)[Babel 8] perf: Improve traverse performance (#16965)Update error stack test (#17252)Update test262 (#17248)[Babel 8]: Remove record and tuple syntax support (#17242)Update `jest-light-runner` to v0.7.0 (#17245)Fix build script on Windows (#17244)fix `apply()`/`call()` annotated as pure (#17231)Reduce `interopRequireWildcard` size (#16538)Fill optional AST properties when both estree and typescript parser plugin are enabled (Part 3) (#17235)Create ChainExpression within TSInstantiationExpression (#17233)Stricter TSImportType options parsing (#17193)migrate babel-compat-data build script to mjs (#17236)Update test262 (#17234)Bump typescript-eslint to 8.29.1 (#17232)Disallow get/set in TSPropertySignature (#17230)Use `class` and add type definitions for `regenerator` (#17220)Fill optional AST properties when both estree and typescript parser plugin are enabled (Part 2) (#17226)Fill optional AST properties when both estree and typescript parser plugin are enabled (Part 1) (#17224)Update firefox bugfix compat data (#17228)Migrate `@babel/register` to cts (#16844)test: add basic typescript-eslint integration tests (#17219)Harden variable declarator validations (#17217)Reduce generated names size for the 10th-11th (#17221)fix: Objects and arrays with multiple references should not be evaluated (#17156)Reduce `regeneratorRuntime` size (#17213)build(deps): bump @babel/helpers from 7.24.4 to 7.27.0 (#17218)Enforce node protocol import (#17207)Use esm for makefile js (#17214)add require-esm babel-register test (#17206)Fix: support const type parameter in generator (#17216)Babel 8 cleanup (#17211)Run tests imported from regenerator (#17205)Use imported regenerator transform files (#17205)Re-convert regeneratorRuntime to helper format (#17205)Delete remaining original regenerator files (#17205)Move regenerator files to the relevant packages (#17205)Remove bundled regeneratorRuntime helper (#17205)Prepare LICENSE files for incorporating regenerator (#17205)Merge remote-tracking branch 'regenerator/main'Update test262 (#17208)Fix start of TSParameterProperty (#17080)[Babel 8] Bump nodejs requirements to `^20.19.0 || >= 22.12.0` (#17204)[babel 8] Deprecate uppercase builders (#17133)Add v7.27.0 to CHANGELOG.md [skip ci]
↗️ @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:
v7.28.0Update source maps packages (#17420)chore: Improve behavior when infinite loops occur in exec tests (#17406)fix: Invalid workflow file (#17418)Create babel-helper-globals (#17297)Downgrade source map packages in Node.js 6 CI (#17415)Support top level await in node repl (#17147)Update jridgewell's packages (#17414)Update test paths in cjs parser tests (#17413)feat(matchesPattern): support super/private/meta (#17258)Add explicit resource management to preset-env (#17355)Support `sourceType: "commonjs"` (#17390)Materialize `explicitResourceManagement` parser plugin (#17346)Add VoidPattern to FunctionParameter (#17405)LVal coverage updates (Part 2) (#17391)Accept bigints in `t.bigIntLiteral` factory (#17378)Transform discard binding (#17277)test: add invalid local use strict test (#17293)fix bundle-dts error in feat-discard-binding (#17280)Parse discard binding (#17163)fix: add operator argument for TSTypeOperator builder (#17009)Update `babel-polyfill` packages (#17403)typing: export ConfigAPI type (#17400)Update compat data (#17401)Add v7.27.7 to CHANGELOG.md [skip ci]
↗️ @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:
v7.28.3fix(parser/typescript): parse `import("./a", {with:{},})` (#17465)chore: fix various typos across codebase (#17476)chore: fix typos in release.yml (#17475)fix(parser): stop subscript parsing on async arrow (#17478)chore: update node flags (#17477)build(Babel 8): disable JSON module transform (#17468)[babel 8] Add `@types/jsesc` as a dep of `@babel/generator` (#17459)Update test262 (#17462)Misc: Cleanup Babel 8 tasks (#17429)export PartialConfig and NormalizedOptions (#17470)chore: update browser compat libs (#17469)Type-check `.d.ts` file with `strict: true` (#17461)Enable type checking for `scripts` and `babel-worker.cjs` (#17454)Type check gulp&jest config (#17453)[static blocks] Do not inject new static fields after static code (#17443)Do not save last yield in call in temp var (#17363)Optimize do expression output (#17444)Update test262 (#17449)move eslint-{parser,plugin} docs to the website (#17448)Add v7.28.2 to CHANGELOG.md [skip ci]
↗️ @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:
v7.28.3fix(parser/typescript): parse `import("./a", {with:{},})` (#17465)chore: fix various typos across codebase (#17476)chore: fix typos in release.yml (#17475)fix(parser): stop subscript parsing on async arrow (#17478)chore: update node flags (#17477)build(Babel 8): disable JSON module transform (#17468)[babel 8] Add `@types/jsesc` as a dep of `@babel/generator` (#17459)Update test262 (#17462)Misc: Cleanup Babel 8 tasks (#17429)export PartialConfig and NormalizedOptions (#17470)chore: update browser compat libs (#17469)Type-check `.d.ts` file with `strict: true` (#17461)Enable type checking for `scripts` and `babel-worker.cjs` (#17454)Type check gulp&jest config (#17453)[static blocks] Do not inject new static fields after static code (#17443)Do not save last yield in call in temp var (#17363)Optimize do expression output (#17444)Update test262 (#17449)move eslint-{parser,plugin} docs to the website (#17448)Add v7.28.2 to CHANGELOG.md [skip ci]
↗️ @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:
v7.27.2fix: `@babel/parser/bin/index.js` contains `node:` protocol require (#17289)fix: Private class method not found when ts and estree parser plugins are enabled (#17291)Fix: improve object rest handling in array pattern (#17281)Use `.d.ts` in import when importing a `.d.ts` file (#17288)[Babel 8] Directly export the JSON files from `@babel/compat-data` (#17267)Enable Node compile cache for `@babel/cli` (#17285)Update test262 (#17286)fix(babel-template): Properly handle empty string replacements (#17284)Add v7.27.1 to CHANGELOG.md [skip ci]
↗️ @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-parserbabel-parser,babel-types🐛 Bug Fix
babel-plugin-proposal-destructuring-private,babel-plugin-proposal-do-expressions,babel-traversebabel-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-generatorbabel-helper-fixtures,babel-parserbabel-generator,babel-parserbabel-parserbabel-compat-data,babel-preset-envbabel-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
- #17221 Reduce generated names size for the 10th-11th (@nicolo-ribaudo)
🏠 Internal
babel-runtime-corejs2,babel-runtime-corejs3,babel-runtime
- #17263 Remove unused
regenerator-runtimedep in@babel/runtime(@nicolo-ribaudo)babel-compat-data,babel-preset-envbabel-compat-data,babel-standalonebabel-register
- #16844 Migrate
@babel/registerto cts (@liuxingbaoyu)babel-helpers,babel-plugin-transform-async-generator-functions,babel-plugin-transform-regenerator,babel-preset-env,babel-runtime-corejs3
- #17205 Inline regenerator in the relevant packages (@nicolo-ribaudo)
- All packages
🔬 Output optimization
babel-helpers,babel-plugin-transform-modules-commonjs,babel-runtime-corejs3
- #16538 Reduce
interopRequireWildcardsize (@liuxingbaoyu)babel-helpers,babel-plugin-transform-async-generator-functions,babel-plugin-transform-regenerator,babel-preset-env,babel-runtime-corejs3
- #17213 Reduce
regeneratorRuntimesize (@liuxingbaoyu)Committers: 9
- Aryan Bharti (@woaitsAryan)
- Babel Bot (@babel-bot)
- Frolov Roman (@Lacsw)
- Huáng Jùnliàng (@JLHwung)
- Nicolò Ribaudo (@nicolo-ribaudo)
- @liuxingbaoyu
- @magic-akari
- _Kerman (@kermanx)
- fisker Cheung (@fisker)
7.25.9
v7.25.9 (2024-10-22)
Thanks @victorenator for your first PR!
🐛 Bug Fix
babel-parser,babel-template,babel-types
- #16905 fix: Keep type annotations in
syntacticPlaceholdersmode (@liuxingbaoyu)babel-helper-compilation-targets,babel-preset-env- Other
- #16884 Analyze
ClassAccessorPropertyto prevent theno-undefrule (@victorenator)🏠 Internal
babel-helper-transform-fixture-test-runner- Every package
- #16917 fix: Accidentally published
tsconfigfiles (@liuxingbaoyu)🏃♀️ Performance
babel-parser,babel-types
- #16918 perf: Make
VISITOR_KEYSetc. faster to access (@liuxingbaoyu)Committers: 4
- Babel Bot (@babel-bot)
- Huáng Jùnliàng (@JLHwung)
- Viktar Vaŭčkievič (@victorenator)
- @liuxingbaoyu
7.25.7
v7.25.7 (2024-10-02)
Thanks @DylanPiercey and @YuHyeonWook for your first PRs!
🐛 Bug Fix
babel-helper-validator-identifierbabel-traverse
- #16814 fix: issue with node path keys updated on unrelated paths (@DylanPiercey)
babel-plugin-transform-classes
- #16797 Use an inclusion rather than exclusion list for
super()check (@nicolo-ribaudo)babel-generator
- #16788 Fix printing of TS
inferin compact mode (@nicolo-ribaudo)- #16785 Print TS type annotations for destructuring in assignment pattern (@nicolo-ribaudo)
- #16778 Respect
[no LineTerminator here]after nodes (@nicolo-ribaudo)💅 Polish
babel-types
- #16852 Add deprecated JSDOC for fields (@liuxingbaoyu)
🏠 Internal
babel-core
- #16820 Allow sync loading of ESM when
--experimental-require-module(@nicolo-ribaudo)babel-helper-compilation-targets,babel-helper-plugin-utils,babel-preset-envbabel-plugin-proposal-destructuring-private,babel-plugin-syntax-decimal,babel-plugin-syntax-import-reflection,babel-standalone
- #16809 Archive syntax-import-reflection and syntax-decimal (@nicolo-ribaudo)
babel-generator
- #16779 Simplify logic for
[no LineTerminator here]before nodes (@nicolo-ribaudo)🏃♀️ Performance
babel-plugin-transform-typescript
- #16875 perf: Avoid extra cloning of namespaces (@liuxingbaoyu)
babel-types
- #16842 perf: Improve @babel/types builders (@liuxingbaoyu)
- #16828 Only access
BABEL_TYPES_8_BREAKINGat startup (@nicolo-ribaudo)Committers: 8
- Babel Bot (@babel-bot)
- Dylan Piercey (@DylanPiercey)
- Huáng Jùnliàng (@JLHwung)
- Nicolò Ribaudo (@nicolo-ribaudo)
- @liuxingbaoyu
- coderaiser (@coderaiser)
- fisker Cheung (@fisker)
- hwook (@YuHyeonWook)
7.24.7
v7.24.7 (2024-06-05)
🐛 Bug Fix
babel-node
- #16554 Allow extra flags in babel-node (@nicolo-ribaudo)
babel-traverse
- #16522 fix: incorrect
constantViolationswith destructuring (@liuxingbaoyu)babel-helper-transform-fixture-test-runner,babel-plugin-proposal-explicit-resource-management
- #16524 fix: Transform
usinginswitchcorrectly (@liuxingbaoyu)🏠 Internal
babel-helpers,babel-runtime-corejs2,babel-runtime-corejs3,babel-runtime
- #16525 Delete unused array helpers (@blakewilson)
Committers: 7
- Amjad Yahia Robeen Hassan (@amjed-98)
- Babel Bot (@babel-bot)
- Blake Wilson (@blakewilson)
- Huáng Jùnliàng (@JLHwung)
- Nicolò Ribaudo (@nicolo-ribaudo)
- Sukka (@SukkaW)
- @liuxingbaoyu
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
- #16514 Fix source maps for private member expressions (@nicolo-ribaudo)
babel-core,babel-generator,babel-plugin-transform-modules-commonjs
- #16515 Fix source maps for template literals (@nicolo-ribaudo)
babel-helper-create-class-features-plugin,babel-plugin-proposal-decoratorsbabel-helpers,babel-plugin-proposal-decorators,babel-runtime-corejs3babel-parser,babel-plugin-transform-typescript
- #16476 fix: Correctly parse
cls.fn<C> = x(@liuxingbaoyu)🏠 Internal
babel-core,babel-helpers,babel-plugin-transform-runtime,babel-preset-env,babel-runtime-corejs2,babel-runtime-corejs3,babel-runtime
- #16501 Generate helper metadata at build time (@nicolo-ribaudo)
babel-helpers
- #16499 Add
tsconfig.jsonfor@babel/helpers/src/helpers(@nicolo-ribaudo)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
- #16495 Move all runtime helpers to individual files (@nicolo-ribaudo)
babel-parser,babel-traverse
- #16482 Statically generate boilerplate for bitfield accessors (@nicolo-ribaudo)
- Other
Committers: 9
- Amjad Yahia Robeen Hassan (@amjed-98)
- Babel Bot (@babel-bot)
- Blake Wilson (@blakewilson)
- Huáng Jùnliàng (@JLHwung)
- Lucas Coelho (@coelhucas)
- Nicolò Ribaudo (@nicolo-ribaudo)
- Sukka (@SukkaW)
- Zzzen (@Zzzen)
- @liuxingbaoyu
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
- Nicolò Ribaudo (@nicolo-ribaudo)
- Yosuke Ota (@ota-meshi)
7.24.1
v7.24.1 (2024-03-19)
🐛 Bug Fix
babel-helper-create-class-features-plugin,babel-plugin-proposal-decoratorsbabel-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
- #16329 Respect
moduleNamefor@babel/runtime/regeneratorimports (@nicolo-ribaudo)babel-helper-create-class-features-plugin,babel-plugin-proposal-decorators,babel-plugin-proposal-pipeline-operator,babel-plugin-transform-class-propertiesbabel-helper-create-class-features-plugin,babel-helper-replace-supers,babel-plugin-proposal-decorators,babel-plugin-transform-class-properties📝 Documentation
- #16319 Update SECURITY.md (@nicolo-ribaudo)
🏠 Internal
babel-code-frame,babel-highlight
- #16359 Replace
chalkwithpicocolors(@nicolo-ribaudo)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-flowbabel-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
- #16349 Support merging imports in import injector (@nicolo-ribaudo)
- Other
- #16332 Test Babel 7 plugins compatibility with Babel 8 core (@nicolo-ribaudo)
🔬 Output optimization
babel-helper-replace-supers,babel-plugin-transform-class-properties,babel-plugin-transform-classes,babel-plugin-transform-parameters,babel-plugin-transform-runtime
- #16345 Optimize the use of
assertThisInitializedaftersuper()(@liuxingbaoyu)babel-plugin-transform-class-properties,babel-plugin-transform-classes
- #16343 Use simpler
assertThisInitializedmore often (@liuxingbaoyu)babel-plugin-proposal-decorators,babel-plugin-transform-class-properties,babel-plugin-transform-object-rest-spread,babel-traverse
- #16342 Consider well-known and registered symbols as literals (@nicolo-ribaudo)
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
- #16326 Reduce the use of class names (@liuxingbaoyu)
Committers: 4
- Babel Bot (@babel-bot)
- Huáng Jùnliàng (@JLHwung)
- Nicolò Ribaudo (@nicolo-ribaudo)
- @liuxingbaoyu
7.22.15
v7.22.15 (2023-09-04)
🐛 Bug Fix
babel-core
- #15923 Only perform config loading re-entrancy check for cjs (@nicolo-ribaudo)
🏠 Internal
- Every package
- #15892 Add explicit
.ts/.jsextension to all imports insrc(@nicolo-ribaudo)Committers: 4
- Babel Bot (@babel-bot)
- Huáng Jùnliàng (@JLHwung)
- Nicolò Ribaudo (@nicolo-ribaudo)
- @liuxingbaoyu
7.22.5
v7.22.5 (2023-06-08)
🐛 Bug Fix
babel-preset-env,babel-standalone
- #15675 Fix using
syntax-unicode-sets-regexin standalone (@nicolo-ribaudo)
💅 Polish
babel-core
- #15683 Suggest
-transform-when resolving missing plugins (@nicolo-ribaudo)Committers: 4
- Avery (@nullableVoidPtr)
- Babel Bot (@babel-bot)
- Nicolò Ribaudo (@nicolo-ribaudo)
- @liuxingbaoyu
7.21.4
v7.21.4 (2023-03-31)
🐛 Bug Fix
babel-core,babel-helper-module-imports,babel-preset-typescript
- #15478 Fix support for
import/exportin.ctsfiles (@liuxingbaoyu)babel-generator
💅 Polish
babel-helper-create-class-features-plugin,babel-plugin-proposal-class-properties,babel-plugin-transform-typescript,babel-traverse
- #15427 Fix moving comments of removed nodes (@nicolo-ribaudo)
🏠 Internal
- Other
babel-parserbabel-code-frame,babel-highlightCommitters: 6
- Babel Bot (@babel-bot)
- Huáng Jùnliàng (@JLHwung)
- Nicolò Ribaudo (@nicolo-ribaudo)
- Ryan Tsao (@rtsao)
- @liuxingbaoyu
- fisker Cheung (@fisker)
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 63 commits:
v7.27.1Bumped picocolors to 1.1.1 (#17279)Rebuild Makefile.mjs (#17275)Allow `using of` as lexical declaration within for (#17254)fix invalid gulp watch usage (#17273)Update actions/checkout action to v4 (#17269)[babel 8] Remove unnecessary CJS ESM wrapper (#17261)Remove unused `regenerator-runtime` dep in `@babel/runtime` (#17263)[babel 8] Drop CJS support from `@babel/parser` (#17265)Update Yarn to 4.9.1 (#17266)Update fixture (#17264)Update fixturefix: do expressions should allow early exit (#17137)Include Babel 8 in coverage report (#17260)Ignore browser-only files in coverage reports (#17262)Update test262 (#17259)Fix: propagate argument evaluation errors through async promise chain (#17251)Tune plugin compat data (#17256)chore: bump compat-data sources (#17253)[Babel 8] perf: Improve traverse performance (#16965)Update error stack test (#17252)Update test262 (#17248)[Babel 8]: Remove record and tuple syntax support (#17242)Update `jest-light-runner` to v0.7.0 (#17245)Fix build script on Windows (#17244)fix `apply()`/`call()` annotated as pure (#17231)Reduce `interopRequireWildcard` size (#16538)Fill optional AST properties when both estree and typescript parser plugin are enabled (Part 3) (#17235)Create ChainExpression within TSInstantiationExpression (#17233)Stricter TSImportType options parsing (#17193)migrate babel-compat-data build script to mjs (#17236)Update test262 (#17234)Bump typescript-eslint to 8.29.1 (#17232)Disallow get/set in TSPropertySignature (#17230)Use `class` and add type definitions for `regenerator` (#17220)Fill optional AST properties when both estree and typescript parser plugin are enabled (Part 2) (#17226)Fill optional AST properties when both estree and typescript parser plugin are enabled (Part 1) (#17224)Update firefox bugfix compat data (#17228)Migrate `@babel/register` to cts (#16844)test: add basic typescript-eslint integration tests (#17219)Harden variable declarator validations (#17217)Reduce generated names size for the 10th-11th (#17221)fix: Objects and arrays with multiple references should not be evaluated (#17156)Reduce `regeneratorRuntime` size (#17213)build(deps): bump @babel/helpers from 7.24.4 to 7.27.0 (#17218)Enforce node protocol import (#17207)Use esm for makefile js (#17214)add require-esm babel-register test (#17206)Fix: support const type parameter in generator (#17216)Babel 8 cleanup (#17211)Run tests imported from regenerator (#17205)Use imported regenerator transform files (#17205)Re-convert regeneratorRuntime to helper format (#17205)Delete remaining original regenerator files (#17205)Move regenerator files to the relevant packages (#17205)Remove bundled regeneratorRuntime helper (#17205)Prepare LICENSE files for incorporating regenerator (#17205)Merge remote-tracking branch 'regenerator/main'Update test262 (#17208)Fix start of TSParameterProperty (#17080)[Babel 8] Bump nodejs requirements to `^20.19.0 || >= 22.12.0` (#17204)[babel 8] Deprecate uppercase builders (#17133)Add v7.27.0 to CHANGELOG.md [skip ci]
↗️ @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:
v7.28.3fix(parser/typescript): parse `import("./a", {with:{},})` (#17465)chore: fix various typos across codebase (#17476)chore: fix typos in release.yml (#17475)fix(parser): stop subscript parsing on async arrow (#17478)chore: update node flags (#17477)build(Babel 8): disable JSON module transform (#17468)[babel 8] Add `@types/jsesc` as a dep of `@babel/generator` (#17459)Update test262 (#17462)Misc: Cleanup Babel 8 tasks (#17429)export PartialConfig and NormalizedOptions (#17470)chore: update browser compat libs (#17469)Type-check `.d.ts` file with `strict: true` (#17461)Enable type checking for `scripts` and `babel-worker.cjs` (#17454)Type check gulp&jest config (#17453)[static blocks] Do not inject new static fields after static code (#17443)Do not save last yield in call in temp var (#17363)Optimize do expression output (#17444)Update test262 (#17449)move eslint-{parser,plugin} docs to the website (#17448)Add v7.28.2 to CHANGELOG.md [skip ci]
↗️ @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:
v7.27.1Bumped picocolors to 1.1.1 (#17279)Rebuild Makefile.mjs (#17275)Allow `using of` as lexical declaration within for (#17254)fix invalid gulp watch usage (#17273)Update actions/checkout action to v4 (#17269)[babel 8] Remove unnecessary CJS ESM wrapper (#17261)Remove unused `regenerator-runtime` dep in `@babel/runtime` (#17263)[babel 8] Drop CJS support from `@babel/parser` (#17265)Update Yarn to 4.9.1 (#17266)Update fixture (#17264)Update fixturefix: do expressions should allow early exit (#17137)Include Babel 8 in coverage report (#17260)Ignore browser-only files in coverage reports (#17262)Update test262 (#17259)Fix: propagate argument evaluation errors through async promise chain (#17251)Tune plugin compat data (#17256)chore: bump compat-data sources (#17253)[Babel 8] perf: Improve traverse performance (#16965)Update error stack test (#17252)Update test262 (#17248)[Babel 8]: Remove record and tuple syntax support (#17242)Update `jest-light-runner` to v0.7.0 (#17245)Fix build script on Windows (#17244)fix `apply()`/`call()` annotated as pure (#17231)Reduce `interopRequireWildcard` size (#16538)Fill optional AST properties when both estree and typescript parser plugin are enabled (Part 3) (#17235)Create ChainExpression within TSInstantiationExpression (#17233)Stricter TSImportType options parsing (#17193)migrate babel-compat-data build script to mjs (#17236)Update test262 (#17234)Bump typescript-eslint to 8.29.1 (#17232)Disallow get/set in TSPropertySignature (#17230)Use `class` and add type definitions for `regenerator` (#17220)Fill optional AST properties when both estree and typescript parser plugin are enabled (Part 2) (#17226)Fill optional AST properties when both estree and typescript parser plugin are enabled (Part 1) (#17224)Update firefox bugfix compat data (#17228)Migrate `@babel/register` to cts (#16844)test: add basic typescript-eslint integration tests (#17219)Harden variable declarator validations (#17217)Reduce generated names size for the 10th-11th (#17221)fix: Objects and arrays with multiple references should not be evaluated (#17156)Reduce `regeneratorRuntime` size (#17213)build(deps): bump @babel/helpers from 7.24.4 to 7.27.0 (#17218)Enforce node protocol import (#17207)Use esm for makefile js (#17214)add require-esm babel-register test (#17206)Fix: support const type parameter in generator (#17216)Babel 8 cleanup (#17211)Run tests imported from regenerator (#17205)Use imported regenerator transform files (#17205)Re-convert regeneratorRuntime to helper format (#17205)Delete remaining original regenerator files (#17205)Move regenerator files to the relevant packages (#17205)Remove bundled regeneratorRuntime helper (#17205)Prepare LICENSE files for incorporating regenerator (#17205)Merge remote-tracking branch 'regenerator/main'Update test262 (#17208)Fix start of TSParameterProperty (#17080)[Babel 8] Bump nodejs requirements to `^20.19.0 || >= 22.12.0` (#17204)[babel 8] Deprecate uppercase builders (#17133)Add v7.27.0 to CHANGELOG.md [skip ci]
↗️ @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-parserbabel-parser,babel-types🐛 Bug Fix
babel-plugin-proposal-destructuring-private,babel-plugin-proposal-do-expressions,babel-traversebabel-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-generatorbabel-helper-fixtures,babel-parserbabel-generator,babel-parserbabel-parserbabel-compat-data,babel-preset-envbabel-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
- #17221 Reduce generated names size for the 10th-11th (@nicolo-ribaudo)
🏠 Internal
babel-runtime-corejs2,babel-runtime-corejs3,babel-runtime
- #17263 Remove unused
regenerator-runtimedep in@babel/runtime(@nicolo-ribaudo)babel-compat-data,babel-preset-envbabel-compat-data,babel-standalonebabel-register
- #16844 Migrate
@babel/registerto cts (@liuxingbaoyu)babel-helpers,babel-plugin-transform-async-generator-functions,babel-plugin-transform-regenerator,babel-preset-env,babel-runtime-corejs3
- #17205 Inline regenerator in the relevant packages (@nicolo-ribaudo)
- All packages
🔬 Output optimization
babel-helpers,babel-plugin-transform-modules-commonjs,babel-runtime-corejs3
- #16538 Reduce
interopRequireWildcardsize (@liuxingbaoyu)babel-helpers,babel-plugin-transform-async-generator-functions,babel-plugin-transform-regenerator,babel-preset-env,babel-runtime-corejs3
- #17213 Reduce
regeneratorRuntimesize (@liuxingbaoyu)Committers: 9
- Aryan Bharti (@woaitsAryan)
- Babel Bot (@babel-bot)
- Frolov Roman (@Lacsw)
- Huáng Jùnliàng (@JLHwung)
- Nicolò Ribaudo (@nicolo-ribaudo)
- @liuxingbaoyu
- @magic-akari
- _Kerman (@kermanx)
- fisker Cheung (@fisker)
7.25.9
v7.25.9 (2024-10-22)
Thanks @victorenator for your first PR!
🐛 Bug Fix
babel-parser,babel-template,babel-types
- #16905 fix: Keep type annotations in
syntacticPlaceholdersmode (@liuxingbaoyu)babel-helper-compilation-targets,babel-preset-env- Other
- #16884 Analyze
ClassAccessorPropertyto prevent theno-undefrule (@victorenator)🏠 Internal
babel-helper-transform-fixture-test-runner- Every package
- #16917 fix: Accidentally published
tsconfigfiles (@liuxingbaoyu)🏃♀️ Performance
babel-parser,babel-types
- #16918 perf: Make
VISITOR_KEYSetc. faster to access (@liuxingbaoyu)Committers: 4
- Babel Bot (@babel-bot)
- Huáng Jùnliàng (@JLHwung)
- Viktar Vaŭčkievič (@victorenator)
- @liuxingbaoyu
7.25.7
v7.25.7 (2024-10-02)
Thanks @DylanPiercey and @YuHyeonWook for your first PRs!
🐛 Bug Fix
babel-helper-validator-identifierbabel-traverse
- #16814 fix: issue with node path keys updated on unrelated paths (@DylanPiercey)
babel-plugin-transform-classes
- #16797 Use an inclusion rather than exclusion list for
super()check (@nicolo-ribaudo)babel-generator
- #16788 Fix printing of TS
inferin compact mode (@nicolo-ribaudo)- #16785 Print TS type annotations for destructuring in assignment pattern (@nicolo-ribaudo)
- #16778 Respect
[no LineTerminator here]after nodes (@nicolo-ribaudo)💅 Polish
babel-types
- #16852 Add deprecated JSDOC for fields (@liuxingbaoyu)
🏠 Internal
babel-core
- #16820 Allow sync loading of ESM when
--experimental-require-module(@nicolo-ribaudo)babel-helper-compilation-targets,babel-helper-plugin-utils,babel-preset-envbabel-plugin-proposal-destructuring-private,babel-plugin-syntax-decimal,babel-plugin-syntax-import-reflection,babel-standalone
- #16809 Archive syntax-import-reflection and syntax-decimal (@nicolo-ribaudo)
babel-generator
- #16779 Simplify logic for
[no LineTerminator here]before nodes (@nicolo-ribaudo)🏃♀️ Performance
babel-plugin-transform-typescript
- #16875 perf: Avoid extra cloning of namespaces (@liuxingbaoyu)
babel-types
- #16842 perf: Improve @babel/types builders (@liuxingbaoyu)
- #16828 Only access
BABEL_TYPES_8_BREAKINGat startup (@nicolo-ribaudo)Committers: 8
- Babel Bot (@babel-bot)
- Dylan Piercey (@DylanPiercey)
- Huáng Jùnliàng (@JLHwung)
- Nicolò Ribaudo (@nicolo-ribaudo)
- @liuxingbaoyu
- coderaiser (@coderaiser)
- fisker Cheung (@fisker)
- hwook (@YuHyeonWook)
7.24.7
v7.24.7 (2024-06-05)
🐛 Bug Fix
babel-node
- #16554 Allow extra flags in babel-node (@nicolo-ribaudo)
babel-traverse
- #16522 fix: incorrect
constantViolationswith destructuring (@liuxingbaoyu)babel-helper-transform-fixture-test-runner,babel-plugin-proposal-explicit-resource-management
- #16524 fix: Transform
usinginswitchcorrectly (@liuxingbaoyu)🏠 Internal
babel-helpers,babel-runtime-corejs2,babel-runtime-corejs3,babel-runtime
- #16525 Delete unused array helpers (@blakewilson)
Committers: 7
- Amjad Yahia Robeen Hassan (@amjed-98)
- Babel Bot (@babel-bot)
- Blake Wilson (@blakewilson)
- Huáng Jùnliàng (@JLHwung)
- Nicolò Ribaudo (@nicolo-ribaudo)
- Sukka (@SukkaW)
- @liuxingbaoyu
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
- #16514 Fix source maps for private member expressions (@nicolo-ribaudo)
babel-core,babel-generator,babel-plugin-transform-modules-commonjs
- #16515 Fix source maps for template literals (@nicolo-ribaudo)
babel-helper-create-class-features-plugin,babel-plugin-proposal-decoratorsbabel-helpers,babel-plugin-proposal-decorators,babel-runtime-corejs3babel-parser,babel-plugin-transform-typescript
- #16476 fix: Correctly parse
cls.fn<C> = x(@liuxingbaoyu)🏠 Internal
babel-core,babel-helpers,babel-plugin-transform-runtime,babel-preset-env,babel-runtime-corejs2,babel-runtime-corejs3,babel-runtime
- #16501 Generate helper metadata at build time (@nicolo-ribaudo)
babel-helpers
- #16499 Add
tsconfig.jsonfor@babel/helpers/src/helpers(@nicolo-ribaudo)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
- #16495 Move all runtime helpers to individual files (@nicolo-ribaudo)
babel-parser,babel-traverse
- #16482 Statically generate boilerplate for bitfield accessors (@nicolo-ribaudo)
- Other
Committers: 9
- Amjad Yahia Robeen Hassan (@amjed-98)
- Babel Bot (@babel-bot)
- Blake Wilson (@blakewilson)
- Huáng Jùnliàng (@JLHwung)
- Lucas Coelho (@coelhucas)
- Nicolò Ribaudo (@nicolo-ribaudo)
- Sukka (@SukkaW)
- Zzzen (@Zzzen)
- @liuxingbaoyu
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
- #16377 fix: TypeScript annotation affects output (@liuxingbaoyu)
babel-helpers,babel-plugin-proposal-explicit-resource-management,babel-runtime-corejs3💅 Polish
🏠 Internal
- Other
- #16414 Relax ESLint peerDependency constraint to allow v9 (@liuxingbaoyu)
babel-parser
- #16425 Improve
@babel/parserAST types (@nicolo-ribaudo)- #16417 Always pass type argument to
.startNode(@nicolo-ribaudo)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
- #16439 Make
NodePath<T | U>distributive (@nicolo-ribaudo)babel-plugin-proposal-partial-application,babel-types
- #16421 Remove
JSXNamespacedNamefrom validCallExpressionargs (@nicolo-ribaudo)babel-plugin-transform-class-properties,babel-preset-env
- #16406 Do not load unnecessary Babel 7 syntax plugins in Babel 8 (@nicolo-ribaudo)
🏃♀️ Performance
babel-helpers,babel-preset-env,babel-runtime-corejs3Committers: 6
- Babel Bot (@babel-bot)
- Huáng Jùnliàng (@JLHwung)
- Nicolò Ribaudo (@nicolo-ribaudo)
- Rom Grk (@romgrk)
- @liuxingbaoyu
- ynnsuis (@sossost)
7.22.20
v7.22.20 (2023-09-16)
🏠 Internal
babel-helper-validator-identifier
- #15973 Remove special-casing of U+200C and U+200D (@nicolo-ribaudo)
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-envCommitters: 3
- Huáng Jùnliàng (@JLHwung)
- Jan Jones (@jjonescz)
- Nicolò Ribaudo (@nicolo-ribaudo)
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
babel-core
- #15923 Only perform config loading re-entrancy check for cjs (@nicolo-ribaudo)
🏠 Internal
- Every package
- #15892 Add explicit
.ts/.jsextension to all imports insrc(@nicolo-ribaudo)Committers: 4
- Babel Bot (@babel-bot)
- Huáng Jùnliàng (@JLHwung)
- Nicolò Ribaudo (@nicolo-ribaudo)
- @liuxingbaoyu
7.22.5
v7.22.5 (2023-06-08)
🐛 Bug Fix
babel-preset-env,babel-standalone
- #15675 Fix using
syntax-unicode-sets-regexin standalone (@nicolo-ribaudo)
💅 Polish
babel-core
- #15683 Suggest
-transform-when resolving missing plugins (@nicolo-ribaudo)Committers: 4
- Avery (@nullableVoidPtr)
- Babel Bot (@babel-bot)
- Nicolò Ribaudo (@nicolo-ribaudo)
- @liuxingbaoyu
7.19.1
v7.19.1 (2022-09-14)
Thanks @hegemonic for your first PR!
🐛 Bug Fix
babel-core
- #14930 Avoid fancy stack traces size computation (@nicolo-ribaudo)
babel-traverse- Other
babel-parser
- #14920 [estree] attach comments after directives at the end of file (@hegemonic)
- #14900 [ts] allow redeclaring a var/type with the same name as import (@liuxingbaoyu)
babel-plugin-transform-typescriptCommitters: 5
- Babel Bot (@babel-bot)
- Huáng Jùnliàng (@JLHwung)
- Jeff Williams (@hegemonic)
- Nicolò Ribaudo (@nicolo-ribaudo)
- @liuxingbaoyu
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 63 commits:
v7.27.1Bumped picocolors to 1.1.1 (#17279)Rebuild Makefile.mjs (#17275)Allow `using of` as lexical declaration within for (#17254)fix invalid gulp watch usage (#17273)Update actions/checkout action to v4 (#17269)[babel 8] Remove unnecessary CJS ESM wrapper (#17261)Remove unused `regenerator-runtime` dep in `@babel/runtime` (#17263)[babel 8] Drop CJS support from `@babel/parser` (#17265)Update Yarn to 4.9.1 (#17266)Update fixture (#17264)Update fixturefix: do expressions should allow early exit (#17137)Include Babel 8 in coverage report (#17260)Ignore browser-only files in coverage reports (#17262)Update test262 (#17259)Fix: propagate argument evaluation errors through async promise chain (#17251)Tune plugin compat data (#17256)chore: bump compat-data sources (#17253)[Babel 8] perf: Improve traverse performance (#16965)Update error stack test (#17252)Update test262 (#17248)[Babel 8]: Remove record and tuple syntax support (#17242)Update `jest-light-runner` to v0.7.0 (#17245)Fix build script on Windows (#17244)fix `apply()`/`call()` annotated as pure (#17231)Reduce `interopRequireWildcard` size (#16538)Fill optional AST properties when both estree and typescript parser plugin are enabled (Part 3) (#17235)Create ChainExpression within TSInstantiationExpression (#17233)Stricter TSImportType options parsing (#17193)migrate babel-compat-data build script to mjs (#17236)Update test262 (#17234)Bump typescript-eslint to 8.29.1 (#17232)Disallow get/set in TSPropertySignature (#17230)Use `class` and add type definitions for `regenerator` (#17220)Fill optional AST properties when both estree and typescript parser plugin are enabled (Part 2) (#17226)Fill optional AST properties when both estree and typescript parser plugin are enabled (Part 1) (#17224)Update firefox bugfix compat data (#17228)Migrate `@babel/register` to cts (#16844)test: add basic typescript-eslint integration tests (#17219)Harden variable declarator validations (#17217)Reduce generated names size for the 10th-11th (#17221)fix: Objects and arrays with multiple references should not be evaluated (#17156)Reduce `regeneratorRuntime` size (#17213)build(deps): bump @babel/helpers from 7.24.4 to 7.27.0 (#17218)Enforce node protocol import (#17207)Use esm for makefile js (#17214)add require-esm babel-register test (#17206)Fix: support const type parameter in generator (#17216)Babel 8 cleanup (#17211)Run tests imported from regenerator (#17205)Use imported regenerator transform files (#17205)Re-convert regeneratorRuntime to helper format (#17205)Delete remaining original regenerator files (#17205)Move regenerator files to the relevant packages (#17205)Remove bundled regeneratorRuntime helper (#17205)Prepare LICENSE files for incorporating regenerator (#17205)Merge remote-tracking branch 'regenerator/main'Update test262 (#17208)Fix start of TSParameterProperty (#17080)[Babel 8] Bump nodejs requirements to `^20.19.0 || >= 22.12.0` (#17204)[babel 8] Deprecate uppercase builders (#17133)Add v7.27.0 to CHANGELOG.md [skip ci]
↗️ @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
.replacemethod 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
.replacemethod on a regular expression that contains named capturing groups- Your code uses untrusted strings as the second argument of
.replaceIf you are using
@babel/preset-envwith thetargetsoption, 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-envis using by enabling thedebugoption.Patches
This problem has been fixed in
@babel/helpersand@babel/runtime7.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/core7.26.10 is not required, but it guarantees that you are on a new enough@babel/helpersversion.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
.replaceon 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:
v7.28.3fix(parser/typescript): parse `import("./a", {with:{},})` (#17465)chore: fix various typos across codebase (#17476)chore: fix typos in release.yml (#17475)fix(parser): stop subscript parsing on async arrow (#17478)chore: update node flags (#17477)build(Babel 8): disable JSON module transform (#17468)[babel 8] Add `@types/jsesc` as a dep of `@babel/generator` (#17459)Update test262 (#17462)Misc: Cleanup Babel 8 tasks (#17429)export PartialConfig and NormalizedOptions (#17470)chore: update browser compat libs (#17469)Type-check `.d.ts` file with `strict: true` (#17461)Enable type checking for `scripts` and `babel-worker.cjs` (#17454)Type check gulp&jest config (#17453)[static blocks] Do not inject new static fields after static code (#17443)Do not save last yield in call in temp var (#17363)Optimize do expression output (#17444)Update test262 (#17449)move eslint-{parser,plugin} docs to the website (#17448)Add v7.28.2 to CHANGELOG.md [skip ci]
↗️ @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:
v7.28.3fix(parser/typescript): parse `import("./a", {with:{},})` (#17465)chore: fix various typos across codebase (#17476)chore: fix typos in release.yml (#17475)fix(parser): stop subscript parsing on async arrow (#17478)chore: update node flags (#17477)build(Babel 8): disable JSON module transform (#17468)[babel 8] Add `@types/jsesc` as a dep of `@babel/generator` (#17459)Update test262 (#17462)Misc: Cleanup Babel 8 tasks (#17429)export PartialConfig and NormalizedOptions (#17470)chore: update browser compat libs (#17469)Type-check `.d.ts` file with `strict: true` (#17461)Enable type checking for `scripts` and `babel-worker.cjs` (#17454)Type check gulp&jest config (#17453)[static blocks] Do not inject new static fields after static code (#17443)Do not save last yield in call in temp var (#17363)Optimize do expression output (#17444)Update test262 (#17449)move eslint-{parser,plugin} docs to the website (#17448)Add v7.28.2 to CHANGELOG.md [skip ci]
↗️ @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-parserbabel-parser,babel-types🐛 Bug Fix
babel-plugin-proposal-destructuring-private,babel-plugin-proposal-do-expressions,babel-traversebabel-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-generatorbabel-helper-fixtures,babel-parserbabel-generator,babel-parserbabel-parserbabel-compat-data,babel-preset-envbabel-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
- #17221 Reduce generated names size for the 10th-11th (@nicolo-ribaudo)
🏠 Internal
babel-runtime-corejs2,babel-runtime-corejs3,babel-runtime
- #17263 Remove unused
regenerator-runtimedep in@babel/runtime(@nicolo-ribaudo)babel-compat-data,babel-preset-envbabel-compat-data,babel-standalonebabel-register
- #16844 Migrate
@babel/registerto cts (@liuxingbaoyu)babel-helpers,babel-plugin-transform-async-generator-functions,babel-plugin-transform-regenerator,babel-preset-env,babel-runtime-corejs3
- #17205 Inline regenerator in the relevant packages (@nicolo-ribaudo)
- All packages
🔬 Output optimization
babel-helpers,babel-plugin-transform-modules-commonjs,babel-runtime-corejs3
- #16538 Reduce
interopRequireWildcardsize (@liuxingbaoyu)babel-helpers,babel-plugin-transform-async-generator-functions,babel-plugin-transform-regenerator,babel-preset-env,babel-runtime-corejs3
- #17213 Reduce
regeneratorRuntimesize (@liuxingbaoyu)Committers: 9
- Aryan Bharti (@woaitsAryan)
- Babel Bot (@babel-bot)
- Frolov Roman (@Lacsw)
- Huáng Jùnliàng (@JLHwung)
- Nicolò Ribaudo (@nicolo-ribaudo)
- @liuxingbaoyu
- @magic-akari
- _Kerman (@kermanx)
- fisker Cheung (@fisker)
7.25.9
v7.25.9 (2024-10-22)
Thanks @victorenator for your first PR!
🐛 Bug Fix
babel-parser,babel-template,babel-types
- #16905 fix: Keep type annotations in
syntacticPlaceholdersmode (@liuxingbaoyu)babel-helper-compilation-targets,babel-preset-env- Other
- #16884 Analyze
ClassAccessorPropertyto prevent theno-undefrule (@victorenator)🏠 Internal
babel-helper-transform-fixture-test-runner- Every package
- #16917 fix: Accidentally published
tsconfigfiles (@liuxingbaoyu)🏃♀️ Performance
babel-parser,babel-types
- #16918 perf: Make
VISITOR_KEYSetc. faster to access (@liuxingbaoyu)Committers: 4
- Babel Bot (@babel-bot)
- Huáng Jùnliàng (@JLHwung)
- Viktar Vaŭčkievič (@victorenator)
- @liuxingbaoyu
7.25.7
v7.25.7 (2024-10-02)
Thanks @DylanPiercey and @YuHyeonWook for your first PRs!
🐛 Bug Fix
babel-helper-validator-identifierbabel-traverse
- #16814 fix: issue with node path keys updated on unrelated paths (@DylanPiercey)
babel-plugin-transform-classes
- #16797 Use an inclusion rather than exclusion list for
super()check (@nicolo-ribaudo)babel-generator
- #16788 Fix printing of TS
inferin compact mode (@nicolo-ribaudo)- #16785 Print TS type annotations for destructuring in assignment pattern (@nicolo-ribaudo)
- #16778 Respect
[no LineTerminator here]after nodes (@nicolo-ribaudo)💅 Polish
babel-types
- #16852 Add deprecated JSDOC for fields (@liuxingbaoyu)
🏠 Internal
babel-core
- #16820 Allow sync loading of ESM when
--experimental-require-module(@nicolo-ribaudo)babel-helper-compilation-targets,babel-helper-plugin-utils,babel-preset-envbabel-plugin-proposal-destructuring-private,babel-plugin-syntax-decimal,babel-plugin-syntax-import-reflection,babel-standalone
- #16809 Archive syntax-import-reflection and syntax-decimal (@nicolo-ribaudo)
babel-generator
- #16779 Simplify logic for
[no LineTerminator here]before nodes (@nicolo-ribaudo)🏃♀️ Performance
babel-plugin-transform-typescript
- #16875 perf: Avoid extra cloning of namespaces (@liuxingbaoyu)
babel-types
- #16842 perf: Improve @babel/types builders (@liuxingbaoyu)
- #16828 Only access
BABEL_TYPES_8_BREAKINGat startup (@nicolo-ribaudo)Committers: 8
- Babel Bot (@babel-bot)
- Dylan Piercey (@DylanPiercey)
- Huáng Jùnliàng (@JLHwung)
- Nicolò Ribaudo (@nicolo-ribaudo)
- @liuxingbaoyu
- coderaiser (@coderaiser)
- fisker Cheung (@fisker)
- hwook (@YuHyeonWook)
7.25.4
v7.25.4 (2024-08-22)
🐛 Bug Fix
babel-traverse
- #16756 fix: Skip computed key when renaming (@liuxingbaoyu)
babel-helper-create-class-features-plugin,babel-plugin-proposal-decorators
- #16755 fix: Decorator 2018-09 may throw an exception (@liuxingbaoyu)
babel-types
- #16710 Visit AST fields nodes according to their syntactical order (@nicolo-ribaudo)
babel-generator
- #16709 Print semicolon after TS
export namespace as A(@nicolo-ribaudo)💅 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
- #16722 Avoid unnecessary parens around sequence expressions (@nicolo-ribaudo)
babel-generator,babel-plugin-transform-class-properties
- #16714 Avoid unnecessary parens around exported arrow functions (@nicolo-ribaudo)
babel-generator,babel-plugin-proposal-decorators,babel-plugin-proposal-destructuring-private,babel-plugin-transform-object-rest-spread
- #16712 Avoid printing unnecessary parens around object destructuring (@nicolo-ribaudo)
🔬 Output optimization
babel-generator
- #16740 Avoid extra spaces between comments/regexps in compact mode (@nicolo-ribaudo)
Committers: 4
- Babel Bot (@babel-bot)
- Huáng Jùnliàng (@JLHwung)
- Nicolò Ribaudo (@nicolo-ribaudo)
- @liuxingbaoyu
7.24.7
v7.24.7 (2024-06-05)
🐛 Bug Fix
babel-node
- #16554 Allow extra flags in babel-node (@nicolo-ribaudo)
babel-traverse
- #16522 fix: incorrect
constantViolationswith destructuring (@liuxingbaoyu)babel-helper-transform-fixture-test-runner,babel-plugin-proposal-explicit-resource-management
- #16524 fix: Transform
usinginswitchcorrectly (@liuxingbaoyu)🏠 Internal
babel-helpers,babel-runtime-corejs2,babel-runtime-corejs3,babel-runtime
- #16525 Delete unused array helpers (@blakewilson)
Committers: 7
- Amjad Yahia Robeen Hassan (@amjed-98)
- Babel Bot (@babel-bot)
- Blake Wilson (@blakewilson)
- Huáng Jùnliàng (@JLHwung)
- Nicolò Ribaudo (@nicolo-ribaudo)
- Sukka (@SukkaW)
- @liuxingbaoyu
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
- #16514 Fix source maps for private member expressions (@nicolo-ribaudo)
babel-core,babel-generator,babel-plugin-transform-modules-commonjs
- #16515 Fix source maps for template literals (@nicolo-ribaudo)
babel-helper-create-class-features-plugin,babel-plugin-proposal-decoratorsbabel-helpers,babel-plugin-proposal-decorators,babel-runtime-corejs3babel-parser,babel-plugin-transform-typescript
- #16476 fix: Correctly parse
cls.fn<C> = x(@liuxingbaoyu)🏠 Internal
babel-core,babel-helpers,babel-plugin-transform-runtime,babel-preset-env,babel-runtime-corejs2,babel-runtime-corejs3,babel-runtime
- #16501 Generate helper metadata at build time (@nicolo-ribaudo)
babel-helpers
- #16499 Add
tsconfig.jsonfor@babel/helpers/src/helpers(@nicolo-ribaudo)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
- #16495 Move all runtime helpers to individual files (@nicolo-ribaudo)
babel-parser,babel-traverse
- #16482 Statically generate boilerplate for bitfield accessors (@nicolo-ribaudo)
- Other
Committers: 9
- Amjad Yahia Robeen Hassan (@amjed-98)
- Babel Bot (@babel-bot)
- Blake Wilson (@blakewilson)
- Huáng Jùnliàng (@JLHwung)
- Lucas Coelho (@coelhucas)
- Nicolò Ribaudo (@nicolo-ribaudo)
- Sukka (@SukkaW)
- Zzzen (@Zzzen)
- @liuxingbaoyu
7.24.1
v7.24.1 (2024-03-19)
🐛 Bug Fix
babel-helper-create-class-features-plugin,babel-plugin-proposal-decoratorsbabel-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
- #16329 Respect
moduleNamefor@babel/runtime/regeneratorimports (@nicolo-ribaudo)babel-helper-create-class-features-plugin,babel-plugin-proposal-decorators,babel-plugin-proposal-pipeline-operator,babel-plugin-transform-class-propertiesbabel-helper-create-class-features-plugin,babel-helper-replace-supers,babel-plugin-proposal-decorators,babel-plugin-transform-class-properties📝 Documentation
- #16319 Update SECURITY.md (@nicolo-ribaudo)
🏠 Internal
babel-code-frame,babel-highlight
- #16359 Replace
chalkwithpicocolors(@nicolo-ribaudo)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-flowbabel-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
- #16349 Support merging imports in import injector (@nicolo-ribaudo)
- Other
- #16332 Test Babel 7 plugins compatibility with Babel 8 core (@nicolo-ribaudo)
🔬 Output optimization
babel-helper-replace-supers,babel-plugin-transform-class-properties,babel-plugin-transform-classes,babel-plugin-transform-parameters,babel-plugin-transform-runtime
- #16345 Optimize the use of
assertThisInitializedaftersuper()(@liuxingbaoyu)babel-plugin-transform-class-properties,babel-plugin-transform-classes
- #16343 Use simpler
assertThisInitializedmore often (@liuxingbaoyu)babel-plugin-proposal-decorators,babel-plugin-transform-class-properties,babel-plugin-transform-object-rest-spread,babel-traverse
- #16342 Consider well-known and registered symbols as literals (@nicolo-ribaudo)
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
- #16326 Reduce the use of class names (@liuxingbaoyu)
Committers: 4
- Babel Bot (@babel-bot)
- Huáng Jùnliàng (@JLHwung)
- Nicolò Ribaudo (@nicolo-ribaudo)
- @liuxingbaoyu
7.23.3
v7.23.3 (2023-11-09)
🐛 Bug Fix
babel-plugin-transform-typescriptbabel-generator
- #16078 Fix indentation when generating comments with
concise: true(@liuxingbaoyu)babel-compat-data,babel-plugin-bugfix-v8-static-class-fields-redefine-readonly,babel-preset-env
- #14295 Add a bugfix plugin for https://crbug.com/v8/12421 (@nicolo-ribaudo)
babel-plugin-transform-object-super
- #15948 fix:
super.xin a loop (@liuxingbaoyu)babel-helper-module-transforms,babel-plugin-transform-modules-amd,babel-plugin-transform-modules-commonjs,babel-plugin-transform-modules-umd
- #16015 fix: handle
__proto__exports name in CJS/AMD/UMD (@magic-akari)📝 Documentation
🏠 Internal
babel-core,babel-preset-env
- #15988 Refactor handling of modules plugins in
preset-env(@nicolo-ribaudo)🏃♀️ Performance
babel-generator
- #16061 perf: Improve
@babel/generatorperformance (@liuxingbaoyu)babel-traverse
- #16060 Avoid dynamic dispatch when calling wrapCheck (@yepitschunked)
🔬 Output optimization
babel-plugin-transform-computed-propertiesCommitters: 9
- Babel Bot (@babel-bot)
- Colin (@colinaaa)
- Huáng Jùnliàng (@JLHwung)
- Mateusz Burzyński (@Andarist)
- Nicolò Ribaudo (@nicolo-ribaudo)
- @aryehb
- @liuxingbaoyu
- @magic-akari
- @yepitschunked
7.22.5
v7.22.5 (2023-06-08)
🐛 Bug Fix
babel-preset-env,babel-standalone
- #15675 Fix using
syntax-unicode-sets-regexin standalone (@nicolo-ribaudo)
💅 Polish
babel-core
- #15683 Suggest
-transform-when resolving missing plugins (@nicolo-ribaudo)Committers: 4
- Avery (@nullableVoidPtr)
- Babel Bot (@babel-bot)
- Nicolò Ribaudo (@nicolo-ribaudo)
- @liuxingbaoyu
7.21.4
v7.21.4 (2023-03-31)
🐛 Bug Fix
babel-core,babel-helper-module-imports,babel-preset-typescript
- #15478 Fix support for
import/exportin.ctsfiles (@liuxingbaoyu)babel-generator
💅 Polish
babel-helper-create-class-features-plugin,babel-plugin-proposal-class-properties,babel-plugin-transform-typescript,babel-traverse
- #15427 Fix moving comments of removed nodes (@nicolo-ribaudo)
🏠 Internal
- Other
babel-parserbabel-code-frame,babel-highlightCommitters: 6
- Babel Bot (@babel-bot)
- Huáng Jùnliàng (@JLHwung)
- Nicolò Ribaudo (@nicolo-ribaudo)
- Ryan Tsao (@rtsao)
- @liuxingbaoyu
- fisker Cheung (@fisker)
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-envbabel-plugin-syntax-typescript
- #14923 Expose
dtsoption in@babel/plugin-syntax-typescript(@oceandrama)babel-generator,babel-parser,babel-plugin-syntax-explicit-resource-management,babel-plugin-transform-block-scoping,babel-plugin-transform-destructuring,babel-standalone,babel-traverse,babel-typesbabel-generator,babel-parser,babel-plugin-syntax-import-reflection,babel-standalone,babel-typesbabel-generator,babel-helper-skip-transparent-expression-wrappers,babel-parser,babel-plugin-transform-typescript,babel-traverse,babel-types
- #14211 [ts] Add support for
expr satisfies Typeexpressions (@nicolo-ribaudo)
🐛 Bug Fix
babel-generator,babel-parser
- #15032 Fix handling of comments with decorators before
export(@nicolo-ribaudo)babel-generator
🏠 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
- #15078 Update
regenerator-runtime(@nicolo-ribaudo)Committers: 5
- Babel Bot (@babel-bot)
- Huáng Jùnliàng (@JLHwung)
- Nicolò Ribaudo (@nicolo-ribaudo)
- Ruslan Baigunussov (@oceandrama)
- @liuxingbaoyu
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 63 commits:
v7.27.1Bumped picocolors to 1.1.1 (#17279)Rebuild Makefile.mjs (#17275)Allow `using of` as lexical declaration within for (#17254)fix invalid gulp watch usage (#17273)Update actions/checkout action to v4 (#17269)[babel 8] Remove unnecessary CJS ESM wrapper (#17261)Remove unused `regenerator-runtime` dep in `@babel/runtime` (#17263)[babel 8] Drop CJS support from `@babel/parser` (#17265)Update Yarn to 4.9.1 (#17266)Update fixture (#17264)Update fixturefix: do expressions should allow early exit (#17137)Include Babel 8 in coverage report (#17260)Ignore browser-only files in coverage reports (#17262)Update test262 (#17259)Fix: propagate argument evaluation errors through async promise chain (#17251)Tune plugin compat data (#17256)chore: bump compat-data sources (#17253)[Babel 8] perf: Improve traverse performance (#16965)Update error stack test (#17252)Update test262 (#17248)[Babel 8]: Remove record and tuple syntax support (#17242)Update `jest-light-runner` to v0.7.0 (#17245)Fix build script on Windows (#17244)fix `apply()`/`call()` annotated as pure (#17231)Reduce `interopRequireWildcard` size (#16538)Fill optional AST properties when both estree and typescript parser plugin are enabled (Part 3) (#17235)Create ChainExpression within TSInstantiationExpression (#17233)Stricter TSImportType options parsing (#17193)migrate babel-compat-data build script to mjs (#17236)Update test262 (#17234)Bump typescript-eslint to 8.29.1 (#17232)Disallow get/set in TSPropertySignature (#17230)Use `class` and add type definitions for `regenerator` (#17220)Fill optional AST properties when both estree and typescript parser plugin are enabled (Part 2) (#17226)Fill optional AST properties when both estree and typescript parser plugin are enabled (Part 1) (#17224)Update firefox bugfix compat data (#17228)Migrate `@babel/register` to cts (#16844)test: add basic typescript-eslint integration tests (#17219)Harden variable declarator validations (#17217)Reduce generated names size for the 10th-11th (#17221)fix: Objects and arrays with multiple references should not be evaluated (#17156)Reduce `regeneratorRuntime` size (#17213)build(deps): bump @babel/helpers from 7.24.4 to 7.27.0 (#17218)Enforce node protocol import (#17207)Use esm for makefile js (#17214)add require-esm babel-register test (#17206)Fix: support const type parameter in generator (#17216)Babel 8 cleanup (#17211)Run tests imported from regenerator (#17205)Use imported regenerator transform files (#17205)Re-convert regeneratorRuntime to helper format (#17205)Delete remaining original regenerator files (#17205)Move regenerator files to the relevant packages (#17205)Remove bundled regeneratorRuntime helper (#17205)Prepare LICENSE files for incorporating regenerator (#17205)Merge remote-tracking branch 'regenerator/main'Update test262 (#17208)Fix start of TSParameterProperty (#17080)[Babel 8] Bump nodejs requirements to `^20.19.0 || >= 22.12.0` (#17204)[babel 8] Deprecate uppercase builders (#17133)Add v7.27.0 to CHANGELOG.md [skip ci]
↗️ @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:
v7.27.2fix: `@babel/parser/bin/index.js` contains `node:` protocol require (#17289)fix: Private class method not found when ts and estree parser plugins are enabled (#17291)Fix: improve object rest handling in array pattern (#17281)Use `.d.ts` in import when importing a `.d.ts` file (#17288)[Babel 8] Directly export the JSON files from `@babel/compat-data` (#17267)Enable Node compile cache for `@babel/cli` (#17285)Update test262 (#17286)fix(babel-template): Properly handle empty string replacements (#17284)Add v7.27.1 to CHANGELOG.md [skip ci]
↗️ @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()orpath.evaluateTruthy()internal Babel methods.Known affected plugins are:
@babel/plugin-transform-runtime@babel/preset-envwhen using itsuseBuiltInsoption- Any "polyfill provider" plugin that depends on
@babel/helper-define-polyfill-provider, such asbabel-plugin-polyfill-corejs3,babel-plugin-polyfill-corejs2,babel-plugin-polyfill-es-shims,babel-plugin-polyfill-regeneratorNo 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/traverseto 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/traverseand 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/traverseversions:
@babel/plugin-transform-runtimev7.23.2@babel/preset-envv7.23.2@babel/helper-define-polyfill-providerv0.4.3babel-plugin-polyfill-corejs2v0.4.6babel-plugin-polyfill-corejs3v0.8.5babel-plugin-polyfill-es-shimsv0.10.0babel-plugin-polyfill-regeneratorv0.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:
v7.28.3fix(parser/typescript): parse `import("./a", {with:{},})` (#17465)chore: fix various typos across codebase (#17476)chore: fix typos in release.yml (#17475)fix(parser): stop subscript parsing on async arrow (#17478)chore: update node flags (#17477)build(Babel 8): disable JSON module transform (#17468)[babel 8] Add `@types/jsesc` as a dep of `@babel/generator` (#17459)Update test262 (#17462)Misc: Cleanup Babel 8 tasks (#17429)export PartialConfig and NormalizedOptions (#17470)chore: update browser compat libs (#17469)Type-check `.d.ts` file with `strict: true` (#17461)Enable type checking for `scripts` and `babel-worker.cjs` (#17454)Type check gulp&jest config (#17453)[static blocks] Do not inject new static fields after static code (#17443)Do not save last yield in call in temp var (#17363)Optimize do expression output (#17444)Update test262 (#17449)move eslint-{parser,plugin} docs to the website (#17448)Add v7.28.2 to CHANGELOG.md [skip ci]
↗️ @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.
↗️ @jest/core (indirect, 28.1.3 → 30.1.2) · Repo · Changelog
Release Notes
Too many releases to show here. View the full release notes.
↗️ @jest/environment (indirect, 28.1.3 → 30.1.2) · Repo · Changelog
Release Notes
Too many releases to show here. View the full release notes.
↗️ @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 activeFixes
- `[jest-snapshot-utils] Fix deprecated goo.gl snapshot guide link not getting replaced with fully canonical URL (#15787)
[jest-circus]Fixit.concurrentnot working withdescribe.skip(#15765)[jest-snapshot]Fix mangled inline snapshot updates when used with Prettier 3 and CRLF line endings[jest-runtime]Importing from@jest/globalsin more than one file no longer breaks relative paths (#15772)Chore
[expect]Update docblock fortoContain()to display info on substring check (#15789)
30.0.5 (from changelog)
Features
[jest-config]AllowtestMatchto take a string value[jest-worker]LetworkerIdleMemoryLimitaccept 0 to always restart worker child processesFixes
[expect]Fixbiginterror (#15702)
30.0.4 (from changelog)
Features
[expect]TheInversetype is now exported (#15714)[expect]feat: supportasync functionsintoBe(#15704)Fixes
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 thedefaultAsyncResolver(#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 deprecatejest-replpackage (#15673)[jest-resolver]Replace customisBuiltinModulewith node'sisBuiltin(#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.0and follow the migration guide: Upgrading from Jest 29 to 30.Features
[*]RenamedglobalsCleanupModetoglobalsCleanupand--waitNextEventLoopTurnForUnhandledRejectionEventsto--waitForUnhandledRejections[expect]AddArrayOfasymmetric matcher for validating array elements. (#15567)[babel-jest]Add optionexcludeJestPresetto allow opting out ofbabel-preset-jest(#15164)[expect]Revert #15038 to fixexpect(fn).toHaveBeenCalledWith(expect.objectContaining(...))when there are multiple calls (#15508)[jest-circus, jest-cli, jest-config]AddwaitNextEventLoopTurnForUnhandledRejectionEventsflag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)[jest-circus]Add awaitBeforeRetryoption tojest.retryTimes(#14738)[jest-circus]Add aretryImmediatelyoption tojest.retryTimes(#14696)[jest-circus, jest-jasmine2]AllowsetupFilesAfterEnvto export an async function (#10962)[jest-circus, jest-test-result]AddstartedAttimestamp inTestCaseResultObjectwithinonTestCaseResult(#15145)[jest-cli]ExportbuildArgv(#15310)[jest-config][BREAKING] Addmtsandctsto defaultmoduleFileExtensionsconfig (#14369)[jest-config][BREAKING] UpdatetestMatchandtestRegexdefault option for supportingmjs,cjs,mts, andcts(#14584)[jest-config]Loads config file from provided path inpackage.json(#14044)[jest-config]Allow loadingjest.config.ctsfiles (#14070)[jest-config]ShowrootDirin error message when apresetfails to load (#15194)[jest-config]Support loading TS config files usingesbuild-registervia 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]AddperfStatsto surface test setup overhead (#14622)[@jest/core][BREAKING] Changed--filterto accept an object with shape{ filtered: Array<string> }to match documentation (#13319)[@jest/core]Support--outputFileoption for--listTests(#14980)[@jest/core]Stringify Errors properly with--jsonflag (#15329)[@jest/core, @jest/test-sequencer][BREAKING] ExposesglobalConfig&contextstoTestSequencer(#14535, & #14543)[jest-each]Introduce%$option to add number of the test to its title (#14710)[@jest/environment][BREAKING] Remove deprecatedjest.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 thejsdomenvironment, allowing usage of custom versions of JSDOM (#14717)[jest-environment-node]Update jest environment with dispose symbolsSymbol(#14888 & #14909)[expect, @jest/expect][BREAKING] Add type inference for function parameters inCalledWithassertions (#15129)[@jest/expect-utils]Properly compare all types ofTypedArrays (#15178)[@jest/fake-timers][BREAKING] Upgrade@sinonjs/fake-timersto v13 (#14544 & #15470)[@jest/fake-timers]Exposing new modern timers functionadvanceTimersToFrame()which advances all timers by the needed milliseconds to execute callbacks currently scheduled withrequestAnimationFrame(#14598)[jest-matcher-utils]AddSERIALIZABLE_PROPERTIESto allow custom serialization of objects (#14893)[jest-mock]Add support for the Explicit Resource Management proposal to use theusingkeyword withjest.spyOn(object, methodName)(#14895)[jest-reporters]Add support for DEC mode 2026 (#15008)[jest-resolver]Supportfile://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 functionjest.advanceTimersToFrame()from@jest/fake-timers(#14598)[jest-runtime]Supportimport.meta.filenameandimport.meta.dirname(available from Node 20.11) (#14854)[jest-runtime]Supportimport.meta.resolve(#14930)[jest-runtime][BREAKING] Make it mandatory to passglobalConfigto theRuntimeconstructor (#15044)[jest-runtime]Addunstable_unmockModule(#15080)[jest-runtime]AddonGenerateMocktransformer callback for auto generated callbacks (#15433 & #15482)[jest-runtime][BREAKING] Usevm.compileFunctionovervm.Script(#15461)[@jest/schemas]Upgrade@sinclair/typeboxto v0.34 (#15450)[@jest/types]test.each(): Accept a readonly (as const) table properly (#14565)[@jest/types]Improve argument type inference passed totestanddescribecallback functions fromeachtables (#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 fromjest-snapshotinto its own package (#15095)[pretty-format][BREAKING] Do not render empty string children ('') in React plugin (#14470)Fixes
[expect]ShowAggregateErrorto display (#15346)[*]Replaceexitwithexit-x(#15399)[babel-plugin-jest-hoist]Usedenylistinstead of the deprecatedblacklistfor Babel 8 support (#14109)[babel-plugin-jest-hoist]Do not rely on buggy Babel behaviour (#15415)[expect]Check error instance type fortoThrow/toThrowError(#14576)[expect]Improve diff for failingexpect.objectContaining(#15038)[expect]UseArray.isArrayto check if an array is anArray(#15101)[expect]Fix Errorcauseassertion errors (#15339)[jest-changed-files]Print underlying errors when VCS commands fail (#15052)[jest-changed-files]Abortsl rootcall if output resembles a steam locomotive (#15053)[jest-circus][BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)[jest-circus]Replace recursivemakeTestResultsimplementation with iterative one (#14760)[jest-circus]Omitexpect.hasAssertions()errors if a test already has errors (#14866)[jest-circus, jest-expect, jest-snapshot]Passtest.failingtests 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 respectrunInBandoption (#14578)[jest-config]SupporttestTimeoutin project config (#14697)[jest-config]SupportcoverageReportersin project config (#14697)[jest-config]Allowreportersin project config (#14768)[jest-config]Allow Node16/NodeNext/BundlermoduleResolutionin project's tsconfig (#14739)[@jest/create-cache-key-function]Correct the return type ofcreateCacheKey(#15159)[jest-each]Allow$keypathtemplates withnullorundefinedvalues (#14831)[@jest/expect-utils]Fix comparison ofDataView(#14408)[@jest/expect-utils][BREAKING] exclude non-enumerable in object matching (#14670)[@jest/expect-utils]Fix comparison ofURL(#14672)[@jest/expect-utils]CheckSymbolproperties 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 multiplehasteImplModulePaths (#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_importCoreModelso required core module is consistent if modified while loading (#15077)[jest-schemas, jest-types][BREAKING] Fix type oftestFailureExitCodeconfig option(#15232)[jest-util]Make sureisInteractiveworks in a browser (#14552)[pretty-format][BREAKING] PrintArrayBufferandDataViewcorrectly (#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
testPathPatternconfiguration option totestPathPatterns, which now takes a list of patterns instead of the regex.- [BREAKING]
--testPathPatternis now--testPathPatterns- [BREAKING] Specifying
testPathPatternswhen programmatically callingwatchmust be specified asnew TestPathPatterns(patterns), whereTestPathPatternscan be imported from@jest/pattern[jest-reporters, jest-runner]Unhandled errors without stack get correctly logged to console (#14619)[jest-util]Always loadmjsfiles withimport(#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 whereObjectContainingmatched non-object values. ([#15463])(#15463).
- Adds a
conditional/checkto ensure the argument passed toexpectis an object.- Add unit tests for new
ObjectContainingbehavior.- Remove
invalid/wrongtest case assertions forObjectContaining.[jest-worker]Addresses incorrect state on exit (#15610)Performance
[*][BREAKING] Bundle all of Jest's modules intoindex.js(#12348, #14550 & #14661)[jest-haste-map]Only spawn one process to check forwatchmaninstallation (#14826)[jest-runner]Better cleanupsource-map-supportafter 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 ofmicromatchto^4.0.7(#15082)[*][BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)[*][BREAKING] Drop support fortypescript@4.3, minimum version is now5.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 toglob@10(#14509)[*]UseTypeErroroverErrorwhere appropriate (#14799)[docs]Fix typos inCHANGELOG.mdandpackages/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/coreto^7.11(#14109)[babel-jest, @jest/transform]Updatebabel-plugin-istanbulto v6 (#15156)[babel-plugin-jest-hoist]Move unnecessarydependenciestodevDependencies(#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--initargument (#14490)[jest-config, @jest/core, jest-util]Upgradeci-info(#14655)[jest-mock][BREAKING] RemoveMockFunctionMetadataType,MockFunctionMetadataandSpyInstancetypes (#14621)[@jest/reporters]Upgradeistanbul-lib-source-maps(#14924)[jest-schemas]Upgrade@sinclair/typebox(#14775)[jest-transform]Upgradewrite-file-atomic(#14274)[jest-util]Upgradepicomatchto 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.
↗️ @jest/globals (indirect, 28.1.3 → 30.1.2) · Repo · Changelog
Release Notes
Too many releases to show here. View the full release notes.
↗️ @jest/reporters (indirect, 28.1.3 → 30.1.2) · Repo · Changelog
Release Notes
Too many releases to show here. View the full release notes.
↗️ @jest/schemas (indirect, 28.1.3 → 30.0.5) · Repo · Changelog
Release Notes
30.0.5 (from changelog)
Features
[jest-config]AllowtestMatchto take a string value[jest-worker]LetworkerIdleMemoryLimitaccept 0 to always restart worker child processesFixes
[expect]Fixbiginterror (#15702)
30.0.1
What's Changed
Features
[jest-resolver]Implement thedefaultAsyncResolver(#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 deprecatejest-replpackage (#15673)[jest-resolver]Replace customisBuiltinModulewith node'sisBuiltin(#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.0and follow the migration guide: Upgrading from Jest 29 to 30.Features
[*]RenamedglobalsCleanupModetoglobalsCleanupand--waitNextEventLoopTurnForUnhandledRejectionEventsto--waitForUnhandledRejections[expect]AddArrayOfasymmetric matcher for validating array elements. (#15567)[babel-jest]Add optionexcludeJestPresetto allow opting out ofbabel-preset-jest(#15164)[expect]Revert #15038 to fixexpect(fn).toHaveBeenCalledWith(expect.objectContaining(...))when there are multiple calls (#15508)[jest-circus, jest-cli, jest-config]AddwaitNextEventLoopTurnForUnhandledRejectionEventsflag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)[jest-circus]Add awaitBeforeRetryoption tojest.retryTimes(#14738)[jest-circus]Add aretryImmediatelyoption tojest.retryTimes(#14696)[jest-circus, jest-jasmine2]AllowsetupFilesAfterEnvto export an async function (#10962)[jest-circus, jest-test-result]AddstartedAttimestamp inTestCaseResultObjectwithinonTestCaseResult(#15145)[jest-cli]ExportbuildArgv(#15310)[jest-config][BREAKING] Addmtsandctsto defaultmoduleFileExtensionsconfig (#14369)[jest-config][BREAKING] UpdatetestMatchandtestRegexdefault option for supportingmjs,cjs,mts, andcts(#14584)[jest-config]Loads config file from provided path inpackage.json(#14044)[jest-config]Allow loadingjest.config.ctsfiles (#14070)[jest-config]ShowrootDirin error message when apresetfails to load (#15194)[jest-config]Support loading TS config files usingesbuild-registervia 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]AddperfStatsto surface test setup overhead (#14622)[@jest/core][BREAKING] Changed--filterto accept an object with shape{ filtered: Array<string> }to match documentation (#13319)[@jest/core]Support--outputFileoption for--listTests(#14980)[@jest/core]Stringify Errors properly with--jsonflag (#15329)[@jest/core, @jest/test-sequencer][BREAKING] ExposesglobalConfig&contextstoTestSequencer(#14535, & #14543)[jest-each]Introduce%$option to add number of the test to its title (#14710)[@jest/environment][BREAKING] Remove deprecatedjest.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 thejsdomenvironment, allowing usage of custom versions of JSDOM (#14717)[jest-environment-node]Update jest environment with dispose symbolsSymbol(#14888 & #14909)[expect, @jest/expect][BREAKING] Add type inference for function parameters inCalledWithassertions (#15129)[@jest/expect-utils]Properly compare all types ofTypedArrays (#15178)[@jest/fake-timers][BREAKING] Upgrade@sinonjs/fake-timersto v13 (#14544 & #15470)[@jest/fake-timers]Exposing new modern timers functionadvanceTimersToFrame()which advances all timers by the needed milliseconds to execute callbacks currently scheduled withrequestAnimationFrame(#14598)[jest-matcher-utils]AddSERIALIZABLE_PROPERTIESto allow custom serialization of objects (#14893)[jest-mock]Add support for the Explicit Resource Management proposal to use theusingkeyword withjest.spyOn(object, methodName)(#14895)[jest-reporters]Add support for DEC mode 2026 (#15008)[jest-resolver]Supportfile://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 functionjest.advanceTimersToFrame()from@jest/fake-timers(#14598)[jest-runtime]Supportimport.meta.filenameandimport.meta.dirname(available from Node 20.11) (#14854)[jest-runtime]Supportimport.meta.resolve(#14930)[jest-runtime][BREAKING] Make it mandatory to passglobalConfigto theRuntimeconstructor (#15044)[jest-runtime]Addunstable_unmockModule(#15080)[jest-runtime]AddonGenerateMocktransformer callback for auto generated callbacks (#15433 & #15482)[jest-runtime][BREAKING] Usevm.compileFunctionovervm.Script(#15461)[@jest/schemas]Upgrade@sinclair/typeboxto v0.34 (#15450)[@jest/types]test.each(): Accept a readonly (as const) table properly (#14565)[@jest/types]Improve argument type inference passed totestanddescribecallback functions fromeachtables (#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 fromjest-snapshotinto its own package (#15095)[pretty-format][BREAKING] Do not render empty string children ('') in React plugin (#14470)Fixes
[expect]ShowAggregateErrorto display (#15346)[*]Replaceexitwithexit-x(#15399)[babel-plugin-jest-hoist]Usedenylistinstead of the deprecatedblacklistfor Babel 8 support (#14109)[babel-plugin-jest-hoist]Do not rely on buggy Babel behaviour (#15415)[expect]Check error instance type fortoThrow/toThrowError(#14576)[expect]Improve diff for failingexpect.objectContaining(#15038)[expect]UseArray.isArrayto check if an array is anArray(#15101)[expect]Fix Errorcauseassertion errors (#15339)[jest-changed-files]Print underlying errors when VCS commands fail (#15052)[jest-changed-files]Abortsl rootcall if output resembles a steam locomotive (#15053)[jest-circus][BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)[jest-circus]Replace recursivemakeTestResultsimplementation with iterative one (#14760)[jest-circus]Omitexpect.hasAssertions()errors if a test already has errors (#14866)[jest-circus, jest-expect, jest-snapshot]Passtest.failingtests 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 respectrunInBandoption (#14578)[jest-config]SupporttestTimeoutin project config (#14697)[jest-config]SupportcoverageReportersin project config (#14697)[jest-config]Allowreportersin project config (#14768)[jest-config]Allow Node16/NodeNext/BundlermoduleResolutionin project's tsconfig (#14739)[@jest/create-cache-key-function]Correct the return type ofcreateCacheKey(#15159)[jest-each]Allow$keypathtemplates withnullorundefinedvalues (#14831)[@jest/expect-utils]Fix comparison ofDataView(#14408)[@jest/expect-utils][BREAKING] exclude non-enumerable in object matching (#14670)[@jest/expect-utils]Fix comparison ofURL(#14672)[@jest/expect-utils]CheckSymbolproperties 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 multiplehasteImplModulePaths (#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_importCoreModelso required core module is consistent if modified while loading (#15077)[jest-schemas, jest-types][BREAKING] Fix type oftestFailureExitCodeconfig option(#15232)[jest-util]Make sureisInteractiveworks in a browser (#14552)[pretty-format][BREAKING] PrintArrayBufferandDataViewcorrectly (#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
testPathPatternconfiguration option totestPathPatterns, which now takes a list of patterns instead of the regex.- [BREAKING]
--testPathPatternis now--testPathPatterns- [BREAKING] Specifying
testPathPatternswhen programmatically callingwatchmust be specified asnew TestPathPatterns(patterns), whereTestPathPatternscan be imported from@jest/pattern[jest-reporters, jest-runner]Unhandled errors without stack get correctly logged to console (#14619)[jest-util]Always loadmjsfiles withimport(#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 whereObjectContainingmatched non-object values. ([#15463])(#15463).
- Adds a
conditional/checkto ensure the argument passed toexpectis an object.- Add unit tests for new
ObjectContainingbehavior.- Remove
invalid/wrongtest case assertions forObjectContaining.[jest-worker]Addresses incorrect state on exit (#15610)Performance
[*][BREAKING] Bundle all of Jest's modules intoindex.js(#12348, #14550 & #14661)[jest-haste-map]Only spawn one process to check forwatchmaninstallation (#14826)[jest-runner]Better cleanupsource-map-supportafter 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 ofmicromatchto^4.0.7(#15082)[*][BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)[*][BREAKING] Drop support fortypescript@4.3, minimum version is now5.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 toglob@10(#14509)[*]UseTypeErroroverErrorwhere appropriate (#14799)[docs]Fix typos inCHANGELOG.mdandpackages/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/coreto^7.11(#14109)[babel-jest, @jest/transform]Updatebabel-plugin-istanbulto v6 (#15156)[babel-plugin-jest-hoist]Move unnecessarydependenciestodevDependencies(#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--initargument (#14490)[jest-config, @jest/core, jest-util]Upgradeci-info(#14655)[jest-mock][BREAKING] RemoveMockFunctionMetadataType,MockFunctionMetadataandSpyInstancetypes (#14621)[@jest/reporters]Upgradeistanbul-lib-source-maps(#14924)[jest-schemas]Upgrade@sinclair/typebox(#14775)[jest-transform]Upgradewrite-file-atomic(#14274)[jest-util]Upgradepicomatchto 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 thedefaultAsyncResolver(#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 deprecatejest-replpackage (#15673)[jest-resolver]Replace customisBuiltinModulewith node'sisBuiltin(#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.0and follow the migration guide: Upgrading from Jest 29 to 30.Features
[*]RenamedglobalsCleanupModetoglobalsCleanupand--waitNextEventLoopTurnForUnhandledRejectionEventsto--waitForUnhandledRejections[expect]AddArrayOfasymmetric matcher for validating array elements. (#15567)[babel-jest]Add optionexcludeJestPresetto allow opting out ofbabel-preset-jest(#15164)[expect]Revert #15038 to fixexpect(fn).toHaveBeenCalledWith(expect.objectContaining(...))when there are multiple calls (#15508)[jest-circus, jest-cli, jest-config]AddwaitNextEventLoopTurnForUnhandledRejectionEventsflag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)[jest-circus]Add awaitBeforeRetryoption tojest.retryTimes(#14738)[jest-circus]Add aretryImmediatelyoption tojest.retryTimes(#14696)[jest-circus, jest-jasmine2]AllowsetupFilesAfterEnvto export an async function (#10962)[jest-circus, jest-test-result]AddstartedAttimestamp inTestCaseResultObjectwithinonTestCaseResult(#15145)[jest-cli]ExportbuildArgv(#15310)[jest-config][BREAKING] Addmtsandctsto defaultmoduleFileExtensionsconfig (#14369)[jest-config][BREAKING] UpdatetestMatchandtestRegexdefault option for supportingmjs,cjs,mts, andcts(#14584)[jest-config]Loads config file from provided path inpackage.json(#14044)[jest-config]Allow loadingjest.config.ctsfiles (#14070)[jest-config]ShowrootDirin error message when apresetfails to load (#15194)[jest-config]Support loading TS config files usingesbuild-registervia 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]AddperfStatsto surface test setup overhead (#14622)[@jest/core][BREAKING] Changed--filterto accept an object with shape{ filtered: Array<string> }to match documentation (#13319)[@jest/core]Support--outputFileoption for--listTests(#14980)[@jest/core]Stringify Errors properly with--jsonflag (#15329)[@jest/core, @jest/test-sequencer][BREAKING] ExposesglobalConfig&contextstoTestSequencer(#14535, & #14543)[jest-each]Introduce%$option to add number of the test to its title (#14710)[@jest/environment][BREAKING] Remove deprecatedjest.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 thejsdomenvironment, allowing usage of custom versions of JSDOM (#14717)[jest-environment-node]Update jest environment with dispose symbolsSymbol(#14888 & #14909)[expect, @jest/expect][BREAKING] Add type inference for function parameters inCalledWithassertions (#15129)[@jest/expect-utils]Properly compare all types ofTypedArrays (#15178)[@jest/fake-timers][BREAKING] Upgrade@sinonjs/fake-timersto v13 (#14544 & #15470)[@jest/fake-timers]Exposing new modern timers functionadvanceTimersToFrame()which advances all timers by the needed milliseconds to execute callbacks currently scheduled withrequestAnimationFrame(#14598)[jest-matcher-utils]AddSERIALIZABLE_PROPERTIESto allow custom serialization of objects (#14893)[jest-mock]Add support for the Explicit Resource Management proposal to use theusingkeyword withjest.spyOn(object, methodName)(#14895)[jest-reporters]Add support for DEC mode 2026 (#15008)[jest-resolver]Supportfile://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 functionjest.advanceTimersToFrame()from@jest/fake-timers(#14598)[jest-runtime]Supportimport.meta.filenameandimport.meta.dirname(available from Node 20.11) (#14854)[jest-runtime]Supportimport.meta.resolve(#14930)[jest-runtime][BREAKING] Make it mandatory to passglobalConfigto theRuntimeconstructor (#15044)[jest-runtime]Addunstable_unmockModule(#15080)[jest-runtime]AddonGenerateMocktransformer callback for auto generated callbacks (#15433 & #15482)[jest-runtime][BREAKING] Usevm.compileFunctionovervm.Script(#15461)[@jest/schemas]Upgrade@sinclair/typeboxto v0.34 (#15450)[@jest/types]test.each(): Accept a readonly (as const) table properly (#14565)[@jest/types]Improve argument type inference passed totestanddescribecallback functions fromeachtables (#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 fromjest-snapshotinto its own package (#15095)[pretty-format][BREAKING] Do not render empty string children ('') in React plugin (#14470)Fixes
[expect]ShowAggregateErrorto display (#15346)[*]Replaceexitwithexit-x(#15399)[babel-plugin-jest-hoist]Usedenylistinstead of the deprecatedblacklistfor Babel 8 support (#14109)[babel-plugin-jest-hoist]Do not rely on buggy Babel behaviour (#15415)[expect]Check error instance type fortoThrow/toThrowError(#14576)[expect]Improve diff for failingexpect.objectContaining(#15038)[expect]UseArray.isArrayto check if an array is anArray(#15101)[expect]Fix Errorcauseassertion errors (#15339)[jest-changed-files]Print underlying errors when VCS commands fail (#15052)[jest-changed-files]Abortsl rootcall if output resembles a steam locomotive (#15053)[jest-circus][BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)[jest-circus]Replace recursivemakeTestResultsimplementation with iterative one (#14760)[jest-circus]Omitexpect.hasAssertions()errors if a test already has errors (#14866)[jest-circus, jest-expect, jest-snapshot]Passtest.failingtests 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 respectrunInBandoption (#14578)[jest-config]SupporttestTimeoutin project config (#14697)[jest-config]SupportcoverageReportersin project config (#14697)[jest-config]Allowreportersin project config (#14768)[jest-config]Allow Node16/NodeNext/BundlermoduleResolutionin project's tsconfig (#14739)[@jest/create-cache-key-function]Correct the return type ofcreateCacheKey(#15159)[jest-each]Allow$keypathtemplates withnullorundefinedvalues (#14831)[@jest/expect-utils]Fix comparison ofDataView(#14408)[@jest/expect-utils][BREAKING] exclude non-enumerable in object matching (#14670)[@jest/expect-utils]Fix comparison ofURL(#14672)[@jest/expect-utils]CheckSymbolproperties 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 multiplehasteImplModulePaths (#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_importCoreModelso required core module is consistent if modified while loading (#15077)[jest-schemas, jest-types][BREAKING] Fix type oftestFailureExitCodeconfig option(#15232)[jest-util]Make sureisInteractiveworks in a browser (#14552)[pretty-format][BREAKING] PrintArrayBufferandDataViewcorrectly (#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
testPathPatternconfiguration option totestPathPatterns, which now takes a list of patterns instead of the regex.- [BREAKING]
--testPathPatternis now--testPathPatterns- [BREAKING] Specifying
testPathPatternswhen programmatically callingwatchmust be specified asnew TestPathPatterns(patterns), whereTestPathPatternscan be imported from@jest/pattern[jest-reporters, jest-runner]Unhandled errors without stack get correctly logged to console (#14619)[jest-util]Always loadmjsfiles withimport(#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 whereObjectContainingmatched non-object values. ([#15463])(#15463).
- Adds a
conditional/checkto ensure the argument passed toexpectis an object.- Add unit tests for new
ObjectContainingbehavior.- Remove
invalid/wrongtest case assertions forObjectContaining.[jest-worker]Addresses incorrect state on exit (#15610)Performance
[*][BREAKING] Bundle all of Jest's modules intoindex.js(#12348, #14550 & #14661)[jest-haste-map]Only spawn one process to check forwatchmaninstallation (#14826)[jest-runner]Better cleanupsource-map-supportafter 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 ofmicromatchto^4.0.7(#15082)[*][BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)[*][BREAKING] Drop support fortypescript@4.3, minimum version is now5.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 toglob@10(#14509)[*]UseTypeErroroverErrorwhere appropriate (#14799)[docs]Fix typos inCHANGELOG.mdandpackages/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/coreto^7.11(#14109)[babel-jest, @jest/transform]Updatebabel-plugin-istanbulto v6 (#15156)[babel-plugin-jest-hoist]Move unnecessarydependenciestodevDependencies(#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--initargument (#14490)[jest-config, @jest/core, jest-util]Upgradeci-info(#14655)[jest-mock][BREAKING] RemoveMockFunctionMetadataType,MockFunctionMetadataandSpyInstancetypes (#14621)[@jest/reporters]Upgradeistanbul-lib-source-maps(#14924)[jest-schemas]Upgrade@sinclair/typebox(#14775)[jest-transform]Upgradewrite-file-atomic(#14274)[jest-util]Upgradepicomatchto 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]ObjectContainingsupportsymbolas key (#14414)[expect]Remove@types/nodefrom dependencies (#14385)[jest-core]Use workers in watch mode by default to avoid crashes (#14059 & #14085).[jest-reporters]Updateistanbul-lib-instrumentdependency 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 throughjest.isolateModulesAsync(#14397)Chore & Maintenance
[jest-changed-files, jest-circus, jest-console, @jest/core, @jest/runtime, @jest/transform]UseinvariantandnotEmptyfromjest-utilrather than own internal (#14366)New Contributors
- @karlnorling made their first contribution in #14401
- @vinicinbgs made their first contribution in #14388
- @panteleevnikita made their first contribution in #14433
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]AllowcoverageDirectoryandcollectCoverageFromin project config (#14180)[jest-core]Always use workers in watch mode to avoid crashes (#14059).[jest-environment-jsdom, jest-environment-node]Fix assignment ofcustomExportConditionsviatestEnvironmentOptionswhen custom env subclass defines a default value (#13989)[jest-matcher-utils]Fix copying value of inherited getters (#14007)[jest-mock]Tweak typings to allowjest.replaceProperty()replace methods (#14008)[jest-mock]Improve user input validation and error messages ofspyOnandreplacePropertymethods (#14087)[jest-runtime]Bindjest.isolateModulesAsynctothis(#14083)[jest-runtime]ForwardwrapperLengthto theScriptconstructor ascolumnOffsetfor accurate debugging (#14148)[jest-runtime]Guard_isMockFunctionaccess within(#14188)[jest-snapshot]Fix a potential bug when not using prettier and improve performance (#14036)[@jest/transform]Do not instrument.jsonmodules (#14048)Chore & Maintenance
[*]Updatesemverdependency to get vulnerability fix (#14262)[docs]Updated documentation for the--runTestsByPathCLI 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
- @huntie made their first contribution in #13989
- @liammulh made their first contribution in #14001
- @BenceSzalai made their first contribution in #14007
- @Mike-Dax made their first contribution in #14056
- @bakasmarius made their first contribution in #14025
- @PeteTheHeat made their first contribution in #14015
- @tjenkinson made their first contribution in #14083
- @soyjuanmacias made their first contribution in #14101
- @bharathkalyans made their first contribution in #14154
- @itzjacki made their first contribution in #14165
- @DmitryMakhnev made their first contribution in #14174
- @BobdenOs made their first contribution in #14148
- @william-lai-927 made their first contribution in #14179
- @bakamitai456 made their first contribution in #14045
- @rbuckton made their first contribution in #14188
- @barbados-clemens made their first contribution in #14180
- @rburdet made their first contribution in #14197
- @cw1997 made their first contribution in #14184
- @renovate made their first contribution in #14209
- @stekycz made their first contribution in #14110
- @ziyad-elabid-nw made their first contribution in #14262
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.2) · Repo · Changelog
Release Notes
Too many releases to show here. View the full release notes.
↗️ @jest/transform (indirect, 28.1.3 → 30.1.2) · Repo · Changelog
Release Notes
Too many releases to show here. View the full release notes.
↗️ @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
- Add
ignoreListsupport: 9add0c2Full 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
- [meta] fix "exports" for node 13.0-13.6 by @ljharb in #4
- Fix built sources paths
New Contributors
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(andx_google_ignoreList) support: 1027ce6Full Changelog: v0.3.23...v0.3.24
0.3.23
Full Changelog: v0.3.22...v0.3.23
0.3.22
What's Changed
- Specify all exported types to unbreak TS v4.* by @jridgewell in #34
Full Changelog: v0.3.21...v0.3.22
0.3.21
What's Changed
- Use
export type *by @jridgewell in #32Full 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
- @RandomByte made their first contribution in #29
Full Changelog: v0.3.19...v0.3.20
0.3.19
What's Changed
- Unpins the
@jridgewell/resolve-uriand@jridgewell/sourcemap-codecdependencies 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 extendsundefined.- 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 of1970-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 viaCustom.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 existingType.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 classobjectinstances), andtypeOf(when validatingvaluetypes). 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 existingTObjectschemas to be augmented with additional properties of a known type.Additional:
- TypeBox provides an additional reference
codegenmodule 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)andTypeCheck.Error(value)now return an iterator for validation errors.- 191 TypeBox now provides a
TypeGuardAPI 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 innerTSchematype while traversing a outer type.- 197 TypeBox now implements conditional runtime type mapping. This functionality is offered as seperate import for the
0.24.0release but may be provided as standard type in later releases. This API enablestype T = Foo extends Bar ? true : falseconditional checks to be implemented at runtime. This API also provides theExcludeandExtractutility 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
Tupletypes.- 200 The types
TPickandTOmitnow support types ofTUnion<TLiteral<string>[]>to be used to select properties. Additionally,KeyOfnow returnsTUnion<TLiteral<string>[]>, allowingKeyOfschemas to be passed toTPickandTOmit.- 214 TypeBox now provides better support for i18n. To achieve this, TypeBox includes fixed mappable error codes on the
ValueErrortype. 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
ValueandTypeCompilerAPI'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>()andValue.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
TNevertype. This type is analogous to TypeScript'snevertype and is used in instances a composition results in a non-reconcilable type. Currently this type is implemented for emptyTUnion<[]>types only. Future releases may utilize this type for planned updates toTIntersect(for examplestring & numberresolves tonever)- 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()andValue.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
TypeScriptCodeGenwhich will remap TypeScriptinterfaceandtypedefinitions to TypeBox types. The second isTypeBoxCodeGenwhich 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.
↗️ @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.
↗️ 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
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 thedefaultAsyncResolver(#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 deprecatejest-replpackage (#15673)[jest-resolver]Replace customisBuiltinModulewith node'sisBuiltin(#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.0and follow the migration guide: Upgrading from Jest 29 to 30.Features
[*]RenamedglobalsCleanupModetoglobalsCleanupand--waitNextEventLoopTurnForUnhandledRejectionEventsto--waitForUnhandledRejections[expect]AddArrayOfasymmetric matcher for validating array elements. (#15567)[babel-jest]Add optionexcludeJestPresetto allow opting out ofbabel-preset-jest(#15164)[expect]Revert #15038 to fixexpect(fn).toHaveBeenCalledWith(expect.objectContaining(...))when there are multiple calls (#15508)[jest-circus, jest-cli, jest-config]AddwaitNextEventLoopTurnForUnhandledRejectionEventsflag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)[jest-circus]Add awaitBeforeRetryoption tojest.retryTimes(#14738)[jest-circus]Add aretryImmediatelyoption tojest.retryTimes(#14696)[jest-circus, jest-jasmine2]AllowsetupFilesAfterEnvto export an async function (#10962)[jest-circus, jest-test-result]AddstartedAttimestamp inTestCaseResultObjectwithinonTestCaseResult(#15145)[jest-cli]ExportbuildArgv(#15310)[jest-config][BREAKING] Addmtsandctsto defaultmoduleFileExtensionsconfig (#14369)[jest-config][BREAKING] UpdatetestMatchandtestRegexdefault option for supportingmjs,cjs,mts, andcts(#14584)[jest-config]Loads config file from provided path inpackage.json(#14044)[jest-config]Allow loadingjest.config.ctsfiles (#14070)[jest-config]ShowrootDirin error message when apresetfails to load (#15194)[jest-config]Support loading TS config files usingesbuild-registervia 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]AddperfStatsto surface test setup overhead (#14622)[@jest/core][BREAKING] Changed--filterto accept an object with shape{ filtered: Array<string> }to match documentation (#13319)[@jest/core]Support--outputFileoption for--listTests(#14980)[@jest/core]Stringify Errors properly with--jsonflag (#15329)[@jest/core, @jest/test-sequencer][BREAKING] ExposesglobalConfig&contextstoTestSequencer(#14535, & #14543)[jest-each]Introduce%$option to add number of the test to its title (#14710)[@jest/environment][BREAKING] Remove deprecatedjest.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 thejsdomenvironment, allowing usage of custom versions of JSDOM (#14717)[jest-environment-node]Update jest environment with dispose symbolsSymbol(#14888 & #14909)[expect, @jest/expect][BREAKING] Add type inference for function parameters inCalledWithassertions (#15129)[@jest/expect-utils]Properly compare all types ofTypedArrays (#15178)[@jest/fake-timers][BREAKING] Upgrade@sinonjs/fake-timersto v13 (#14544 & #15470)[@jest/fake-timers]Exposing new modern timers functionadvanceTimersToFrame()which advances all timers by the needed milliseconds to execute callbacks currently scheduled withrequestAnimationFrame(#14598)[jest-matcher-utils]AddSERIALIZABLE_PROPERTIESto allow custom serialization of objects (#14893)[jest-mock]Add support for the Explicit Resource Management proposal to use theusingkeyword withjest.spyOn(object, methodName)(#14895)[jest-reporters]Add support for DEC mode 2026 (#15008)[jest-resolver]Supportfile://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 functionjest.advanceTimersToFrame()from@jest/fake-timers(#14598)[jest-runtime]Supportimport.meta.filenameandimport.meta.dirname(available from Node 20.11) (#14854)[jest-runtime]Supportimport.meta.resolve(#14930)[jest-runtime][BREAKING] Make it mandatory to passglobalConfigto theRuntimeconstructor (#15044)[jest-runtime]Addunstable_unmockModule(#15080)[jest-runtime]AddonGenerateMocktransformer callback for auto generated callbacks (#15433 & #15482)[jest-runtime][BREAKING] Usevm.compileFunctionovervm.Script(#15461)[@jest/schemas]Upgrade@sinclair/typeboxto v0.34 (#15450)[@jest/types]test.each(): Accept a readonly (as const) table properly (#14565)[@jest/types]Improve argument type inference passed totestanddescribecallback functions fromeachtables (#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 fromjest-snapshotinto its own package (#15095)[pretty-format][BREAKING] Do not render empty string children ('') in React plugin (#14470)Fixes
[expect]ShowAggregateErrorto display (#15346)[*]Replaceexitwithexit-x(#15399)[babel-plugin-jest-hoist]Usedenylistinstead of the deprecatedblacklistfor Babel 8 support (#14109)[babel-plugin-jest-hoist]Do not rely on buggy Babel behaviour (#15415)[expect]Check error instance type fortoThrow/toThrowError(#14576)[expect]Improve diff for failingexpect.objectContaining(#15038)[expect]UseArray.isArrayto check if an array is anArray(#15101)[expect]Fix Errorcauseassertion errors (#15339)[jest-changed-files]Print underlying errors when VCS commands fail (#15052)[jest-changed-files]Abortsl rootcall if output resembles a steam locomotive (#15053)[jest-circus][BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)[jest-circus]Replace recursivemakeTestResultsimplementation with iterative one (#14760)[jest-circus]Omitexpect.hasAssertions()errors if a test already has errors (#14866)[jest-circus, jest-expect, jest-snapshot]Passtest.failingtests 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 respectrunInBandoption (#14578)[jest-config]SupporttestTimeoutin project config (#14697)[jest-config]SupportcoverageReportersin project config (#14697)[jest-config]Allowreportersin project config (#14768)[jest-config]Allow Node16/NodeNext/BundlermoduleResolutionin project's tsconfig (#14739)[@jest/create-cache-key-function]Correct the return type ofcreateCacheKey(#15159)[jest-each]Allow$keypathtemplates withnullorundefinedvalues (#14831)[@jest/expect-utils]Fix comparison ofDataView(#14408)[@jest/expect-utils][BREAKING] exclude non-enumerable in object matching (#14670)[@jest/expect-utils]Fix comparison ofURL(#14672)[@jest/expect-utils]CheckSymbolproperties 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 multiplehasteImplModulePaths (#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_importCoreModelso required core module is consistent if modified while loading (#15077)[jest-schemas, jest-types][BREAKING] Fix type oftestFailureExitCodeconfig option(#15232)[jest-util]Make sureisInteractiveworks in a browser (#14552)[pretty-format][BREAKING] PrintArrayBufferandDataViewcorrectly (#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
testPathPatternconfiguration option totestPathPatterns, which now takes a list of patterns instead of the regex.- [BREAKING]
--testPathPatternis now--testPathPatterns- [BREAKING] Specifying
testPathPatternswhen programmatically callingwatchmust be specified asnew TestPathPatterns(patterns), whereTestPathPatternscan be imported from@jest/pattern[jest-reporters, jest-runner]Unhandled errors without stack get correctly logged to console (#14619)[jest-util]Always loadmjsfiles withimport(#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 whereObjectContainingmatched non-object values. ([#15463])(#15463).
- Adds a
conditional/checkto ensure the argument passed toexpectis an object.- Add unit tests for new
ObjectContainingbehavior.- Remove
invalid/wrongtest case assertions forObjectContaining.[jest-worker]Addresses incorrect state on exit (#15610)Performance
[*][BREAKING] Bundle all of Jest's modules intoindex.js(#12348, #14550 & #14661)[jest-haste-map]Only spawn one process to check forwatchmaninstallation (#14826)[jest-runner]Better cleanupsource-map-supportafter 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 ofmicromatchto^4.0.7(#15082)[*][BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)[*][BREAKING] Drop support fortypescript@4.3, minimum version is now5.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 toglob@10(#14509)[*]UseTypeErroroverErrorwhere appropriate (#14799)[docs]Fix typos inCHANGELOG.mdandpackages/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/coreto^7.11(#14109)[babel-jest, @jest/transform]Updatebabel-plugin-istanbulto v6 (#15156)[babel-plugin-jest-hoist]Move unnecessarydependenciestodevDependencies(#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--initargument (#14490)[jest-config, @jest/core, jest-util]Upgradeci-info(#14655)[jest-mock][BREAKING] RemoveMockFunctionMetadataType,MockFunctionMetadataandSpyInstancetypes (#14621)[@jest/reporters]Upgradeistanbul-lib-source-maps(#14924)[jest-schemas]Upgrade@sinclair/typebox(#14775)[jest-transform]Upgradewrite-file-atomic(#14274)[jest-util]Upgradepicomatchto 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]ObjectContainingsupportsymbolas key (#14414)[expect]Remove@types/nodefrom dependencies (#14385)[jest-core]Use workers in watch mode by default to avoid crashes (#14059 & #14085).[jest-reporters]Updateistanbul-lib-instrumentdependency 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 throughjest.isolateModulesAsync(#14397)Chore & Maintenance
[jest-changed-files, jest-circus, jest-console, @jest/core, @jest/runtime, @jest/transform]UseinvariantandnotEmptyfromjest-utilrather than own internal (#14366)New Contributors
- @karlnorling made their first contribution in #14401
- @vinicinbgs made their first contribution in #14388
- @panteleevnikita made their first contribution in #14433
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]AddworkerThreadsconfiguration option to allow using worker threads for parallelization (#13939)[jest-cli]ExportyargsOptions(#13970)[jest-config]AddopenHandlesTimeoutoption to configure possible open handles warning. (#13875)[@jest/create-cache-key-function]Allow passinglengthargument tocreateCacheKey()function and set its default value to16on Windows (#13827)[jest-message-util]Add support for AggregateError (#13946 & #13947)[jest-message-util]Add support for Error causes intestandit(#13935 & #13966)[jest-reporters]AddsummaryThresholdoption 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-timersasync APIs functionsadvanceTimersByTimeAsync(msToRun)(tickAsync(msToRun)),advanceTimersToNextTimerAsync(steps)(nextAsync),runAllTimersAsync(runAllAsync), andrunOnlyPendingTimersAsync(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 toctsandmtsTypeScript files to inline snapshots (#13975)[jest-worker]Addstartmethod to worker farms (#13937)[jest-worker]Support passing a URL as path to worker (#13982)Fixes
[babel-plugin-jest-hoist]Fix unwanted hoisting of nestedjestusages (#13952)[jest-circus]Send test case results fortodotests (#13915)[jest-circus]Update message printed on test timeout (#13830)[jest-circus]Avoid creating the word "testfalse" whentakesDoneCallbackisfalsein the message printed on test timeout AND updated timeouts test (#13954)[jest-environment-jsdom]Stop settingdocumenttonullon teardown (#13972)[@jest/expect-utils]UpdatetoStrictEqual()to be able to checkjest.fn().mock.calls(#13960)[@jest/test-result]AllowTestResultsProcessortype to return a Promise (#13950)Chore & Maintenance
[jest-snapshot]Remove dependency onjest-haste-map(#13977)New Contributors
- @frosas made their first contribution in #13932
- @akshitsinha made their first contribution in #13915
- @trajano made their first contribution in #13827
- @DercilioFontes made their first contribution in #13954
- @jsnajdr made their first contribution in #13952
- @SteveFlames made their first contribution in #13895
- @willc001 made their first contribution in #13970
- @benjaminhobbs made their first contribution in #13901
Full Changelog: v29.4.3...v29.5.0
29.4.3
Features
[expect]UpdatetoThrow()to be able to use errorcauses (#13606)[jest-core]allow to useworkerIdleMemoryLimitwith only 1 worker orrunInBandoption (#13846)[jest-message-util]Add support for errorcauses (#13868 & #13912)[jest-runtime]Revertimport assertionsfor JSON modules as it's been relegated to Stage 2 (#13911)Fixes
[@jest/expect-utils]subsetEqualityshould consider also an object's inherited string keys (#13824)[jest-mock]Clear mock state whenjest.restoreAllMocks()is called (#13867)[jest-mock]PreventmockImplementationOnceandmockReturnValueOncebleeding intowithImplementation(#13888)[jest-mock]Do not restore mocks whenjest.resetAllMocks()is called (#13866)New Contributors
- @brodo made their first contribution in #13868
- @DannyNemer made their first contribution in #13878
- @ghusse made their first contribution in #13846
- @broofa made their first contribution in #13911
Full Changelog: v29.4.2...v29.4.3
29.4.2
Features
[@jest/core]Instrument significant lifecycle events withperformance.mark()(#13859)Fixes
[expect, @jest/expect]Provide type ofactualas a generic argument toMatchersto allow better-typed extensions (#13848)[jest-circus]Added explicit mention of test failing becausedone()is not being called in error message (#13847)[jest-runtime]Handle CJS re-exports of node core modules from ESM (#13856)[jest-transform]Downgradewrite-file-atomicto v4 (#13853)[jest-worker]Ignore IPC messages not intended for Jest (#13543)Chore & Maintenance
[*]make sure to exclude.eslintcachefrom published module (#13832)[docs]Cleanup incorrect links in CHANGELOG.md (#13857)New Contributors
- @benjaminjkraft made their first contribution in #13848
- @LinusU made their first contribution in #13543
- @SuperSodaSea made their first contribution in #13857
- @kowalski made their first contribution in #13856
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]Useos.availableParallelismif available to calculate number of workers to spawn (#13738)[@jest/globals, jest-mock]Addjest.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]Addjest.isolateModulesAsyncfor scoped module initialization of asynchronous functions (#13680)[jest-runtime]Addjest.isEnvironmentTornDownfunction (#13741)[jest-test-result]Addedskippedandfocusedstatus toFormattedTestResult(#13700)[jest-transform]Support for asynchronouscreateTransformer(#13762)Fixes
[jest-environment-node]Fix non-configurable globals (#13687)[@jest/expect-utils]toMatchObjectshould handleSymbolproperties (#13639)[jest-mock]FixmockResetandresetAllMocksundefinedreturn value(#13692)[jest-resolve]Add global paths torequire.resolve.paths(#13633)[jest-resolve]Correct node core module detection when usingnode:specifiers (#13806)[jest-runtime]Support WASM files that import JS resources (#13608)[jest-runtime]Use thescriptTransformercache injest-runner(#13735)[jest-runtime]Enforce import assertions when importing JSON in ESM (#12755 & #13805)[jest-snapshot]Make sure to importbabeloutside of the sandbox (#13694)[jest-transform]Ensure the correct configuration is passed to preprocessors specified multiple times in thetransformoption (#13770)Chore & Maintenance
[@jest/fake-timers]Update@sinonjs/fake-timers(#13612)[docs]Improve custom puppeteer example to prevent worker warnings (#13619)New Contributors
- @lvqq made their first contribution in #13633
- @zjfresh made their first contribution in #13682
- @rnwst made their first contribution in #13635
- @overlookmotel made their first contribution in #13687
- @mmanciop made their first contribution in #13680
- @Jeroendevr made their first contribution in #13428
- @falsyvalues made their first contribution in #13619
- @vegerot made their first contribution in #13674
- @faustAbc made their first contribution in #13331
- @valentincostam made their first contribution in #13634
- @unional made their first contribution in #13721
- @andrewiggins made their first contribution in #13654
- @michal-kocarek made their first contribution in #13496
- @jdufresne made their first contribution in #13469
- @feliperli made their first contribution in #13692
- @bob-zs made their first contribution in #13740
- @MasterOdin made their first contribution in #13743
- @kalyncoose made their first contribution in #13746
- @arash-hacker made their first contribution in #13747
- @jomendez made their first contribution in #13741
- @coffeebeats made their first contribution in #13770
- @lachrist made their first contribution in #13762
- @lukeed made their first contribution in #13777
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-seedwill display the seed value in the report, and can be set via a CLI flag or through the config file (#13400)[jest-config]AddreadInitialConfigutility function (#13356)[jest-core]AllowtestResultsProcessorto be async (#13343)[@jest/environment, jest-environment-node, jest-environment-jsdom, jest-runtime]AddgetSeed()to thejestobject (#13400)[expect, @jest/expect-utils]AllowisAutility to take a type argument (#13355)[expect]ExposeAsyncExpectationResultandSyncExpectationResulttypes (#13411)Fixes
[babel-plugin-jest-hoist]IgnoreTSTypeQuerywhen checking for hoisted references (#13367)[jest-core]FixdetectOpenHandlesfalse positives for some special objects such asTLSWRAP(#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 ofeachtable correctly when the table is a tuple or array (#13381)[@jest/types]Rework typings to allow the*ReturnedWithmatchers to be called with no argument (#13385)Chore & Maintenance
[*]Update@babel/*deps, resulting in slightly different stack traces foreach(#13422)Performance
[jest-runner]Do not instrument v8 coverage data if coverage should not be collected (#13282)New Contributors
- @johannessjoberg made their first contribution in #13343
- @mitchhentgesspotify made their first contribution in #13282
- @Methuselah96 made their first contribution in #13409
- @jhwang98 made their first contribution in #13400
- @professorjrod made their first contribution in #13418
- @jesusarell made their first contribution in #13407
Full Changelog: v29.1.2...v29.2.0
29.0.2
Features
[jest-transform]ExposeTransformFactorytype (#13184)Fixes
[babel-plugin-jest-hoist]Support importedjestin mock factory (#13188)[jest-mock]Align the behavior and return type ofgenerateFromMetadatamethod (#13207)[jest-runtime]Supportjest.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 betweenMatcherContextMatcherUtilsandMatcherStatetypes (#13141)[jest-circus]Add support fortest.failing.each(#13142)[jest-config][BREAKING] MakesnapshotFormatdefault toescapeString: falseandprintBasicPrototype: false(#13036)[jest-config][BREAKING] Remove undocumentedcollectCoverageOnlyFromoption (#13156)[jest-environment-jsdom][BREAKING] Upgrade tojsdom@20(#13037, #13058)[@jest/globals]Addjest.Mocked,jest.MockedClass,jest.MockedFunctionandjest.MockedObjectutility types (#12727)[jest-mock][BREAKING] RefactorMocked*utility types.MaybeMockedDeepandMaybeMockedbecameMockedandMockedShallowrespectively; only deep mocked variants ofMockedClass,MockedFunctionandMockedObjectare exported (#13123, #13124)[jest-mock][BREAKING] Change the defaultjest.mockedhelper’s behavior to deep mocked (#13125)[jest-snapshot][BREAKING] Letbabelfind config when updating inline snapshots (#13150)[@jest/test-result, @jest/types][BREAKING] ReplaceBytesandMillisecondstypes withnumber(#13155)[jest-worker]AddsworkerIdleMemoryLimitoption 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] RemoveConvertAnsiplugin in favour ofjest-serializer-ansi-escapes(#13040)[pretty-format]Allow to opt out from sorting object keys withcompareKeys: 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]MakeprettierPathoptional inSnapshotState(#13149)[jest-snapshot]Fix parsing error from inline snapshot files withJSX(#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 setnfor--bail(#13128)[docs]Update Enzyme URL (#13166)[jest-leak-detector]Remove support forweak-napi(#13035)[jest-snapshot][BREAKING] RequirerootDiras argument toSnapshotState(#13150)New Contributors
- @makstech made their first contribution in #13049
- @sa2taka made their first contribution in #13055
- @matheus-rodrigues00 made their first contribution in #13090
- @lanpai made their first contribution in #13094
- @Zebreus made their first contribution in #13099
- @backmask made their first contribution in #13106
- @liuxingbaoyu made their first contribution in #13120
- @Trim made their first contribution in #13128
- @kkyusufk made their first contribution in #13142
- @KrishnaPG made their first contribution in #13157
- @dev-itsheng made their first contribution in #13115
- @jeffslofish made their first contribution in #13166
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:
1.2.0Actually support Babel 81.1.1Merge remote-tracking branch 'origin/import-attributes'1.0.2Allow Babel 8 in peer dep version1.1.0Add features up to import attributes (#11)Add features up to import attributesInstall on Node.js latestYarn -> npmDisable PnPTest more Node.js versionsRevert "Use Yarn 4.4.0"Update dependenciesUse Yarn 4.4.0
↗️ babel-preset-jest (indirect, 28.1.3 → 30.0.1) · Repo · Changelog
Release Notes
30.0.1
What's Changed
Features
[jest-resolver]Implement thedefaultAsyncResolver(#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 deprecatejest-replpackage (#15673)[jest-resolver]Replace customisBuiltinModulewith node'sisBuiltin(#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.0and follow the migration guide: Upgrading from Jest 29 to 30.Features
[*]RenamedglobalsCleanupModetoglobalsCleanupand--waitNextEventLoopTurnForUnhandledRejectionEventsto--waitForUnhandledRejections[expect]AddArrayOfasymmetric matcher for validating array elements. (#15567)[babel-jest]Add optionexcludeJestPresetto allow opting out ofbabel-preset-jest(#15164)[expect]Revert #15038 to fixexpect(fn).toHaveBeenCalledWith(expect.objectContaining(...))when there are multiple calls (#15508)[jest-circus, jest-cli, jest-config]AddwaitNextEventLoopTurnForUnhandledRejectionEventsflag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)[jest-circus]Add awaitBeforeRetryoption tojest.retryTimes(#14738)[jest-circus]Add aretryImmediatelyoption tojest.retryTimes(#14696)[jest-circus, jest-jasmine2]AllowsetupFilesAfterEnvto export an async function (#10962)[jest-circus, jest-test-result]AddstartedAttimestamp inTestCaseResultObjectwithinonTestCaseResult(#15145)[jest-cli]ExportbuildArgv(#15310)[jest-config][BREAKING] Addmtsandctsto defaultmoduleFileExtensionsconfig (#14369)[jest-config][BREAKING] UpdatetestMatchandtestRegexdefault option for supportingmjs,cjs,mts, andcts(#14584)[jest-config]Loads config file from provided path inpackage.json(#14044)[jest-config]Allow loadingjest.config.ctsfiles (#14070)[jest-config]ShowrootDirin error message when apresetfails to load (#15194)[jest-config]Support loading TS config files usingesbuild-registervia 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]AddperfStatsto surface test setup overhead (#14622)[@jest/core][BREAKING] Changed--filterto accept an object with shape{ filtered: Array<string> }to match documentation (#13319)[@jest/core]Support--outputFileoption for--listTests(#14980)[@jest/core]Stringify Errors properly with--jsonflag (#15329)[@jest/core, @jest/test-sequencer][BREAKING] ExposesglobalConfig&contextstoTestSequencer(#14535, & #14543)[jest-each]Introduce%$option to add number of the test to its title (#14710)[@jest/environment][BREAKING] Remove deprecatedjest.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 thejsdomenvironment, allowing usage of custom versions of JSDOM (#14717)[jest-environment-node]Update jest environment with dispose symbolsSymbol(#14888 & #14909)[expect, @jest/expect][BREAKING] Add type inference for function parameters inCalledWithassertions (#15129)[@jest/expect-utils]Properly compare all types ofTypedArrays (#15178)[@jest/fake-timers][BREAKING] Upgrade@sinonjs/fake-timersto v13 (#14544 & #15470)[@jest/fake-timers]Exposing new modern timers functionadvanceTimersToFrame()which advances all timers by the needed milliseconds to execute callbacks currently scheduled withrequestAnimationFrame(#14598)[jest-matcher-utils]AddSERIALIZABLE_PROPERTIESto allow custom serialization of objects (#14893)[jest-mock]Add support for the Explicit Resource Management proposal to use theusingkeyword withjest.spyOn(object, methodName)(#14895)[jest-reporters]Add support for DEC mode 2026 (#15008)[jest-resolver]Supportfile://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 functionjest.advanceTimersToFrame()from@jest/fake-timers(#14598)[jest-runtime]Supportimport.meta.filenameandimport.meta.dirname(available from Node 20.11) (#14854)[jest-runtime]Supportimport.meta.resolve(#14930)[jest-runtime][BREAKING] Make it mandatory to passglobalConfigto theRuntimeconstructor (#15044)[jest-runtime]Addunstable_unmockModule(#15080)[jest-runtime]AddonGenerateMocktransformer callback for auto generated callbacks (#15433 & #15482)[jest-runtime][BREAKING] Usevm.compileFunctionovervm.Script(#15461)[@jest/schemas]Upgrade@sinclair/typeboxto v0.34 (#15450)[@jest/types]test.each(): Accept a readonly (as const) table properly (#14565)[@jest/types]Improve argument type inference passed totestanddescribecallback functions fromeachtables (#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 fromjest-snapshotinto its own package (#15095)[pretty-format][BREAKING] Do not render empty string children ('') in React plugin (#14470)Fixes
[expect]ShowAggregateErrorto display (#15346)[*]Replaceexitwithexit-x(#15399)[babel-plugin-jest-hoist]Usedenylistinstead of the deprecatedblacklistfor Babel 8 support (#14109)[babel-plugin-jest-hoist]Do not rely on buggy Babel behaviour (#15415)[expect]Check error instance type fortoThrow/toThrowError(#14576)[expect]Improve diff for failingexpect.objectContaining(#15038)[expect]UseArray.isArrayto check if an array is anArray(#15101)[expect]Fix Errorcauseassertion errors (#15339)[jest-changed-files]Print underlying errors when VCS commands fail (#15052)[jest-changed-files]Abortsl rootcall if output resembles a steam locomotive (#15053)[jest-circus][BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)[jest-circus]Replace recursivemakeTestResultsimplementation with iterative one (#14760)[jest-circus]Omitexpect.hasAssertions()errors if a test already has errors (#14866)[jest-circus, jest-expect, jest-snapshot]Passtest.failingtests 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 respectrunInBandoption (#14578)[jest-config]SupporttestTimeoutin project config (#14697)[jest-config]SupportcoverageReportersin project config (#14697)[jest-config]Allowreportersin project config (#14768)[jest-config]Allow Node16/NodeNext/BundlermoduleResolutionin project's tsconfig (#14739)[@jest/create-cache-key-function]Correct the return type ofcreateCacheKey(#15159)[jest-each]Allow$keypathtemplates withnullorundefinedvalues (#14831)[@jest/expect-utils]Fix comparison ofDataView(#14408)[@jest/expect-utils][BREAKING] exclude non-enumerable in object matching (#14670)[@jest/expect-utils]Fix comparison ofURL(#14672)[@jest/expect-utils]CheckSymbolproperties 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 multiplehasteImplModulePaths (#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_importCoreModelso required core module is consistent if modified while loading (#15077)[jest-schemas, jest-types][BREAKING] Fix type oftestFailureExitCodeconfig option(#15232)[jest-util]Make sureisInteractiveworks in a browser (#14552)[pretty-format][BREAKING] PrintArrayBufferandDataViewcorrectly (#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
testPathPatternconfiguration option totestPathPatterns, which now takes a list of patterns instead of the regex.- [BREAKING]
--testPathPatternis now--testPathPatterns- [BREAKING] Specifying
testPathPatternswhen programmatically callingwatchmust be specified asnew TestPathPatterns(patterns), whereTestPathPatternscan be imported from@jest/pattern[jest-reporters, jest-runner]Unhandled errors without stack get correctly logged to console (#14619)[jest-util]Always loadmjsfiles withimport(#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 whereObjectContainingmatched non-object values. ([#15463])(#15463).
- Adds a
conditional/checkto ensure the argument passed toexpectis an object.- Add unit tests for new
ObjectContainingbehavior.- Remove
invalid/wrongtest case assertions forObjectContaining.[jest-worker]Addresses incorrect state on exit (#15610)Performance
[*][BREAKING] Bundle all of Jest's modules intoindex.js(#12348, #14550 & #14661)[jest-haste-map]Only spawn one process to check forwatchmaninstallation (#14826)[jest-runner]Better cleanupsource-map-supportafter 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 ofmicromatchto^4.0.7(#15082)[*][BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)[*][BREAKING] Drop support fortypescript@4.3, minimum version is now5.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 toglob@10(#14509)[*]UseTypeErroroverErrorwhere appropriate (#14799)[docs]Fix typos inCHANGELOG.mdandpackages/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/coreto^7.11(#14109)[babel-jest, @jest/transform]Updatebabel-plugin-istanbulto v6 (#15156)[babel-plugin-jest-hoist]Move unnecessarydependenciestodevDependencies(#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--initargument (#14490)[jest-config, @jest/core, jest-util]Upgradeci-info(#14655)[jest-mock][BREAKING] RemoveMockFunctionMetadataType,MockFunctionMetadataandSpyInstancetypes (#14621)[@jest/reporters]Upgradeistanbul-lib-source-maps(#14924)[jest-schemas]Upgrade@sinclair/typebox(#14775)[jest-transform]Upgradewrite-file-atomic(#14274)[jest-util]Upgradepicomatchto 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]ObjectContainingsupportsymbolas key (#14414)[expect]Remove@types/nodefrom dependencies (#14385)[jest-core]Use workers in watch mode by default to avoid crashes (#14059 & #14085).[jest-reporters]Updateistanbul-lib-instrumentdependency 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 throughjest.isolateModulesAsync(#14397)Chore & Maintenance
[jest-changed-files, jest-circus, jest-console, @jest/core, @jest/runtime, @jest/transform]UseinvariantandnotEmptyfromjest-utilrather than own internal (#14366)New Contributors
- @karlnorling made their first contribution in #14401
- @vinicinbgs made their first contribution in #14388
- @panteleevnikita made their first contribution in #14433
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]AddworkerThreadsconfiguration option to allow using worker threads for parallelization (#13939)[jest-cli]ExportyargsOptions(#13970)[jest-config]AddopenHandlesTimeoutoption to configure possible open handles warning. (#13875)[@jest/create-cache-key-function]Allow passinglengthargument tocreateCacheKey()function and set its default value to16on Windows (#13827)[jest-message-util]Add support for AggregateError (#13946 & #13947)[jest-message-util]Add support for Error causes intestandit(#13935 & #13966)[jest-reporters]AddsummaryThresholdoption 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-timersasync APIs functionsadvanceTimersByTimeAsync(msToRun)(tickAsync(msToRun)),advanceTimersToNextTimerAsync(steps)(nextAsync),runAllTimersAsync(runAllAsync), andrunOnlyPendingTimersAsync(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 toctsandmtsTypeScript files to inline snapshots (#13975)[jest-worker]Addstartmethod to worker farms (#13937)[jest-worker]Support passing a URL as path to worker (#13982)Fixes
[babel-plugin-jest-hoist]Fix unwanted hoisting of nestedjestusages (#13952)[jest-circus]Send test case results fortodotests (#13915)[jest-circus]Update message printed on test timeout (#13830)[jest-circus]Avoid creating the word "testfalse" whentakesDoneCallbackisfalsein the message printed on test timeout AND updated timeouts test (#13954)[jest-environment-jsdom]Stop settingdocumenttonullon teardown (#13972)[@jest/expect-utils]UpdatetoStrictEqual()to be able to checkjest.fn().mock.calls(#13960)[@jest/test-result]AllowTestResultsProcessortype to return a Promise (#13950)Chore & Maintenance
[jest-snapshot]Remove dependency onjest-haste-map(#13977)New Contributors
- @frosas made their first contribution in #13932
- @akshitsinha made their first contribution in #13915
- @trajano made their first contribution in #13827
- @DercilioFontes made their first contribution in #13954
- @jsnajdr made their first contribution in #13952
- @SteveFlames made their first contribution in #13895
- @willc001 made their first contribution in #13970
- @benjaminhobbs made their first contribution in #13901
Full Changelog: v29.4.3...v29.5.0
29.4.3
Features
[expect]UpdatetoThrow()to be able to use errorcauses (#13606)[jest-core]allow to useworkerIdleMemoryLimitwith only 1 worker orrunInBandoption (#13846)[jest-message-util]Add support for errorcauses (#13868 & #13912)[jest-runtime]Revertimport assertionsfor JSON modules as it's been relegated to Stage 2 (#13911)Fixes
[@jest/expect-utils]subsetEqualityshould consider also an object's inherited string keys (#13824)[jest-mock]Clear mock state whenjest.restoreAllMocks()is called (#13867)[jest-mock]PreventmockImplementationOnceandmockReturnValueOncebleeding intowithImplementation(#13888)[jest-mock]Do not restore mocks whenjest.resetAllMocks()is called (#13866)New Contributors
- @brodo made their first contribution in #13868
- @DannyNemer made their first contribution in #13878
- @ghusse made their first contribution in #13846
- @broofa made their first contribution in #13911
Full Changelog: v29.4.2...v29.4.3
29.4.2
Features
[@jest/core]Instrument significant lifecycle events withperformance.mark()(#13859)Fixes
[expect, @jest/expect]Provide type ofactualas a generic argument toMatchersto allow better-typed extensions (#13848)[jest-circus]Added explicit mention of test failing becausedone()is not being called in error message (#13847)[jest-runtime]Handle CJS re-exports of node core modules from ESM (#13856)[jest-transform]Downgradewrite-file-atomicto v4 (#13853)[jest-worker]Ignore IPC messages not intended for Jest (#13543)Chore & Maintenance
[*]make sure to exclude.eslintcachefrom published module (#13832)[docs]Cleanup incorrect links in CHANGELOG.md (#13857)New Contributors
- @benjaminjkraft made their first contribution in #13848
- @LinusU made their first contribution in #13543
- @SuperSodaSea made their first contribution in #13857
- @kowalski made their first contribution in #13856
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]Useos.availableParallelismif available to calculate number of workers to spawn (#13738)[@jest/globals, jest-mock]Addjest.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]Addjest.isolateModulesAsyncfor scoped module initialization of asynchronous functions (#13680)[jest-runtime]Addjest.isEnvironmentTornDownfunction (#13741)[jest-test-result]Addedskippedandfocusedstatus toFormattedTestResult(#13700)[jest-transform]Support for asynchronouscreateTransformer(#13762)Fixes
[jest-environment-node]Fix non-configurable globals (#13687)[@jest/expect-utils]toMatchObjectshould handleSymbolproperties (#13639)[jest-mock]FixmockResetandresetAllMocksundefinedreturn value(#13692)[jest-resolve]Add global paths torequire.resolve.paths(#13633)[jest-resolve]Correct node core module detection when usingnode:specifiers (#13806)[jest-runtime]Support WASM files that import JS resources (#13608)[jest-runtime]Use thescriptTransformercache injest-runner(#13735)[jest-runtime]Enforce import assertions when importing JSON in ESM (#12755 & #13805)[jest-snapshot]Make sure to importbabeloutside of the sandbox (#13694)[jest-transform]Ensure the correct configuration is passed to preprocessors specified multiple times in thetransformoption (#13770)Chore & Maintenance
[@jest/fake-timers]Update@sinonjs/fake-timers(#13612)[docs]Improve custom puppeteer example to prevent worker warnings (#13619)New Contributors
- @lvqq made their first contribution in #13633
- @zjfresh made their first contribution in #13682
- @rnwst made their first contribution in #13635
- @overlookmotel made their first contribution in #13687
- @mmanciop made their first contribution in #13680
- @Jeroendevr made their first contribution in #13428
- @falsyvalues made their first contribution in #13619
- @vegerot made their first contribution in #13674
- @faustAbc made their first contribution in #13331
- @valentincostam made their first contribution in #13634
- @unional made their first contribution in #13721
- @andrewiggins made their first contribution in #13654
- @michal-kocarek made their first contribution in #13496
- @jdufresne made their first contribution in #13469
- @feliperli made their first contribution in #13692
- @bob-zs made their first contribution in #13740
- @MasterOdin made their first contribution in #13743
- @kalyncoose made their first contribution in #13746
- @arash-hacker made their first contribution in #13747
- @jomendez made their first contribution in #13741
- @coffeebeats made their first contribution in #13770
- @lachrist made their first contribution in #13762
- @lukeed made their first contribution in #13777
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-seedwill display the seed value in the report, and can be set via a CLI flag or through the config file (#13400)[jest-config]AddreadInitialConfigutility function (#13356)[jest-core]AllowtestResultsProcessorto be async (#13343)[@jest/environment, jest-environment-node, jest-environment-jsdom, jest-runtime]AddgetSeed()to thejestobject (#13400)[expect, @jest/expect-utils]AllowisAutility to take a type argument (#13355)[expect]ExposeAsyncExpectationResultandSyncExpectationResulttypes (#13411)Fixes
[babel-plugin-jest-hoist]IgnoreTSTypeQuerywhen checking for hoisted references (#13367)[jest-core]FixdetectOpenHandlesfalse positives for some special objects such asTLSWRAP(#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 ofeachtable correctly when the table is a tuple or array (#13381)[@jest/types]Rework typings to allow the*ReturnedWithmatchers to be called with no argument (#13385)Chore & Maintenance
[*]Update@babel/*deps, resulting in slightly different stack traces foreach(#13422)Performance
[jest-runner]Do not instrument v8 coverage data if coverage should not be collected (#13282)New Contributors
- @johannessjoberg made their first contribution in #13343
- @mitchhentgesspotify made their first contribution in #13282
- @Methuselah96 made their first contribution in #13409
- @jhwang98 made their first contribution in #13400
- @professorjrod made their first contribution in #13418
- @jesusarell made their first contribution in #13407
Full Changelog: v29.1.2...v29.2.0
29.0.2
Features
[jest-transform]ExposeTransformFactorytype (#13184)Fixes
[babel-plugin-jest-hoist]Support importedjestin mock factory (#13188)[jest-mock]Align the behavior and return type ofgenerateFromMetadatamethod (#13207)[jest-runtime]Supportjest.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 betweenMatcherContextMatcherUtilsandMatcherStatetypes (#13141)[jest-circus]Add support fortest.failing.each(#13142)[jest-config][BREAKING] MakesnapshotFormatdefault toescapeString: falseandprintBasicPrototype: false(#13036)[jest-config][BREAKING] Remove undocumentedcollectCoverageOnlyFromoption (#13156)[jest-environment-jsdom][BREAKING] Upgrade tojsdom@20(#13037, #13058)[@jest/globals]Addjest.Mocked,jest.MockedClass,jest.MockedFunctionandjest.MockedObjectutility types (#12727)[jest-mock][BREAKING] RefactorMocked*utility types.MaybeMockedDeepandMaybeMockedbecameMockedandMockedShallowrespectively; only deep mocked variants ofMockedClass,MockedFunctionandMockedObjectare exported (#13123, #13124)[jest-mock][BREAKING] Change the defaultjest.mockedhelper’s behavior to deep mocked (#13125)[jest-snapshot][BREAKING] Letbabelfind config when updating inline snapshots (#13150)[@jest/test-result, @jest/types][BREAKING] ReplaceBytesandMillisecondstypes withnumber(#13155)[jest-worker]AddsworkerIdleMemoryLimitoption 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] RemoveConvertAnsiplugin in favour ofjest-serializer-ansi-escapes(#13040)[pretty-format]Allow to opt out from sorting object keys withcompareKeys: 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]MakeprettierPathoptional inSnapshotState(#13149)[jest-snapshot]Fix parsing error from inline snapshot files withJSX(#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 setnfor--bail(#13128)[docs]Update Enzyme URL (#13166)[jest-leak-detector]Remove support forweak-napi(#13035)[jest-snapshot][BREAKING] RequirerootDiras argument toSnapshotState(#13150)New Contributors
- @makstech made their first contribution in #13049
- @sa2taka made their first contribution in #13055
- @matheus-rodrigues00 made their first contribution in #13090
- @lanpai made their first contribution in #13094
- @Zebreus made their first contribution in #13099
- @backmask made their first contribution in #13106
- @liuxingbaoyu made their first contribution in #13120
- @Trim made their first contribution in #13128
- @kkyusufk made their first contribution in #13142
- @KrishnaPG made their first contribution in #13157
- @dev-itsheng made their first contribution in #13115
- @jeffslofish made their first contribution in #13166
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
bracesfails to limit the number of characters it can handle, which could lead to Memory Exhaustion. Inlib/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:
3.0.3update eslint. lint, fix unit tests.Snyk js braces 6838727 (#40)fix tests, skip 1 test in test/braces.expandreadme bumpMerge pull request #37 from coderaiser/fix/vulnerabilityfeature: braces: add maxSymbols (https://github.com/micromatch/braces/issues/36#issuecomment-2110820796)fix: vulnerability (https://security.snyk.io/vuln/SNYK-JS-BRACES-6838727)remove funding fileupdate keepEscaping doc (#27)Failing test cases for issue \#29 (#30)Create FUNDING.yml
↗️ 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
- chore: move to using ubuntu 22 for actions by @mhdawson in #106
- feat: build wasm in common wasm-builder by @mhdawson in #105
New Contributors
Full Changelog: 1.4.1...2.0.0
1.4.2
What's Changed
- chore: move to using ubuntu 22 for actions by @mhdawson in #106
- feat: build wasm in common wasm-builder by @mhdawson in #105
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:
2.1.0Merge pull request #111 from mhdawson/fixup-config-optionsfix: restore configuration through env variablesMerge pull request #109 from nodejs/mhdawson-patch-1Update README.md2.0.0Update README.mdUpdate README.mdAdd instructions for creating a release to the readme.1.4.2feat: build wasm in common wasm-builder (#105)chore: move to using ubuntu 22 for actions (#106)1.4.1rework browser handling for buffer decoding (#104)Fix environment detection in web worker (#103)1.4.0feat: add initSync() to initialize WASM synchronously (#100)Revert build changes (#95)tests: fix loading wasm when targeting external deps (#94)1.3.1fix: cannot resolve path when build with EXTERNAL_PATH (#93)1.3.0Support building for externally shared js builtins (#91)feat: consistent esm syntax err (#90)Parametrize WASM compilation process (#87)1.2.3Add `.d.mts` file (#85)meta: fix package repo links (#82)doc: project status in readme (#80)Bump minimist from 1.2.5 to 1.2.6 (#68)ci: transfer prep (#66)
↗️ cliui (indirect, 7.0.4 → 8.0.1) · Repo · Changelog
Release Notes
8.0.1
8.0.1 (2022-10-01)
Bug Fixes
8.0.0
8.0.0 (2022-09-30)
⚠ BREAKING CHANGES
- deps: drop Node 10 to release CVE-2021-3807 patch (#122)
Bug Fixes
- deps: drop Node 10 to release CVE-2021-3807 patch (#122) (f156571)
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:
chore(release): 7.0.6chore: upgrade standard-versionfix: update cross-spawn version to 7.0.5 in package-lock.jsonchore: fix build status badgechore(release): 7.0.5fix: fix escaping bug introduced by backtrackingchore: remove codecovchore: replace travis with github workflowschore(release): 7.0.4fix: disable regexp backtracking (#160)chore: fix tests in recent node js versionschore: convert package lockchore: remove unused argument (#156)chore: add travis jobs on ppc64le (#142)chore: fix audit warning
↗️ dedent (indirect, 0.7.0 → 1.6.0) · Repo · Changelog
Release Notes
1.6.0
What's Changed
New Contributors
Full Changelog: v1.5.3...v1.6.0
1.5.3
What's Changed
- fix: remove engines and provenance requirements by @JoshuaKGoldberg in #93
Full Changelog: v1.5.2...v1.5.3
1.5.2
What's Changed
- chore: remove files related to Flow by @yinm in #77
- build: onboarded to create-typescript-app (mostly) by @JoshuaKGoldberg in #55
- chore: fix special characters escaping issue link in README by @auvred in #82
- chore: replace last yarn references with pnpm by @JoshuaKGoldberg in #86
- docs: add explicit install command to README.md by @JoshuaKGoldberg in #84
- fix: switch babel-plugin-macros to a peer dependency (again) by @JoshuaKGoldberg in #89
- build(deps-dev): bump @babel/traverse from 7.22.8 to 7.23.6 by @dependabot in #87
- fix: \n should be changed to \n only when escapeSpecialCharacters is set by @fuenfundachtzig in #91
New Contributors
- @yinm made their first contribution in #77
- @auvred made their first contribution in #82
- @dependabot made their first contribution in #87
- @fuenfundachtzig made their first contribution in #91
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
1.3.0
- fix: add missing exports field to package.json (#59)
1.0.0
This version was given the
betatag 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:
1.6.0 (#98)feat: add `trimWhitespace` option (#97)fix: remove engines and provenance requirements (#93)fix: \\n should be changed to \n only when escapeSpecialCharacters is set (#91)build(deps-dev): bump @babel/traverse from 7.22.8 to 7.23.6 (#87)fix: switch babel-plugin-macros to a peer dependency (again) (#89)docs: add explicit install command to README.md (#84)chore: replace last yarn references with pnpm (#86)chore: fix special characters escaping issue link in README (#82)build: onboarded to create-typescript-app (mostly) (#55)chore: remove files related to Flow (#77)docs: add PR number to CHANGELOG.md for 1.5.1 (#75)1.5.1 (#74)fix: add missing dedent.d.mts entry to package.json files (#73)docs: added missing CHANGELOG.md entries for 1.4.0, 1.5.0 (#71)1.5.0 (#70)feat: add options with escapeSpecialCharacters (#65)Bumped version to 1.4.0 (#68)fix: fix missing ESM type definition file (#67)docs: add CHANGELOG.md entry for 1.3.0 (#66)fix: consume first level of escaping of `$` and `{` characters (#46)1.3.0 (#64)fix: add missing exports field to package.json (#59)build: add missing babel-plugin-macros devDependency (#62)1.2.0 (#61)fix(dependencies): move babel-plugin-macros to optional peer (#60)docs: clarify 1.x intention in CHANGELOG.md (#57)docs: added small manual CHANGELOG.md (#56)1.1.0 (#53)build: convert dedent.ts and tests to TypeScript (#51)1.0.2 (#49)fix: update types (#44)build: bumped to v1.0.1 (#42)Merge pull request #40 from JoshuaKGoldberg/add-module-exportsfix: add babel-plugin-add-module-exportsMerge pull request #32 from cometkim/masterrm dist/dedent.jsMerge branch 'master'Merge pull request #38 from JoshuaKGoldberg/bump-dev-dependencies-may-2023build: re-run build to refresh dist/dedent.jsversion: 0.8.0-betaMerge pull request #28 from adrianjost/support-tabsincorporate pr feedback - improve speedfix an unintended code changeFixed a type declarations to be resolved automaticallyFixed a filefix(macro): wrong import pathFixed type declaration file pathmove babel-plugin-macros to production depdenciesUpdate packageenable tab compatbilityfeat(macro): add a /macro for babel-macros (#19):art: prettierifyUse snapshots for testsAdd flow, convert to ES6 module
↗️ 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:
4.3.1Get is-plain-object example test passingChangelog for 4.3.1Merge pull request #239 from design-media-sf/missing-typeMerge pull request #257 from ha-ku/masterFix isPlainObject require syntax in isMergeableObject example from readme.md according to https://github.com/jonschlinkert/is-plain-object#usage.4.3.0wtf npmChangelog for 4.3.0new lockfile version hoorayMerge pull request #252 from wildlyinaccurate/patch-1Merge pull request #253 from tuananh/patch-1ci: add node v18 to test matrixPrevent getEnumerableOwnPropertySymbols from throwing when target.propertyIsEnumerable is undefinedMerge pull request #235 from phanect/travis-nodejs-versionsRe-add node v8 & v10 to testingAdd ArrayMergeOptions interfaceci: update Node.js versions to test on Travis CIeditorconfigMerge branch 'master' of github.com:TehShrike/deepmerge
↗️ electron-to-chromium (indirect, 1.4.96 → 1.5.211) · 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
0.13.0
0.12.1
0.12.0
0.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:
0.13.1Fix missing file in package (#104)0.13.0Properly clean up listener storage (#103)0.12.1Use a different approach to prevent consumers from emitting meta events (#98)0.12.0Make `Emittery.mixin` type support arguments in constructorAdd an `off` method to the promise returned from `.once()` (#100)Meta tweaks0.11.0Allow event names to be numbers (#96)
↗️ 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
- Support TypeScript’s
nodenextmodule resolution mode (#10): d872fbdThank you @NMinhNguyen
Chores
- Add
licenses.devbadge to README: 02dcb8b- Update CI matrix versions: 3c916b2
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.
↗️ 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
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:
4.2.11Add EBUSY to handled error codes for windows directory renameupdate and improve tests somewhat4.2.10fix spurious ENOTEMPTY in test on windows ciavoid spurious EBUSY in windows CI testsci: output raw tap from testactually fix memory leak test failing spuriouslyfix memory leak test failing spuriouslydo not try to patch missing fs functionsAvoid setPrototypeOf if prototype is undefinedinstall with npm 8fix: fs.readdir() on ancient nodes that don't know about optionschore: add copyright year to licenseci: makework
↗️ import-local (indirect, 3.1.0 → 3.2.0) · Repo
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
- istanbuljs/v8-to-istanbul#233 (288888f)
- merge ranges properly when contained by other ranges in set (#750) (288888f)
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
6.0.2 (from changelog)
Bug Fixes
- deps: update deps addressing CVE-2023-45133 (e67a405)
6.0.1 (from changelog)
Bug Fixes
6.0.0 (from changelog)
⚠ BREAKING CHANGES
- deps: minimum Node version bumped to 10.
Bug Fixes
- deps: upgrade semver CVE-2022-25883 (#731) (d8399f3)
5.2.1 (from changelog)
Bug Fixes
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
- deps: update make-dir CVE-2022-25883 (eab82a9)
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
5.0.5 (from changelog)
Bug Fixes
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
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]AllowtestMatchto take a string value[jest-worker]LetworkerIdleMemoryLimitaccept 0 to always restart worker child processesFixes
[expect]Fixbiginterror (#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 thedefaultAsyncResolver(#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 deprecatejest-replpackage (#15673)[jest-resolver]Replace customisBuiltinModulewith node'sisBuiltin(#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.0and follow the migration guide: Upgrading from Jest 29 to 30.Features
[*]RenamedglobalsCleanupModetoglobalsCleanupand--waitNextEventLoopTurnForUnhandledRejectionEventsto--waitForUnhandledRejections[expect]AddArrayOfasymmetric matcher for validating array elements. (#15567)[babel-jest]Add optionexcludeJestPresetto allow opting out ofbabel-preset-jest(#15164)[expect]Revert #15038 to fixexpect(fn).toHaveBeenCalledWith(expect.objectContaining(...))when there are multiple calls (#15508)[jest-circus, jest-cli, jest-config]AddwaitNextEventLoopTurnForUnhandledRejectionEventsflag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)[jest-circus]Add awaitBeforeRetryoption tojest.retryTimes(#14738)[jest-circus]Add aretryImmediatelyoption tojest.retryTimes(#14696)[jest-circus, jest-jasmine2]AllowsetupFilesAfterEnvto export an async function (#10962)[jest-circus, jest-test-result]AddstartedAttimestamp inTestCaseResultObjectwithinonTestCaseResult(#15145)[jest-cli]ExportbuildArgv(#15310)[jest-config][BREAKING] Addmtsandctsto defaultmoduleFileExtensionsconfig (#14369)[jest-config][BREAKING] UpdatetestMatchandtestRegexdefault option for supportingmjs,cjs,mts, andcts(#14584)[jest-config]Loads config file from provided path inpackage.json(#14044)[jest-config]Allow loadingjest.config.ctsfiles (#14070)[jest-config]ShowrootDirin error message when apresetfails to load (#15194)[jest-config]Support loading TS config files usingesbuild-registervia 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]AddperfStatsto surface test setup overhead (#14622)[@jest/core][BREAKING] Changed--filterto accept an object with shape{ filtered: Array<string> }to match documentation (#13319)[@jest/core]Support--outputFileoption for--listTests(#14980)[@jest/core]Stringify Errors properly with--jsonflag (#15329)[@jest/core, @jest/test-sequencer][BREAKING] ExposesglobalConfig&contextstoTestSequencer(#14535, & #14543)[jest-each]Introduce%$option to add number of the test to its title (#14710)[@jest/environment][BREAKING] Remove deprecatedjest.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 thejsdomenvironment, allowing usage of custom versions of JSDOM (#14717)[jest-environment-node]Update jest environment with dispose symbolsSymbol(#14888 & #14909)[expect, @jest/expect][BREAKING] Add type inference for function parameters inCalledWithassertions (#15129)[@jest/expect-utils]Properly compare all types ofTypedArrays (#15178)[@jest/fake-timers][BREAKING] Upgrade@sinonjs/fake-timersto v13 (#14544 & #15470)[@jest/fake-timers]Exposing new modern timers functionadvanceTimersToFrame()which advances all timers by the needed milliseconds to execute callbacks currently scheduled withrequestAnimationFrame(#14598)[jest-matcher-utils]AddSERIALIZABLE_PROPERTIESto allow custom serialization of objects (#14893)[jest-mock]Add support for the Explicit Resource Management proposal to use theusingkeyword withjest.spyOn(object, methodName)(#14895)[jest-reporters]Add support for DEC mode 2026 (#15008)[jest-resolver]Supportfile://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 functionjest.advanceTimersToFrame()from@jest/fake-timers(#14598)[jest-runtime]Supportimport.meta.filenameandimport.meta.dirname(available from Node 20.11) (#14854)[jest-runtime]Supportimport.meta.resolve(#14930)[jest-runtime][BREAKING] Make it mandatory to passglobalConfigto theRuntimeconstructor (#15044)[jest-runtime]Addunstable_unmockModule(#15080)[jest-runtime]AddonGenerateMocktransformer callback for auto generated callbacks (#15433 & #15482)[jest-runtime][BREAKING] Usevm.compileFunctionovervm.Script(#15461)[@jest/schemas]Upgrade@sinclair/typeboxto v0.34 (#15450)[@jest/types]test.each(): Accept a readonly (as const) table properly (#14565)[@jest/types]Improve argument type inference passed totestanddescribecallback functions fromeachtables (#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 fromjest-snapshotinto its own package (#15095)[pretty-format][BREAKING] Do not render empty string children ('') in React plugin (#14470)Fixes
[expect]ShowAggregateErrorto display (#15346)[*]Replaceexitwithexit-x(#15399)[babel-plugin-jest-hoist]Usedenylistinstead of the deprecatedblacklistfor Babel 8 support (#14109)[babel-plugin-jest-hoist]Do not rely on buggy Babel behaviour (#15415)[expect]Check error instance type fortoThrow/toThrowError(#14576)[expect]Improve diff for failingexpect.objectContaining(#15038)[expect]UseArray.isArrayto check if an array is anArray(#15101)[expect]Fix Errorcauseassertion errors (#15339)[jest-changed-files]Print underlying errors when VCS commands fail (#15052)[jest-changed-files]Abortsl rootcall if output resembles a steam locomotive (#15053)[jest-circus][BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)[jest-circus]Replace recursivemakeTestResultsimplementation with iterative one (#14760)[jest-circus]Omitexpect.hasAssertions()errors if a test already has errors (#14866)[jest-circus, jest-expect, jest-snapshot]Passtest.failingtests 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 respectrunInBandoption (#14578)[jest-config]SupporttestTimeoutin project config (#14697)[jest-config]SupportcoverageReportersin project config (#14697)[jest-config]Allowreportersin project config (#14768)[jest-config]Allow Node16/NodeNext/BundlermoduleResolutionin project's tsconfig (#14739)[@jest/create-cache-key-function]Correct the return type ofcreateCacheKey(#15159)[jest-each]Allow$keypathtemplates withnullorundefinedvalues (#14831)[@jest/expect-utils]Fix comparison ofDataView(#14408)[@jest/expect-utils][BREAKING] exclude non-enumerable in object matching (#14670)[@jest/expect-utils]Fix comparison ofURL(#14672)[@jest/expect-utils]CheckSymbolproperties 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 multiplehasteImplModulePaths (#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_importCoreModelso required core module is consistent if modified while loading (#15077)[jest-schemas, jest-types][BREAKING] Fix type oftestFailureExitCodeconfig option(#15232)[jest-util]Make sureisInteractiveworks in a browser (#14552)[pretty-format][BREAKING] PrintArrayBufferandDataViewcorrectly (#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
testPathPatternconfiguration option totestPathPatterns, which now takes a list of patterns instead of the regex.- [BREAKING]
--testPathPatternis now--testPathPatterns- [BREAKING] Specifying
testPathPatternswhen programmatically callingwatchmust be specified asnew TestPathPatterns(patterns), whereTestPathPatternscan be imported from@jest/pattern[jest-reporters, jest-runner]Unhandled errors without stack get correctly logged to console (#14619)[jest-util]Always loadmjsfiles withimport(#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 whereObjectContainingmatched non-object values. ([#15463])(#15463).
- Adds a
conditional/checkto ensure the argument passed toexpectis an object.- Add unit tests for new
ObjectContainingbehavior.- Remove
invalid/wrongtest case assertions forObjectContaining.[jest-worker]Addresses incorrect state on exit (#15610)Performance
[*][BREAKING] Bundle all of Jest's modules intoindex.js(#12348, #14550 & #14661)[jest-haste-map]Only spawn one process to check forwatchmaninstallation (#14826)[jest-runner]Better cleanupsource-map-supportafter 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 ofmicromatchto^4.0.7(#15082)[*][BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)[*][BREAKING] Drop support fortypescript@4.3, minimum version is now5.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 toglob@10(#14509)[*]UseTypeErroroverErrorwhere appropriate (#14799)[docs]Fix typos inCHANGELOG.mdandpackages/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/coreto^7.11(#14109)[babel-jest, @jest/transform]Updatebabel-plugin-istanbulto v6 (#15156)[babel-plugin-jest-hoist]Move unnecessarydependenciestodevDependencies(#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--initargument (#14490)[jest-config, @jest/core, jest-util]Upgradeci-info(#14655)[jest-mock][BREAKING] RemoveMockFunctionMetadataType,MockFunctionMetadataandSpyInstancetypes (#14621)[@jest/reporters]Upgradeistanbul-lib-source-maps(#14924)[jest-schemas]Upgrade@sinclair/typebox(#14775)[jest-transform]Upgradewrite-file-atomic(#14274)[jest-util]Upgradepicomatchto 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]Addnpm init/yarn createinitialiser for Jest projects (#14465)[jest-validate]Allow deprecation warnings for unknown options (#14499)Fixes
[jest-resolver]Replace unmatched capture groups inmoduleNameMapperwith empty string instead ofundefined(#14507)[jest-snapshot]Allow for strings as well as template literals in inline snapshots (#14465)[@jest/test-sequencer]Calculate test runtime ifperStats.durationis missing (#14473)Performance
[@jest/create-cache-key-function]Cache access ofNODE_ENVandBABEL_ENV(#14455)Chore & Maintenance
[jest-cli]Move internal config initialisation logic to thecreate-jestpackage (#14465)New Contributors
- @bawjensen made their first contribution in #14465
- @malaviya-parth made their first contribution in #14467
- @niklasholm made their first contribution in #14507
Full Changelog: v29.6.4...v29.7.0
29.6.3
Fixes
[expect, @jest/expect-utils]ObjectContainingsupportsymbolas key (#14414)[expect]Remove@types/nodefrom dependencies (#14385)[jest-core]Use workers in watch mode by default to avoid crashes (#14059 & #14085).[jest-reporters]Updateistanbul-lib-instrumentdependency 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 throughjest.isolateModulesAsync(#14397)Chore & Maintenance
[jest-changed-files, jest-circus, jest-console, @jest/core, @jest/runtime, @jest/transform]UseinvariantandnotEmptyfromjest-utilrather than own internal (#14366)New Contributors
- @karlnorling made their first contribution in #14401
- @vinicinbgs made their first contribution in #14388
- @panteleevnikita made their first contribution in #14433
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.2) · Repo · Changelog
Release Notes
Too many releases to show here. View the full release notes.
↗️ jest-cli (indirect, 28.1.3 → 30.1.2) · Repo · Changelog
Release Notes
Too many releases to show here. View the full release notes.
↗️ jest-config (indirect, 28.1.3 → 30.1.2) · Repo · Changelog
Release Notes
Too many releases to show here. View the full release notes.
↗️ jest-diff (indirect, 28.1.3 → 30.1.2) · Repo · Changelog
Release Notes
Too many releases to show here. View the full release notes.
↗️ jest-docblock (indirect, 28.1.1 → 30.0.1) · Repo · Changelog
Release Notes
30.0.1
What's Changed
Features
[jest-resolver]Implement thedefaultAsyncResolver(#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 deprecatejest-replpackage (#15673)[jest-resolver]Replace customisBuiltinModulewith node'sisBuiltin(#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.0and follow the migration guide: Upgrading from Jest 29 to 30.Features
[*]RenamedglobalsCleanupModetoglobalsCleanupand--waitNextEventLoopTurnForUnhandledRejectionEventsto--waitForUnhandledRejections[expect]AddArrayOfasymmetric matcher for validating array elements. (#15567)[babel-jest]Add optionexcludeJestPresetto allow opting out ofbabel-preset-jest(#15164)[expect]Revert #15038 to fixexpect(fn).toHaveBeenCalledWith(expect.objectContaining(...))when there are multiple calls (#15508)[jest-circus, jest-cli, jest-config]AddwaitNextEventLoopTurnForUnhandledRejectionEventsflag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)[jest-circus]Add awaitBeforeRetryoption tojest.retryTimes(#14738)[jest-circus]Add aretryImmediatelyoption tojest.retryTimes(#14696)[jest-circus, jest-jasmine2]AllowsetupFilesAfterEnvto export an async function (#10962)[jest-circus, jest-test-result]AddstartedAttimestamp inTestCaseResultObjectwithinonTestCaseResult(#15145)[jest-cli]ExportbuildArgv(#15310)[jest-config][BREAKING] Addmtsandctsto defaultmoduleFileExtensionsconfig (#14369)[jest-config][BREAKING] UpdatetestMatchandtestRegexdefault option for supportingmjs,cjs,mts, andcts(#14584)[jest-config]Loads config file from provided path inpackage.json(#14044)[jest-config]Allow loadingjest.config.ctsfiles (#14070)[jest-config]ShowrootDirin error message when apresetfails to load (#15194)[jest-config]Support loading TS config files usingesbuild-registervia 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]AddperfStatsto surface test setup overhead (#14622)[@jest/core][BREAKING] Changed--filterto accept an object with shape{ filtered: Array<string> }to match documentation (#13319)[@jest/core]Support--outputFileoption for--listTests(#14980)[@jest/core]Stringify Errors properly with--jsonflag (#15329)[@jest/core, @jest/test-sequencer][BREAKING] ExposesglobalConfig&contextstoTestSequencer(#14535, & #14543)[jest-each]Introduce%$option to add number of the test to its title (#14710)[@jest/environment][BREAKING] Remove deprecatedjest.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 thejsdomenvironment, allowing usage of custom versions of JSDOM (#14717)[jest-environment-node]Update jest environment with dispose symbolsSymbol(#14888 & #14909)[expect, @jest/expect][BREAKING] Add type inference for function parameters inCalledWithassertions (#15129)[@jest/expect-utils]Properly compare all types ofTypedArrays (#15178)[@jest/fake-timers][BREAKING] Upgrade@sinonjs/fake-timersto v13 (#14544 & #15470)[@jest/fake-timers]Exposing new modern timers functionadvanceTimersToFrame()which advances all timers by the needed milliseconds to execute callbacks currently scheduled withrequestAnimationFrame(#14598)[jest-matcher-utils]AddSERIALIZABLE_PROPERTIESto allow custom serialization of objects (#14893)[jest-mock]Add support for the Explicit Resource Management proposal to use theusingkeyword withjest.spyOn(object, methodName)(#14895)[jest-reporters]Add support for DEC mode 2026 (#15008)[jest-resolver]Supportfile://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 functionjest.advanceTimersToFrame()from@jest/fake-timers(#14598)[jest-runtime]Supportimport.meta.filenameandimport.meta.dirname(available from Node 20.11) (#14854)[jest-runtime]Supportimport.meta.resolve(#14930)[jest-runtime][BREAKING] Make it mandatory to passglobalConfigto theRuntimeconstructor (#15044)[jest-runtime]Addunstable_unmockModule(#15080)[jest-runtime]AddonGenerateMocktransformer callback for auto generated callbacks (#15433 & #15482)[jest-runtime][BREAKING] Usevm.compileFunctionovervm.Script(#15461)[@jest/schemas]Upgrade@sinclair/typeboxto v0.34 (#15450)[@jest/types]test.each(): Accept a readonly (as const) table properly (#14565)[@jest/types]Improve argument type inference passed totestanddescribecallback functions fromeachtables (#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 fromjest-snapshotinto its own package (#15095)[pretty-format][BREAKING] Do not render empty string children ('') in React plugin (#14470)Fixes
[expect]ShowAggregateErrorto display (#15346)[*]Replaceexitwithexit-x(#15399)[babel-plugin-jest-hoist]Usedenylistinstead of the deprecatedblacklistfor Babel 8 support (#14109)[babel-plugin-jest-hoist]Do not rely on buggy Babel behaviour (#15415)[expect]Check error instance type fortoThrow/toThrowError(#14576)[expect]Improve diff for failingexpect.objectContaining(#15038)[expect]UseArray.isArrayto check if an array is anArray(#15101)[expect]Fix Errorcauseassertion errors (#15339)[jest-changed-files]Print underlying errors when VCS commands fail (#15052)[jest-changed-files]Abortsl rootcall if output resembles a steam locomotive (#15053)[jest-circus][BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)[jest-circus]Replace recursivemakeTestResultsimplementation with iterative one (#14760)[jest-circus]Omitexpect.hasAssertions()errors if a test already has errors (#14866)[jest-circus, jest-expect, jest-snapshot]Passtest.failingtests 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 respectrunInBandoption (#14578)[jest-config]SupporttestTimeoutin project config (#14697)[jest-config]SupportcoverageReportersin project config (#14697)[jest-config]Allowreportersin project config (#14768)[jest-config]Allow Node16/NodeNext/BundlermoduleResolutionin project's tsconfig (#14739)[@jest/create-cache-key-function]Correct the return type ofcreateCacheKey(#15159)[jest-each]Allow$keypathtemplates withnullorundefinedvalues (#14831)[@jest/expect-utils]Fix comparison ofDataView(#14408)[@jest/expect-utils][BREAKING] exclude non-enumerable in object matching (#14670)[@jest/expect-utils]Fix comparison ofURL(#14672)[@jest/expect-utils]CheckSymbolproperties 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 multiplehasteImplModulePaths (#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_importCoreModelso required core module is consistent if modified while loading (#15077)[jest-schemas, jest-types][BREAKING] Fix type oftestFailureExitCodeconfig option(#15232)[jest-util]Make sureisInteractiveworks in a browser (#14552)[pretty-format][BREAKING] PrintArrayBufferandDataViewcorrectly (#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
testPathPatternconfiguration option totestPathPatterns, which now takes a list of patterns instead of the regex.- [BREAKING]
--testPathPatternis now--testPathPatterns- [BREAKING] Specifying
testPathPatternswhen programmatically callingwatchmust be specified asnew TestPathPatterns(patterns), whereTestPathPatternscan be imported from@jest/pattern[jest-reporters, jest-runner]Unhandled errors without stack get correctly logged to console (#14619)[jest-util]Always loadmjsfiles withimport(#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 whereObjectContainingmatched non-object values. ([#15463])(#15463).
- Adds a
conditional/checkto ensure the argument passed toexpectis an object.- Add unit tests for new
ObjectContainingbehavior.- Remove
invalid/wrongtest case assertions forObjectContaining.[jest-worker]Addresses incorrect state on exit (#15610)Performance
[*][BREAKING] Bundle all of Jest's modules intoindex.js(#12348, #14550 & #14661)[jest-haste-map]Only spawn one process to check forwatchmaninstallation (#14826)[jest-runner]Better cleanupsource-map-supportafter 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 ofmicromatchto^4.0.7(#15082)[*][BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)[*][BREAKING] Drop support fortypescript@4.3, minimum version is now5.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 toglob@10(#14509)[*]UseTypeErroroverErrorwhere appropriate (#14799)[docs]Fix typos inCHANGELOG.mdandpackages/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/coreto^7.11(#14109)[babel-jest, @jest/transform]Updatebabel-plugin-istanbulto v6 (#15156)[babel-plugin-jest-hoist]Move unnecessarydependenciestodevDependencies(#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--initargument (#14490)[jest-config, @jest/core, jest-util]Upgradeci-info(#14655)[jest-mock][BREAKING] RemoveMockFunctionMetadataType,MockFunctionMetadataandSpyInstancetypes (#14621)[@jest/reporters]Upgradeistanbul-lib-source-maps(#14924)[jest-schemas]Upgrade@sinclair/typebox(#14775)[jest-transform]Upgradewrite-file-atomic(#14274)[jest-util]Upgradepicomatchto 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]Addnpm init/yarn createinitialiser for Jest projects (#14465)[jest-validate]Allow deprecation warnings for unknown options (#14499)Fixes
[jest-resolver]Replace unmatched capture groups inmoduleNameMapperwith empty string instead ofundefined(#14507)[jest-snapshot]Allow for strings as well as template literals in inline snapshots (#14465)[@jest/test-sequencer]Calculate test runtime ifperStats.durationis missing (#14473)Performance
[@jest/create-cache-key-function]Cache access ofNODE_ENVandBABEL_ENV(#14455)Chore & Maintenance
[jest-cli]Move internal config initialisation logic to thecreate-jestpackage (#14465)New Contributors
- @bawjensen made their first contribution in #14465
- @malaviya-parth made their first contribution in #14467
- @niklasholm made their first contribution in #14507
Full Changelog: v29.6.4...v29.7.0
29.6.3
Fixes
[expect, @jest/expect-utils]ObjectContainingsupportsymbolas key (#14414)[expect]Remove@types/nodefrom dependencies (#14385)[jest-core]Use workers in watch mode by default to avoid crashes (#14059 & #14085).[jest-reporters]Updateistanbul-lib-instrumentdependency 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 throughjest.isolateModulesAsync(#14397)Chore & Maintenance
[jest-changed-files, jest-circus, jest-console, @jest/core, @jest/runtime, @jest/transform]UseinvariantandnotEmptyfromjest-utilrather than own internal (#14366)New Contributors
- @karlnorling made their first contribution in #14401
- @vinicinbgs made their first contribution in #14388
- @panteleevnikita made their first contribution in #14433
Full Changelog: v29.6.2...v29.6.3
29.4.3
Features
[expect]UpdatetoThrow()to be able to use errorcauses (#13606)[jest-core]allow to useworkerIdleMemoryLimitwith only 1 worker orrunInBandoption (#13846)[jest-message-util]Add support for errorcauses (#13868 & #13912)[jest-runtime]Revertimport assertionsfor JSON modules as it's been relegated to Stage 2 (#13911)Fixes
[@jest/expect-utils]subsetEqualityshould consider also an object's inherited string keys (#13824)[jest-mock]Clear mock state whenjest.restoreAllMocks()is called (#13867)[jest-mock]PreventmockImplementationOnceandmockReturnValueOncebleeding intowithImplementation(#13888)[jest-mock]Do not restore mocks whenjest.resetAllMocks()is called (#13866)New Contributors
- @brodo made their first contribution in #13868
- @DannyNemer made their first contribution in #13878
- @ghusse made their first contribution in #13846
- @broofa made their first contribution in #13911
Full Changelog: v29.4.2...v29.4.3
29.4.2
Features
[@jest/core]Instrument significant lifecycle events withperformance.mark()(#13859)Fixes
[expect, @jest/expect]Provide type ofactualas a generic argument toMatchersto allow better-typed extensions (#13848)[jest-circus]Added explicit mention of test failing becausedone()is not being called in error message (#13847)[jest-runtime]Handle CJS re-exports of node core modules from ESM (#13856)[jest-transform]Downgradewrite-file-atomicto v4 (#13853)[jest-worker]Ignore IPC messages not intended for Jest (#13543)Chore & Maintenance
[*]make sure to exclude.eslintcachefrom published module (#13832)[docs]Cleanup incorrect links in CHANGELOG.md (#13857)New Contributors
- @benjaminjkraft made their first contribution in #13848
- @LinusU made their first contribution in #13543
- @SuperSodaSea made their first contribution in #13857
- @kowalski made their first contribution in #13856
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-seedwill display the seed value in the report, and can be set via a CLI flag or through the config file (#13400)[jest-config]AddreadInitialConfigutility function (#13356)[jest-core]AllowtestResultsProcessorto be async (#13343)[@jest/environment, jest-environment-node, jest-environment-jsdom, jest-runtime]AddgetSeed()to thejestobject (#13400)[expect, @jest/expect-utils]AllowisAutility to take a type argument (#13355)[expect]ExposeAsyncExpectationResultandSyncExpectationResulttypes (#13411)Fixes
[babel-plugin-jest-hoist]IgnoreTSTypeQuerywhen checking for hoisted references (#13367)[jest-core]FixdetectOpenHandlesfalse positives for some special objects such asTLSWRAP(#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 ofeachtable correctly when the table is a tuple or array (#13381)[@jest/types]Rework typings to allow the*ReturnedWithmatchers to be called with no argument (#13385)Chore & Maintenance
[*]Update@babel/*deps, resulting in slightly different stack traces foreach(#13422)Performance
[jest-runner]Do not instrument v8 coverage data if coverage should not be collected (#13282)New Contributors
- @johannessjoberg made their first contribution in #13343
- @mitchhentgesspotify made their first contribution in #13282
- @Methuselah96 made their first contribution in #13409
- @jhwang98 made their first contribution in #13400
- @professorjrod made their first contribution in #13418
- @jesusarell made their first contribution in #13407
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 betweenMatcherContextMatcherUtilsandMatcherStatetypes (#13141)[jest-circus]Add support fortest.failing.each(#13142)[jest-config][BREAKING] MakesnapshotFormatdefault toescapeString: falseandprintBasicPrototype: false(#13036)[jest-config][BREAKING] Remove undocumentedcollectCoverageOnlyFromoption (#13156)[jest-environment-jsdom][BREAKING] Upgrade tojsdom@20(#13037, #13058)[@jest/globals]Addjest.Mocked,jest.MockedClass,jest.MockedFunctionandjest.MockedObjectutility types (#12727)[jest-mock][BREAKING] RefactorMocked*utility types.MaybeMockedDeepandMaybeMockedbecameMockedandMockedShallowrespectively; only deep mocked variants ofMockedClass,MockedFunctionandMockedObjectare exported (#13123, #13124)[jest-mock][BREAKING] Change the defaultjest.mockedhelper’s behavior to deep mocked (#13125)[jest-snapshot][BREAKING] Letbabelfind config when updating inline snapshots (#13150)[@jest/test-result, @jest/types][BREAKING] ReplaceBytesandMillisecondstypes withnumber(#13155)[jest-worker]AddsworkerIdleMemoryLimitoption 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] RemoveConvertAnsiplugin in favour ofjest-serializer-ansi-escapes(#13040)[pretty-format]Allow to opt out from sorting object keys withcompareKeys: 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]MakeprettierPathoptional inSnapshotState(#13149)[jest-snapshot]Fix parsing error from inline snapshot files withJSX(#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 setnfor--bail(#13128)[docs]Update Enzyme URL (#13166)[jest-leak-detector]Remove support forweak-napi(#13035)[jest-snapshot][BREAKING] RequirerootDiras argument toSnapshotState(#13150)New Contributors
- @makstech made their first contribution in #13049
- @sa2taka made their first contribution in #13055
- @matheus-rodrigues00 made their first contribution in #13090
- @lanpai made their first contribution in #13094
- @Zebreus made their first contribution in #13099
- @backmask made their first contribution in #13106
- @liuxingbaoyu made their first contribution in #13120
- @Trim made their first contribution in #13128
- @kkyusufk made their first contribution in #13142
- @KrishnaPG made their first contribution in #13157
- @dev-itsheng made their first contribution in #13115
- @jeffslofish made their first contribution in #13166
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.
↗️ 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 activeFixes
- `[jest-snapshot-utils] Fix deprecated goo.gl snapshot guide link not getting replaced with fully canonical URL (#15787)
[jest-circus]Fixit.concurrentnot working withdescribe.skip(#15765)[jest-snapshot]Fix mangled inline snapshot updates when used with Prettier 3 and CRLF line endings[jest-runtime]Importing from@jest/globalsin more than one file no longer breaks relative paths (#15772)Chore
[expect]Update docblock fortoContain()to display info on substring check (#15789)
30.0.5 (from changelog)
Features
[jest-config]AllowtestMatchto take a string value[jest-worker]LetworkerIdleMemoryLimitaccept 0 to always restart worker child processesFixes
[expect]Fixbiginterror (#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 thedefaultAsyncResolver(#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 deprecatejest-replpackage (#15673)[jest-resolver]Replace customisBuiltinModulewith node'sisBuiltin(#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.0and follow the migration guide: Upgrading from Jest 29 to 30.Features
[*]RenamedglobalsCleanupModetoglobalsCleanupand--waitNextEventLoopTurnForUnhandledRejectionEventsto--waitForUnhandledRejections[expect]AddArrayOfasymmetric matcher for validating array elements. (#15567)[babel-jest]Add optionexcludeJestPresetto allow opting out ofbabel-preset-jest(#15164)[expect]Revert #15038 to fixexpect(fn).toHaveBeenCalledWith(expect.objectContaining(...))when there are multiple calls (#15508)[jest-circus, jest-cli, jest-config]AddwaitNextEventLoopTurnForUnhandledRejectionEventsflag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)[jest-circus]Add awaitBeforeRetryoption tojest.retryTimes(#14738)[jest-circus]Add aretryImmediatelyoption tojest.retryTimes(#14696)[jest-circus, jest-jasmine2]AllowsetupFilesAfterEnvto export an async function (#10962)[jest-circus, jest-test-result]AddstartedAttimestamp inTestCaseResultObjectwithinonTestCaseResult(#15145)[jest-cli]ExportbuildArgv(#15310)[jest-config][BREAKING] Addmtsandctsto defaultmoduleFileExtensionsconfig (#14369)[jest-config][BREAKING] UpdatetestMatchandtestRegexdefault option for supportingmjs,cjs,mts, andcts(#14584)[jest-config]Loads config file from provided path inpackage.json(#14044)[jest-config]Allow loadingjest.config.ctsfiles (#14070)[jest-config]ShowrootDirin error message when apresetfails to load (#15194)[jest-config]Support loading TS config files usingesbuild-registervia 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]AddperfStatsto surface test setup overhead (#14622)[@jest/core][BREAKING] Changed--filterto accept an object with shape{ filtered: Array<string> }to match documentation (#13319)[@jest/core]Support--outputFileoption for--listTests(#14980)[@jest/core]Stringify Errors properly with--jsonflag (#15329)[@jest/core, @jest/test-sequencer][BREAKING] ExposesglobalConfig&contextstoTestSequencer(#14535, & #14543)[jest-each]Introduce%$option to add number of the test to its title (#14710)[@jest/environment][BREAKING] Remove deprecatedjest.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 thejsdomenvironment, allowing usage of custom versions of JSDOM (#14717)[jest-environment-node]Update jest environment with dispose symbolsSymbol(#14888 & #14909)[expect, @jest/expect][BREAKING] Add type inference for function parameters inCalledWithassertions (#15129)[@jest/expect-utils]Properly compare all types ofTypedArrays (#15178)[@jest/fake-timers][BREAKING] Upgrade@sinonjs/fake-timersto v13 (#14544 & #15470)[@jest/fake-timers]Exposing new modern timers functionadvanceTimersToFrame()which advances all timers by the needed milliseconds to execute callbacks currently scheduled withrequestAnimationFrame(#14598)[jest-matcher-utils]AddSERIALIZABLE_PROPERTIESto allow custom serialization of objects (#14893)[jest-mock]Add support for the Explicit Resource Management proposal to use theusingkeyword withjest.spyOn(object, methodName)(#14895)[jest-reporters]Add support for DEC mode 2026 (#15008)[jest-resolver]Supportfile://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 functionjest.advanceTimersToFrame()from@jest/fake-timers(#14598)[jest-runtime]Supportimport.meta.filenameandimport.meta.dirname(available from Node 20.11) (#14854)[jest-runtime]Supportimport.meta.resolve(#14930)[jest-runtime][BREAKING] Make it mandatory to passglobalConfigto theRuntimeconstructor (#15044)[jest-runtime]Addunstable_unmockModule(#15080)[jest-runtime]AddonGenerateMocktransformer callback for auto generated callbacks (#15433 & #15482)[jest-runtime][BREAKING] Usevm.compileFunctionovervm.Script(#15461)[@jest/schemas]Upgrade@sinclair/typeboxto v0.34 (#15450)[@jest/types]test.each(): Accept a readonly (as const) table properly (#14565)[@jest/types]Improve argument type inference passed totestanddescribecallback functions fromeachtables (#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 fromjest-snapshotinto its own package (#15095)[pretty-format][BREAKING] Do not render empty string children ('') in React plugin (#14470)Fixes
[expect]ShowAggregateErrorto display (#15346)[*]Replaceexitwithexit-x(#15399)[babel-plugin-jest-hoist]Usedenylistinstead of the deprecatedblacklistfor Babel 8 support (#14109)[babel-plugin-jest-hoist]Do not rely on buggy Babel behaviour (#15415)[expect]Check error instance type fortoThrow/toThrowError(#14576)[expect]Improve diff for failingexpect.objectContaining(#15038)[expect]UseArray.isArrayto check if an array is anArray(#15101)[expect]Fix Errorcauseassertion errors (#15339)[jest-changed-files]Print underlying errors when VCS commands fail (#15052)[jest-changed-files]Abortsl rootcall if output resembles a steam locomotive (#15053)[jest-circus][BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)[jest-circus]Replace recursivemakeTestResultsimplementation with iterative one (#14760)[jest-circus]Omitexpect.hasAssertions()errors if a test already has errors (#14866)[jest-circus, jest-expect, jest-snapshot]Passtest.failingtests 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 respectrunInBandoption (#14578)[jest-config]SupporttestTimeoutin project config (#14697)[jest-config]SupportcoverageReportersin project config (#14697)[jest-config]Allowreportersin project config (#14768)[jest-config]Allow Node16/NodeNext/BundlermoduleResolutionin project's tsconfig (#14739)[@jest/create-cache-key-function]Correct the return type ofcreateCacheKey(#15159)[jest-each]Allow$keypathtemplates withnullorundefinedvalues (#14831)[@jest/expect-utils]Fix comparison ofDataView(#14408)[@jest/expect-utils][BREAKING] exclude non-enumerable in object matching (#14670)[@jest/expect-utils]Fix comparison ofURL(#14672)[@jest/expect-utils]CheckSymbolproperties 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 multiplehasteImplModulePaths (#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_importCoreModelso required core module is consistent if modified while loading (#15077)[jest-schemas, jest-types][BREAKING] Fix type oftestFailureExitCodeconfig option(#15232)[jest-util]Make sureisInteractiveworks in a browser (#14552)[pretty-format][BREAKING] PrintArrayBufferandDataViewcorrectly (#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
testPathPatternconfiguration option totestPathPatterns, which now takes a list of patterns instead of the regex.- [BREAKING]
--testPathPatternis now--testPathPatterns- [BREAKING] Specifying
testPathPatternswhen programmatically callingwatchmust be specified asnew TestPathPatterns(patterns), whereTestPathPatternscan be imported from@jest/pattern[jest-reporters, jest-runner]Unhandled errors without stack get correctly logged to console (#14619)[jest-util]Always loadmjsfiles withimport(#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 whereObjectContainingmatched non-object values. ([#15463])(#15463).
- Adds a
conditional/checkto ensure the argument passed toexpectis an object.- Add unit tests for new
ObjectContainingbehavior.- Remove
invalid/wrongtest case assertions forObjectContaining.[jest-worker]Addresses incorrect state on exit (#15610)Performance
[*][BREAKING] Bundle all of Jest's modules intoindex.js(#12348, #14550 & #14661)[jest-haste-map]Only spawn one process to check forwatchmaninstallation (#14826)[jest-runner]Better cleanupsource-map-supportafter 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 ofmicromatchto^4.0.7(#15082)[*][BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)[*][BREAKING] Drop support fortypescript@4.3, minimum version is now5.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 toglob@10(#14509)[*]UseTypeErroroverErrorwhere appropriate (#14799)[docs]Fix typos inCHANGELOG.mdandpackages/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/coreto^7.11(#14109)[babel-jest, @jest/transform]Updatebabel-plugin-istanbulto v6 (#15156)[babel-plugin-jest-hoist]Move unnecessarydependenciestodevDependencies(#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--initargument (#14490)[jest-config, @jest/core, jest-util]Upgradeci-info(#14655)[jest-mock][BREAKING] RemoveMockFunctionMetadataType,MockFunctionMetadataandSpyInstancetypes (#14621)[@jest/reporters]Upgradeistanbul-lib-source-maps(#14924)[jest-schemas]Upgrade@sinclair/typebox(#14775)[jest-transform]Upgradewrite-file-atomic(#14274)[jest-util]Upgradepicomatchto 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.
↗️ 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 activeFixes
- `[jest-snapshot-utils] Fix deprecated goo.gl snapshot guide link not getting replaced with fully canonical URL (#15787)
[jest-circus]Fixit.concurrentnot working withdescribe.skip(#15765)[jest-snapshot]Fix mangled inline snapshot updates when used with Prettier 3 and CRLF line endings[jest-runtime]Importing from@jest/globalsin more than one file no longer breaks relative paths (#15772)Chore
[expect]Update docblock fortoContain()to display info on substring check (#15789)
30.0.5 (from changelog)
Features
[jest-config]AllowtestMatchto take a string value[jest-worker]LetworkerIdleMemoryLimitaccept 0 to always restart worker child processesFixes
[expect]Fixbiginterror (#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 thedefaultAsyncResolver(#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 deprecatejest-replpackage (#15673)[jest-resolver]Replace customisBuiltinModulewith node'sisBuiltin(#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.0and follow the migration guide: Upgrading from Jest 29 to 30.Features
[*]RenamedglobalsCleanupModetoglobalsCleanupand--waitNextEventLoopTurnForUnhandledRejectionEventsto--waitForUnhandledRejections[expect]AddArrayOfasymmetric matcher for validating array elements. (#15567)[babel-jest]Add optionexcludeJestPresetto allow opting out ofbabel-preset-jest(#15164)[expect]Revert #15038 to fixexpect(fn).toHaveBeenCalledWith(expect.objectContaining(...))when there are multiple calls (#15508)[jest-circus, jest-cli, jest-config]AddwaitNextEventLoopTurnForUnhandledRejectionEventsflag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)[jest-circus]Add awaitBeforeRetryoption tojest.retryTimes(#14738)[jest-circus]Add aretryImmediatelyoption tojest.retryTimes(#14696)[jest-circus, jest-jasmine2]AllowsetupFilesAfterEnvto export an async function (#10962)[jest-circus, jest-test-result]AddstartedAttimestamp inTestCaseResultObjectwithinonTestCaseResult(#15145)[jest-cli]ExportbuildArgv(#15310)[jest-config][BREAKING] Addmtsandctsto defaultmoduleFileExtensionsconfig (#14369)[jest-config][BREAKING] UpdatetestMatchandtestRegexdefault option for supportingmjs,cjs,mts, andcts(#14584)[jest-config]Loads config file from provided path inpackage.json(#14044)[jest-config]Allow loadingjest.config.ctsfiles (#14070)[jest-config]ShowrootDirin error message when apresetfails to load (#15194)[jest-config]Support loading TS config files usingesbuild-registervia 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]AddperfStatsto surface test setup overhead (#14622)[@jest/core][BREAKING] Changed--filterto accept an object with shape{ filtered: Array<string> }to match documentation (#13319)[@jest/core]Support--outputFileoption for--listTests(#14980)[@jest/core]Stringify Errors properly with--jsonflag (#15329)[@jest/core, @jest/test-sequencer][BREAKING] ExposesglobalConfig&contextstoTestSequencer(#14535, & #14543)[jest-each]Introduce%$option to add number of the test to its title (#14710)[@jest/environment][BREAKING] Remove deprecatedjest.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 thejsdomenvironment, allowing usage of custom versions of JSDOM (#14717)[jest-environment-node]Update jest environment with dispose symbolsSymbol(#14888 & #14909)[expect, @jest/expect][BREAKING] Add type inference for function parameters inCalledWithassertions (#15129)[@jest/expect-utils]Properly compare all types ofTypedArrays (#15178)[@jest/fake-timers][BREAKING] Upgrade@sinonjs/fake-timersto v13 (#14544 & #15470)[@jest/fake-timers]Exposing new modern timers functionadvanceTimersToFrame()which advances all timers by the needed milliseconds to execute callbacks currently scheduled withrequestAnimationFrame(#14598)[jest-matcher-utils]AddSERIALIZABLE_PROPERTIESto allow custom serialization of objects (#14893)[jest-mock]Add support for the Explicit Resource Management proposal to use theusingkeyword withjest.spyOn(object, methodName)(#14895)[jest-reporters]Add support for DEC mode 2026 (#15008)[jest-resolver]Supportfile://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 functionjest.advanceTimersToFrame()from@jest/fake-timers(#14598)[jest-runtime]Supportimport.meta.filenameandimport.meta.dirname(available from Node 20.11) (#14854)[jest-runtime]Supportimport.meta.resolve(#14930)[jest-runtime][BREAKING] Make it mandatory to passglobalConfigto theRuntimeconstructor (#15044)[jest-runtime]Addunstable_unmockModule(#15080)[jest-runtime]AddonGenerateMocktransformer callback for auto generated callbacks (#15433 & #15482)[jest-runtime][BREAKING] Usevm.compileFunctionovervm.Script(#15461)[@jest/schemas]Upgrade@sinclair/typeboxto v0.34 (#15450)[@jest/types]test.each(): Accept a readonly (as const) table properly (#14565)[@jest/types]Improve argument type inference passed totestanddescribecallback functions fromeachtables (#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 fromjest-snapshotinto its own package (#15095)[pretty-format][BREAKING] Do not render empty string children ('') in React plugin (#14470)Fixes
[expect]ShowAggregateErrorto display (#15346)[*]Replaceexitwithexit-x(#15399)[babel-plugin-jest-hoist]Usedenylistinstead of the deprecatedblacklistfor Babel 8 support (#14109)[babel-plugin-jest-hoist]Do not rely on buggy Babel behaviour (#15415)[expect]Check error instance type fortoThrow/toThrowError(#14576)[expect]Improve diff for failingexpect.objectContaining(#15038)[expect]UseArray.isArrayto check if an array is anArray(#15101)[expect]Fix Errorcauseassertion errors (#15339)[jest-changed-files]Print underlying errors when VCS commands fail (#15052)[jest-changed-files]Abortsl rootcall if output resembles a steam locomotive (#15053)[jest-circus][BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)[jest-circus]Replace recursivemakeTestResultsimplementation with iterative one (#14760)[jest-circus]Omitexpect.hasAssertions()errors if a test already has errors (#14866)[jest-circus, jest-expect, jest-snapshot]Passtest.failingtests 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 respectrunInBandoption (#14578)[jest-config]SupporttestTimeoutin project config (#14697)[jest-config]SupportcoverageReportersin project config (#14697)[jest-config]Allowreportersin project config (#14768)[jest-config]Allow Node16/NodeNext/BundlermoduleResolutionin project's tsconfig (#14739)[@jest/create-cache-key-function]Correct the return type ofcreateCacheKey(#15159)[jest-each]Allow$keypathtemplates withnullorundefinedvalues (#14831)[@jest/expect-utils]Fix comparison ofDataView(#14408)[@jest/expect-utils][BREAKING] exclude non-enumerable in object matching (#14670)[@jest/expect-utils]Fix comparison ofURL(#14672)[@jest/expect-utils]CheckSymbolproperties 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 multiplehasteImplModulePaths (#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_importCoreModelso required core module is consistent if modified while loading (#15077)[jest-schemas, jest-types][BREAKING] Fix type oftestFailureExitCodeconfig option(#15232)[jest-util]Make sureisInteractiveworks in a browser (#14552)[pretty-format][BREAKING] PrintArrayBufferandDataViewcorrectly (#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
testPathPatternconfiguration option totestPathPatterns, which now takes a list of patterns instead of the regex.- [BREAKING]
--testPathPatternis now--testPathPatterns- [BREAKING] Specifying
testPathPatternswhen programmatically callingwatchmust be specified asnew TestPathPatterns(patterns), whereTestPathPatternscan be imported from@jest/pattern[jest-reporters, jest-runner]Unhandled errors without stack get correctly logged to console (#14619)[jest-util]Always loadmjsfiles withimport(#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 whereObjectContainingmatched non-object values. ([#15463])(#15463).
- Adds a
conditional/checkto ensure the argument passed toexpectis an object.- Add unit tests for new
ObjectContainingbehavior.- Remove
invalid/wrongtest case assertions forObjectContaining.[jest-worker]Addresses incorrect state on exit (#15610)Performance
[*][BREAKING] Bundle all of Jest's modules intoindex.js(#12348, #14550 & #14661)[jest-haste-map]Only spawn one process to check forwatchmaninstallation (#14826)[jest-runner]Better cleanupsource-map-supportafter 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 ofmicromatchto^4.0.7(#15082)[*][BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)[*][BREAKING] Drop support fortypescript@4.3, minimum version is now5.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 toglob@10(#14509)[*]UseTypeErroroverErrorwhere appropriate (#14799)[docs]Fix typos inCHANGELOG.mdandpackages/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/coreto^7.11(#14109)[babel-jest, @jest/transform]Updatebabel-plugin-istanbulto v6 (#15156)[babel-plugin-jest-hoist]Move unnecessarydependenciestodevDependencies(#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--initargument (#14490)[jest-config, @jest/core, jest-util]Upgradeci-info(#14655)[jest-mock][BREAKING] RemoveMockFunctionMetadataType,MockFunctionMetadataandSpyInstancetypes (#14621)[@jest/reporters]Upgradeistanbul-lib-source-maps(#14924)[jest-schemas]Upgrade@sinclair/typebox(#14775)[jest-transform]Upgradewrite-file-atomic(#14274)[jest-util]Upgradepicomatchto 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 thedefaultAsyncResolver(#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 deprecatejest-replpackage (#15673)[jest-resolver]Replace customisBuiltinModulewith node'sisBuiltin(#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.0and follow the migration guide: Upgrading from Jest 29 to 30.Features
[*]RenamedglobalsCleanupModetoglobalsCleanupand--waitNextEventLoopTurnForUnhandledRejectionEventsto--waitForUnhandledRejections[expect]AddArrayOfasymmetric matcher for validating array elements. (#15567)[babel-jest]Add optionexcludeJestPresetto allow opting out ofbabel-preset-jest(#15164)[expect]Revert #15038 to fixexpect(fn).toHaveBeenCalledWith(expect.objectContaining(...))when there are multiple calls (#15508)[jest-circus, jest-cli, jest-config]AddwaitNextEventLoopTurnForUnhandledRejectionEventsflag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)[jest-circus]Add awaitBeforeRetryoption tojest.retryTimes(#14738)[jest-circus]Add aretryImmediatelyoption tojest.retryTimes(#14696)[jest-circus, jest-jasmine2]AllowsetupFilesAfterEnvto export an async function (#10962)[jest-circus, jest-test-result]AddstartedAttimestamp inTestCaseResultObjectwithinonTestCaseResult(#15145)[jest-cli]ExportbuildArgv(#15310)[jest-config][BREAKING] Addmtsandctsto defaultmoduleFileExtensionsconfig (#14369)[jest-config][BREAKING] UpdatetestMatchandtestRegexdefault option for supportingmjs,cjs,mts, andcts(#14584)[jest-config]Loads config file from provided path inpackage.json(#14044)[jest-config]Allow loadingjest.config.ctsfiles (#14070)[jest-config]ShowrootDirin error message when apresetfails to load (#15194)[jest-config]Support loading TS config files usingesbuild-registervia 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]AddperfStatsto surface test setup overhead (#14622)[@jest/core][BREAKING] Changed--filterto accept an object with shape{ filtered: Array<string> }to match documentation (#13319)[@jest/core]Support--outputFileoption for--listTests(#14980)[@jest/core]Stringify Errors properly with--jsonflag (#15329)[@jest/core, @jest/test-sequencer][BREAKING] ExposesglobalConfig&contextstoTestSequencer(#14535, & #14543)[jest-each]Introduce%$option to add number of the test to its title (#14710)[@jest/environment][BREAKING] Remove deprecatedjest.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 thejsdomenvironment, allowing usage of custom versions of JSDOM (#14717)[jest-environment-node]Update jest environment with dispose symbolsSymbol(#14888 & #14909)[expect, @jest/expect][BREAKING] Add type inference for function parameters inCalledWithassertions (#15129)[@jest/expect-utils]Properly compare all types ofTypedArrays (#15178)[@jest/fake-timers][BREAKING] Upgrade@sinonjs/fake-timersto v13 (#14544 & #15470)[@jest/fake-timers]Exposing new modern timers functionadvanceTimersToFrame()which advances all timers by the needed milliseconds to execute callbacks currently scheduled withrequestAnimationFrame(#14598)[jest-matcher-utils]AddSERIALIZABLE_PROPERTIESto allow custom serialization of objects (#14893)[jest-mock]Add support for the Explicit Resource Management proposal to use theusingkeyword withjest.spyOn(object, methodName)(#14895)[jest-reporters]Add support for DEC mode 2026 (#15008)[jest-resolver]Supportfile://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 functionjest.advanceTimersToFrame()from@jest/fake-timers(#14598)[jest-runtime]Supportimport.meta.filenameandimport.meta.dirname(available from Node 20.11) (#14854)[jest-runtime]Supportimport.meta.resolve(#14930)[jest-runtime][BREAKING] Make it mandatory to passglobalConfigto theRuntimeconstructor (#15044)[jest-runtime]Addunstable_unmockModule(#15080)[jest-runtime]AddonGenerateMocktransformer callback for auto generated callbacks (#15433 & #15482)[jest-runtime][BREAKING] Usevm.compileFunctionovervm.Script(#15461)[@jest/schemas]Upgrade@sinclair/typeboxto v0.34 (#15450)[@jest/types]test.each(): Accept a readonly (as const) table properly (#14565)[@jest/types]Improve argument type inference passed totestanddescribecallback functions fromeachtables (#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 fromjest-snapshotinto its own package (#15095)[pretty-format][BREAKING] Do not render empty string children ('') in React plugin (#14470)Fixes
[expect]ShowAggregateErrorto display (#15346)[*]Replaceexitwithexit-x(#15399)[babel-plugin-jest-hoist]Usedenylistinstead of the deprecatedblacklistfor Babel 8 support (#14109)[babel-plugin-jest-hoist]Do not rely on buggy Babel behaviour (#15415)[expect]Check error instance type fortoThrow/toThrowError(#14576)[expect]Improve diff for failingexpect.objectContaining(#15038)[expect]UseArray.isArrayto check if an array is anArray(#15101)[expect]Fix Errorcauseassertion errors (#15339)[jest-changed-files]Print underlying errors when VCS commands fail (#15052)[jest-changed-files]Abortsl rootcall if output resembles a steam locomotive (#15053)[jest-circus][BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)[jest-circus]Replace recursivemakeTestResultsimplementation with iterative one (#14760)[jest-circus]Omitexpect.hasAssertions()errors if a test already has errors (#14866)[jest-circus, jest-expect, jest-snapshot]Passtest.failingtests 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 respectrunInBandoption (#14578)[jest-config]SupporttestTimeoutin project config (#14697)[jest-config]SupportcoverageReportersin project config (#14697)[jest-config]Allowreportersin project config (#14768)[jest-config]Allow Node16/NodeNext/BundlermoduleResolutionin project's tsconfig (#14739)[@jest/create-cache-key-function]Correct the return type ofcreateCacheKey(#15159)[jest-each]Allow$keypathtemplates withnullorundefinedvalues (#14831)[@jest/expect-utils]Fix comparison ofDataView(#14408)[@jest/expect-utils][BREAKING] exclude non-enumerable in object matching (#14670)[@jest/expect-utils]Fix comparison ofURL(#14672)[@jest/expect-utils]CheckSymbolproperties 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 multiplehasteImplModulePaths (#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_importCoreModelso required core module is consistent if modified while loading (#15077)[jest-schemas, jest-types][BREAKING] Fix type oftestFailureExitCodeconfig option(#15232)[jest-util]Make sureisInteractiveworks in a browser (#14552)[pretty-format][BREAKING] PrintArrayBufferandDataViewcorrectly (#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
testPathPatternconfiguration option totestPathPatterns, which now takes a list of patterns instead of the regex.- [BREAKING]
--testPathPatternis now--testPathPatterns- [BREAKING] Specifying
testPathPatternswhen programmatically callingwatchmust be specified asnew TestPathPatterns(patterns), whereTestPathPatternscan be imported from@jest/pattern[jest-reporters, jest-runner]Unhandled errors without stack get correctly logged to console (#14619)[jest-util]Always loadmjsfiles withimport(#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 whereObjectContainingmatched non-object values. ([#15463])(#15463).
- Adds a
conditional/checkto ensure the argument passed toexpectis an object.- Add unit tests for new
ObjectContainingbehavior.- Remove
invalid/wrongtest case assertions forObjectContaining.[jest-worker]Addresses incorrect state on exit (#15610)Performance
[*][BREAKING] Bundle all of Jest's modules intoindex.js(#12348, #14550 & #14661)[jest-haste-map]Only spawn one process to check forwatchmaninstallation (#14826)[jest-runner]Better cleanupsource-map-supportafter 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 ofmicromatchto^4.0.7(#15082)[*][BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)[*][BREAKING] Drop support fortypescript@4.3, minimum version is now5.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 toglob@10(#14509)[*]UseTypeErroroverErrorwhere appropriate (#14799)[docs]Fix typos inCHANGELOG.mdandpackages/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/coreto^7.11(#14109)[babel-jest, @jest/transform]Updatebabel-plugin-istanbulto v6 (#15156)[babel-plugin-jest-hoist]Move unnecessarydependenciestodevDependencies(#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--initargument (#14490)[jest-config, @jest/core, jest-util]Upgradeci-info(#14655)[jest-mock][BREAKING] RemoveMockFunctionMetadataType,MockFunctionMetadataandSpyInstancetypes (#14621)[@jest/reporters]Upgradeistanbul-lib-source-maps(#14924)[jest-schemas]Upgrade@sinclair/typebox(#14775)[jest-transform]Upgradewrite-file-atomic(#14274)[jest-util]Upgradepicomatchto 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]ObjectContainingsupportsymbolas key (#14414)[expect]Remove@types/nodefrom dependencies (#14385)[jest-core]Use workers in watch mode by default to avoid crashes (#14059 & #14085).[jest-reporters]Updateistanbul-lib-instrumentdependency 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 throughjest.isolateModulesAsync(#14397)Chore & Maintenance
[jest-changed-files, jest-circus, jest-console, @jest/core, @jest/runtime, @jest/transform]UseinvariantandnotEmptyfromjest-utilrather than own internal (#14366)New Contributors
- @karlnorling made their first contribution in #14401
- @vinicinbgs made their first contribution in #14388
- @panteleevnikita made their first contribution in #14433
Full Changelog: v29.6.2...v29.6.3
29.4.3
Features
[expect]UpdatetoThrow()to be able to use errorcauses (#13606)[jest-core]allow to useworkerIdleMemoryLimitwith only 1 worker orrunInBandoption (#13846)[jest-message-util]Add support for errorcauses (#13868 & #13912)[jest-runtime]Revertimport assertionsfor JSON modules as it's been relegated to Stage 2 (#13911)Fixes
[@jest/expect-utils]subsetEqualityshould consider also an object's inherited string keys (#13824)[jest-mock]Clear mock state whenjest.restoreAllMocks()is called (#13867)[jest-mock]PreventmockImplementationOnceandmockReturnValueOncebleeding intowithImplementation(#13888)[jest-mock]Do not restore mocks whenjest.resetAllMocks()is called (#13866)New Contributors
- @brodo made their first contribution in #13868
- @DannyNemer made their first contribution in #13878
- @ghusse made their first contribution in #13846
- @broofa made their first contribution in #13911
Full Changelog: v29.4.2...v29.4.3
29.4.2
Features
[@jest/core]Instrument significant lifecycle events withperformance.mark()(#13859)Fixes
[expect, @jest/expect]Provide type ofactualas a generic argument toMatchersto allow better-typed extensions (#13848)[jest-circus]Added explicit mention of test failing becausedone()is not being called in error message (#13847)[jest-runtime]Handle CJS re-exports of node core modules from ESM (#13856)[jest-transform]Downgradewrite-file-atomicto v4 (#13853)[jest-worker]Ignore IPC messages not intended for Jest (#13543)Chore & Maintenance
[*]make sure to exclude.eslintcachefrom published module (#13832)[docs]Cleanup incorrect links in CHANGELOG.md (#13857)New Contributors
- @benjaminjkraft made their first contribution in #13848
- @LinusU made their first contribution in #13543
- @SuperSodaSea made their first contribution in #13857
- @kowalski made their first contribution in #13856
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-seedwill display the seed value in the report, and can be set via a CLI flag or through the config file (#13400)[jest-config]AddreadInitialConfigutility function (#13356)[jest-core]AllowtestResultsProcessorto be async (#13343)[@jest/environment, jest-environment-node, jest-environment-jsdom, jest-runtime]AddgetSeed()to thejestobject (#13400)[expect, @jest/expect-utils]AllowisAutility to take a type argument (#13355)[expect]ExposeAsyncExpectationResultandSyncExpectationResulttypes (#13411)Fixes
[babel-plugin-jest-hoist]IgnoreTSTypeQuerywhen checking for hoisted references (#13367)[jest-core]FixdetectOpenHandlesfalse positives for some special objects such asTLSWRAP(#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 ofeachtable correctly when the table is a tuple or array (#13381)[@jest/types]Rework typings to allow the*ReturnedWithmatchers to be called with no argument (#13385)Chore & Maintenance
[*]Update@babel/*deps, resulting in slightly different stack traces foreach(#13422)Performance
[jest-runner]Do not instrument v8 coverage data if coverage should not be collected (#13282)New Contributors
- @johannessjoberg made their first contribution in #13343
- @mitchhentgesspotify made their first contribution in #13282
- @Methuselah96 made their first contribution in #13409
- @jhwang98 made their first contribution in #13400
- @professorjrod made their first contribution in #13418
- @jesusarell made their first contribution in #13407
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 betweenMatcherContextMatcherUtilsandMatcherStatetypes (#13141)[jest-circus]Add support fortest.failing.each(#13142)[jest-config][BREAKING] MakesnapshotFormatdefault toescapeString: falseandprintBasicPrototype: false(#13036)[jest-config][BREAKING] Remove undocumentedcollectCoverageOnlyFromoption (#13156)[jest-environment-jsdom][BREAKING] Upgrade tojsdom@20(#13037, #13058)[@jest/globals]Addjest.Mocked,jest.MockedClass,jest.MockedFunctionandjest.MockedObjectutility types (#12727)[jest-mock][BREAKING] RefactorMocked*utility types.MaybeMockedDeepandMaybeMockedbecameMockedandMockedShallowrespectively; only deep mocked variants ofMockedClass,MockedFunctionandMockedObjectare exported (#13123, #13124)[jest-mock][BREAKING] Change the defaultjest.mockedhelper’s behavior to deep mocked (#13125)[jest-snapshot][BREAKING] Letbabelfind config when updating inline snapshots (#13150)[@jest/test-result, @jest/types][BREAKING] ReplaceBytesandMillisecondstypes withnumber(#13155)[jest-worker]AddsworkerIdleMemoryLimitoption 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] RemoveConvertAnsiplugin in favour ofjest-serializer-ansi-escapes(#13040)[pretty-format]Allow to opt out from sorting object keys withcompareKeys: 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]MakeprettierPathoptional inSnapshotState(#13149)[jest-snapshot]Fix parsing error from inline snapshot files withJSX(#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 setnfor--bail(#13128)[docs]Update Enzyme URL (#13166)[jest-leak-detector]Remove support forweak-napi(#13035)[jest-snapshot][BREAKING] RequirerootDiras argument toSnapshotState(#13150)New Contributors
- @makstech made their first contribution in #13049
- @sa2taka made their first contribution in #13055
- @matheus-rodrigues00 made their first contribution in #13090
- @lanpai made their first contribution in #13094
- @Zebreus made their first contribution in #13099
- @backmask made their first contribution in #13106
- @liuxingbaoyu made their first contribution in #13120
- @Trim made their first contribution in #13128
- @kkyusufk made their first contribution in #13142
- @KrishnaPG made their first contribution in #13157
- @dev-itsheng made their first contribution in #13115
- @jeffslofish made their first contribution in #13166
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.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-resolve-dependencies (indirect, 28.1.3 → 30.1.2) · Repo · Changelog
Release Notes
Too many releases to show here. View the full release notes.
↗️ jest-runner (indirect, 28.1.3 → 30.1.2) · Repo · Changelog
Release Notes
Too many releases to show here. View the full release notes.
↗️ jest-runtime (indirect, 28.1.3 → 30.1.2) · Repo · Changelog
Release Notes
Too many releases to show here. View the full release notes.
↗️ jest-snapshot (indirect, 28.1.3 → 30.1.2) · Repo · Changelog
Release Notes
Too many releases to show here. View the full release notes.
↗️ jest-util (indirect, 28.1.3 → 30.0.5) · Repo · Changelog
Release Notes
30.0.5 (from changelog)
Features
[jest-config]AllowtestMatchto take a string value[jest-worker]LetworkerIdleMemoryLimitaccept 0 to always restart worker child processesFixes
[expect]Fixbiginterror (#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 thedefaultAsyncResolver(#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 deprecatejest-replpackage (#15673)[jest-resolver]Replace customisBuiltinModulewith node'sisBuiltin(#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.0and follow the migration guide: Upgrading from Jest 29 to 30.Features
[*]RenamedglobalsCleanupModetoglobalsCleanupand--waitNextEventLoopTurnForUnhandledRejectionEventsto--waitForUnhandledRejections[expect]AddArrayOfasymmetric matcher for validating array elements. (#15567)[babel-jest]Add optionexcludeJestPresetto allow opting out ofbabel-preset-jest(#15164)[expect]Revert #15038 to fixexpect(fn).toHaveBeenCalledWith(expect.objectContaining(...))when there are multiple calls (#15508)[jest-circus, jest-cli, jest-config]AddwaitNextEventLoopTurnForUnhandledRejectionEventsflag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)[jest-circus]Add awaitBeforeRetryoption tojest.retryTimes(#14738)[jest-circus]Add aretryImmediatelyoption tojest.retryTimes(#14696)[jest-circus, jest-jasmine2]AllowsetupFilesAfterEnvto export an async function (#10962)[jest-circus, jest-test-result]AddstartedAttimestamp inTestCaseResultObjectwithinonTestCaseResult(#15145)[jest-cli]ExportbuildArgv(#15310)[jest-config][BREAKING] Addmtsandctsto defaultmoduleFileExtensionsconfig (#14369)[jest-config][BREAKING] UpdatetestMatchandtestRegexdefault option for supportingmjs,cjs,mts, andcts(#14584)[jest-config]Loads config file from provided path inpackage.json(#14044)[jest-config]Allow loadingjest.config.ctsfiles (#14070)[jest-config]ShowrootDirin error message when apresetfails to load (#15194)[jest-config]Support loading TS config files usingesbuild-registervia 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]AddperfStatsto surface test setup overhead (#14622)[@jest/core][BREAKING] Changed--filterto accept an object with shape{ filtered: Array<string> }to match documentation (#13319)[@jest/core]Support--outputFileoption for--listTests(#14980)[@jest/core]Stringify Errors properly with--jsonflag (#15329)[@jest/core, @jest/test-sequencer][BREAKING] ExposesglobalConfig&contextstoTestSequencer(#14535, & #14543)[jest-each]Introduce%$option to add number of the test to its title (#14710)[@jest/environment][BREAKING] Remove deprecatedjest.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 thejsdomenvironment, allowing usage of custom versions of JSDOM (#14717)[jest-environment-node]Update jest environment with dispose symbolsSymbol(#14888 & #14909)[expect, @jest/expect][BREAKING] Add type inference for function parameters inCalledWithassertions (#15129)[@jest/expect-utils]Properly compare all types ofTypedArrays (#15178)[@jest/fake-timers][BREAKING] Upgrade@sinonjs/fake-timersto v13 (#14544 & #15470)[@jest/fake-timers]Exposing new modern timers functionadvanceTimersToFrame()which advances all timers by the needed milliseconds to execute callbacks currently scheduled withrequestAnimationFrame(#14598)[jest-matcher-utils]AddSERIALIZABLE_PROPERTIESto allow custom serialization of objects (#14893)[jest-mock]Add support for the Explicit Resource Management proposal to use theusingkeyword withjest.spyOn(object, methodName)(#14895)[jest-reporters]Add support for DEC mode 2026 (#15008)[jest-resolver]Supportfile://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 functionjest.advanceTimersToFrame()from@jest/fake-timers(#14598)[jest-runtime]Supportimport.meta.filenameandimport.meta.dirname(available from Node 20.11) (#14854)[jest-runtime]Supportimport.meta.resolve(#14930)[jest-runtime][BREAKING] Make it mandatory to passglobalConfigto theRuntimeconstructor (#15044)[jest-runtime]Addunstable_unmockModule(#15080)[jest-runtime]AddonGenerateMocktransformer callback for auto generated callbacks (#15433 & #15482)[jest-runtime][BREAKING] Usevm.compileFunctionovervm.Script(#15461)[@jest/schemas]Upgrade@sinclair/typeboxto v0.34 (#15450)[@jest/types]test.each(): Accept a readonly (as const) table properly (#14565)[@jest/types]Improve argument type inference passed totestanddescribecallback functions fromeachtables (#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 fromjest-snapshotinto its own package (#15095)[pretty-format][BREAKING] Do not render empty string children ('') in React plugin (#14470)Fixes
[expect]ShowAggregateErrorto display (#15346)[*]Replaceexitwithexit-x(#15399)[babel-plugin-jest-hoist]Usedenylistinstead of the deprecatedblacklistfor Babel 8 support (#14109)[babel-plugin-jest-hoist]Do not rely on buggy Babel behaviour (#15415)[expect]Check error instance type fortoThrow/toThrowError(#14576)[expect]Improve diff for failingexpect.objectContaining(#15038)[expect]UseArray.isArrayto check if an array is anArray(#15101)[expect]Fix Errorcauseassertion errors (#15339)[jest-changed-files]Print underlying errors when VCS commands fail (#15052)[jest-changed-files]Abortsl rootcall if output resembles a steam locomotive (#15053)[jest-circus][BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)[jest-circus]Replace recursivemakeTestResultsimplementation with iterative one (#14760)[jest-circus]Omitexpect.hasAssertions()errors if a test already has errors (#14866)[jest-circus, jest-expect, jest-snapshot]Passtest.failingtests 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 respectrunInBandoption (#14578)[jest-config]SupporttestTimeoutin project config (#14697)[jest-config]SupportcoverageReportersin project config (#14697)[jest-config]Allowreportersin project config (#14768)[jest-config]Allow Node16/NodeNext/BundlermoduleResolutionin project's tsconfig (#14739)[@jest/create-cache-key-function]Correct the return type ofcreateCacheKey(#15159)[jest-each]Allow$keypathtemplates withnullorundefinedvalues (#14831)[@jest/expect-utils]Fix comparison ofDataView(#14408)[@jest/expect-utils][BREAKING] exclude non-enumerable in object matching (#14670)[@jest/expect-utils]Fix comparison ofURL(#14672)[@jest/expect-utils]CheckSymbolproperties 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 multiplehasteImplModulePaths (#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_importCoreModelso required core module is consistent if modified while loading (#15077)[jest-schemas, jest-types][BREAKING] Fix type oftestFailureExitCodeconfig option(#15232)[jest-util]Make sureisInteractiveworks in a browser (#14552)[pretty-format][BREAKING] PrintArrayBufferandDataViewcorrectly (#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
testPathPatternconfiguration option totestPathPatterns, which now takes a list of patterns instead of the regex.- [BREAKING]
--testPathPatternis now--testPathPatterns- [BREAKING] Specifying
testPathPatternswhen programmatically callingwatchmust be specified asnew TestPathPatterns(patterns), whereTestPathPatternscan be imported from@jest/pattern[jest-reporters, jest-runner]Unhandled errors without stack get correctly logged to console (#14619)[jest-util]Always loadmjsfiles withimport(#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 whereObjectContainingmatched non-object values. ([#15463])(#15463).
- Adds a
conditional/checkto ensure the argument passed toexpectis an object.- Add unit tests for new
ObjectContainingbehavior.- Remove
invalid/wrongtest case assertions forObjectContaining.[jest-worker]Addresses incorrect state on exit (#15610)Performance
[*][BREAKING] Bundle all of Jest's modules intoindex.js(#12348, #14550 & #14661)[jest-haste-map]Only spawn one process to check forwatchmaninstallation (#14826)[jest-runner]Better cleanupsource-map-supportafter 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 ofmicromatchto^4.0.7(#15082)[*][BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)[*][BREAKING] Drop support fortypescript@4.3, minimum version is now5.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 toglob@10(#14509)[*]UseTypeErroroverErrorwhere appropriate (#14799)[docs]Fix typos inCHANGELOG.mdandpackages/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/coreto^7.11(#14109)[babel-jest, @jest/transform]Updatebabel-plugin-istanbulto v6 (#15156)[babel-plugin-jest-hoist]Move unnecessarydependenciestodevDependencies(#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--initargument (#14490)[jest-config, @jest/core, jest-util]Upgradeci-info(#14655)[jest-mock][BREAKING] RemoveMockFunctionMetadataType,MockFunctionMetadataandSpyInstancetypes (#14621)[@jest/reporters]Upgradeistanbul-lib-source-maps(#14924)[jest-schemas]Upgrade@sinclair/typebox(#14775)[jest-transform]Upgradewrite-file-atomic(#14274)[jest-util]Upgradepicomatchto 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]Addnpm init/yarn createinitialiser for Jest projects (#14465)[jest-validate]Allow deprecation warnings for unknown options (#14499)Fixes
[jest-resolver]Replace unmatched capture groups inmoduleNameMapperwith empty string instead ofundefined(#14507)[jest-snapshot]Allow for strings as well as template literals in inline snapshots (#14465)[@jest/test-sequencer]Calculate test runtime ifperStats.durationis missing (#14473)Performance
[@jest/create-cache-key-function]Cache access ofNODE_ENVandBABEL_ENV(#14455)Chore & Maintenance
[jest-cli]Move internal config initialisation logic to thecreate-jestpackage (#14465)New Contributors
- @bawjensen made their first contribution in #14465
- @malaviya-parth made their first contribution in #14467
- @niklasholm made their first contribution in #14507
Full Changelog: v29.6.4...v29.7.0
29.6.3
Fixes
[expect, @jest/expect-utils]ObjectContainingsupportsymbolas key (#14414)[expect]Remove@types/nodefrom dependencies (#14385)[jest-core]Use workers in watch mode by default to avoid crashes (#14059 & #14085).[jest-reporters]Updateistanbul-lib-instrumentdependency 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 throughjest.isolateModulesAsync(#14397)Chore & Maintenance
[jest-changed-files, jest-circus, jest-console, @jest/core, @jest/runtime, @jest/transform]UseinvariantandnotEmptyfromjest-utilrather than own internal (#14366)New Contributors
- @karlnorling made their first contribution in #14401
- @vinicinbgs made their first contribution in #14388
- @panteleevnikita made their first contribution in #14433
Full Changelog: v29.6.2...v29.6.3
29.6.2
Fixes
[jest-circus]Fix snapshot matchers in concurrent tests when nr of tests exceedsmaxConcurrency(#14335)[@jest/core]When running global setup and teardown, do not try to change themessageproperty of the thrown error object when themessageproperty is unwritable (#14113)[jest-snapshot]Move@types/prettierfromdependenciestodevDependencies(#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]Usepluralizefromjest-utilrather than own internal (#14322)New Contributors
- @Kloen made their first contribution in #14328
- @eryue0220 made their first contribution in #14322
- @david-szabo97 made their first contribution in #14113
Full Changelog: v29.6.1...v29.6.2
29.6.1
Fixes
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]AllowcoverageDirectoryandcollectCoverageFromin project config (#14180)[jest-core]Always use workers in watch mode to avoid crashes (#14059).[jest-environment-jsdom, jest-environment-node]Fix assignment ofcustomExportConditionsviatestEnvironmentOptionswhen custom env subclass defines a default value (#13989)[jest-matcher-utils]Fix copying value of inherited getters (#14007)[jest-mock]Tweak typings to allowjest.replaceProperty()replace methods (#14008)[jest-mock]Improve user input validation and error messages ofspyOnandreplacePropertymethods (#14087)[jest-runtime]Bindjest.isolateModulesAsynctothis(#14083)[jest-runtime]ForwardwrapperLengthto theScriptconstructor ascolumnOffsetfor accurate debugging (#14148)[jest-runtime]Guard_isMockFunctionaccess within(#14188)[jest-snapshot]Fix a potential bug when not using prettier and improve performance (#14036)[@jest/transform]Do not instrument.jsonmodules (#14048)Chore & Maintenance
[*]Updatesemverdependency to get vulnerability fix (#14262)[docs]Updated documentation for the--runTestsByPathCLI 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
- @huntie made their first contribution in #13989
- @liammulh made their first contribution in #14001
- @BenceSzalai made their first contribution in #14007
- @Mike-Dax made their first contribution in #14056
- @bakasmarius made their first contribution in #14025
- @PeteTheHeat made their first contribution in #14015
- @tjenkinson made their first contribution in #14083
- @soyjuanmacias made their first contribution in #14101
- @bharathkalyans made their first contribution in #14154
- @itzjacki made their first contribution in #14165
- @DmitryMakhnev made their first contribution in #14174
- @BobdenOs made their first contribution in #14148
- @william-lai-927 made their first contribution in #14179
- @bakamitai456 made their first contribution in #14045
- @rbuckton made their first contribution in #14188
- @barbados-clemens made their first contribution in #14180
- @rburdet made their first contribution in #14197
- @cw1997 made their first contribution in #14184
- @renovate made their first contribution in #14209
- @stekycz made their first contribution in #14110
- @ziyad-elabid-nw made their first contribution in #14262
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 activeFixes
- `[jest-snapshot-utils] Fix deprecated goo.gl snapshot guide link not getting replaced with fully canonical URL (#15787)
[jest-circus]Fixit.concurrentnot working withdescribe.skip(#15765)[jest-snapshot]Fix mangled inline snapshot updates when used with Prettier 3 and CRLF line endings[jest-runtime]Importing from@jest/globalsin more than one file no longer breaks relative paths (#15772)Chore
[expect]Update docblock fortoContain()to display info on substring check (#15789)
30.0.5 (from changelog)
Features
[jest-config]AllowtestMatchto take a string value[jest-worker]LetworkerIdleMemoryLimitaccept 0 to always restart worker child processesFixes
[expect]Fixbiginterror (#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 thedefaultAsyncResolver(#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 deprecatejest-replpackage (#15673)[jest-resolver]Replace customisBuiltinModulewith node'sisBuiltin(#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.0and follow the migration guide: Upgrading from Jest 29 to 30.Features
[*]RenamedglobalsCleanupModetoglobalsCleanupand--waitNextEventLoopTurnForUnhandledRejectionEventsto--waitForUnhandledRejections[expect]AddArrayOfasymmetric matcher for validating array elements. (#15567)[babel-jest]Add optionexcludeJestPresetto allow opting out ofbabel-preset-jest(#15164)[expect]Revert #15038 to fixexpect(fn).toHaveBeenCalledWith(expect.objectContaining(...))when there are multiple calls (#15508)[jest-circus, jest-cli, jest-config]AddwaitNextEventLoopTurnForUnhandledRejectionEventsflag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)[jest-circus]Add awaitBeforeRetryoption tojest.retryTimes(#14738)[jest-circus]Add aretryImmediatelyoption tojest.retryTimes(#14696)[jest-circus, jest-jasmine2]AllowsetupFilesAfterEnvto export an async function (#10962)[jest-circus, jest-test-result]AddstartedAttimestamp inTestCaseResultObjectwithinonTestCaseResult(#15145)[jest-cli]ExportbuildArgv(#15310)[jest-config][BREAKING] Addmtsandctsto defaultmoduleFileExtensionsconfig (#14369)[jest-config][BREAKING] UpdatetestMatchandtestRegexdefault option for supportingmjs,cjs,mts, andcts(#14584)[jest-config]Loads config file from provided path inpackage.json(#14044)[jest-config]Allow loadingjest.config.ctsfiles (#14070)[jest-config]ShowrootDirin error message when apresetfails to load (#15194)[jest-config]Support loading TS config files usingesbuild-registervia 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]AddperfStatsto surface test setup overhead (#14622)[@jest/core][BREAKING] Changed--filterto accept an object with shape{ filtered: Array<string> }to match documentation (#13319)[@jest/core]Support--outputFileoption for--listTests(#14980)[@jest/core]Stringify Errors properly with--jsonflag (#15329)[@jest/core, @jest/test-sequencer][BREAKING] ExposesglobalConfig&contextstoTestSequencer(#14535, & #14543)[jest-each]Introduce%$option to add number of the test to its title (#14710)[@jest/environment][BREAKING] Remove deprecatedjest.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 thejsdomenvironment, allowing usage of custom versions of JSDOM (#14717)[jest-environment-node]Update jest environment with dispose symbolsSymbol(#14888 & #14909)[expect, @jest/expect][BREAKING] Add type inference for function parameters inCalledWithassertions (#15129)[@jest/expect-utils]Properly compare all types ofTypedArrays (#15178)[@jest/fake-timers][BREAKING] Upgrade@sinonjs/fake-timersto v13 (#14544 & #15470)[@jest/fake-timers]Exposing new modern timers functionadvanceTimersToFrame()which advances all timers by the needed milliseconds to execute callbacks currently scheduled withrequestAnimationFrame(#14598)[jest-matcher-utils]AddSERIALIZABLE_PROPERTIESto allow custom serialization of objects (#14893)[jest-mock]Add support for the Explicit Resource Management proposal to use theusingkeyword withjest.spyOn(object, methodName)(#14895)[jest-reporters]Add support for DEC mode 2026 (#15008)[jest-resolver]Supportfile://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 functionjest.advanceTimersToFrame()from@jest/fake-timers(#14598)[jest-runtime]Supportimport.meta.filenameandimport.meta.dirname(available from Node 20.11) (#14854)[jest-runtime]Supportimport.meta.resolve(#14930)[jest-runtime][BREAKING] Make it mandatory to passglobalConfigto theRuntimeconstructor (#15044)[jest-runtime]Addunstable_unmockModule(#15080)[jest-runtime]AddonGenerateMocktransformer callback for auto generated callbacks (#15433 & #15482)[jest-runtime][BREAKING] Usevm.compileFunctionovervm.Script(#15461)[@jest/schemas]Upgrade@sinclair/typeboxto v0.34 (#15450)[@jest/types]test.each(): Accept a readonly (as const) table properly (#14565)[@jest/types]Improve argument type inference passed totestanddescribecallback functions fromeachtables (#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 fromjest-snapshotinto its own package (#15095)[pretty-format][BREAKING] Do not render empty string children ('') in React plugin (#14470)Fixes
[expect]ShowAggregateErrorto display (#15346)[*]Replaceexitwithexit-x(#15399)[babel-plugin-jest-hoist]Usedenylistinstead of the deprecatedblacklistfor Babel 8 support (#14109)[babel-plugin-jest-hoist]Do not rely on buggy Babel behaviour (#15415)[expect]Check error instance type fortoThrow/toThrowError(#14576)[expect]Improve diff for failingexpect.objectContaining(#15038)[expect]UseArray.isArrayto check if an array is anArray(#15101)[expect]Fix Errorcauseassertion errors (#15339)[jest-changed-files]Print underlying errors when VCS commands fail (#15052)[jest-changed-files]Abortsl rootcall if output resembles a steam locomotive (#15053)[jest-circus][BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)[jest-circus]Replace recursivemakeTestResultsimplementation with iterative one (#14760)[jest-circus]Omitexpect.hasAssertions()errors if a test already has errors (#14866)[jest-circus, jest-expect, jest-snapshot]Passtest.failingtests 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 respectrunInBandoption (#14578)[jest-config]SupporttestTimeoutin project config (#14697)[jest-config]SupportcoverageReportersin project config (#14697)[jest-config]Allowreportersin project config (#14768)[jest-config]Allow Node16/NodeNext/BundlermoduleResolutionin project's tsconfig (#14739)[@jest/create-cache-key-function]Correct the return type ofcreateCacheKey(#15159)[jest-each]Allow$keypathtemplates withnullorundefinedvalues (#14831)[@jest/expect-utils]Fix comparison ofDataView(#14408)[@jest/expect-utils][BREAKING] exclude non-enumerable in object matching (#14670)[@jest/expect-utils]Fix comparison ofURL(#14672)[@jest/expect-utils]CheckSymbolproperties 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 multiplehasteImplModulePaths (#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_importCoreModelso required core module is consistent if modified while loading (#15077)[jest-schemas, jest-types][BREAKING] Fix type oftestFailureExitCodeconfig option(#15232)[jest-util]Make sureisInteractiveworks in a browser (#14552)[pretty-format][BREAKING] PrintArrayBufferandDataViewcorrectly (#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
testPathPatternconfiguration option totestPathPatterns, which now takes a list of patterns instead of the regex.- [BREAKING]
--testPathPatternis now--testPathPatterns- [BREAKING] Specifying
testPathPatternswhen programmatically callingwatchmust be specified asnew TestPathPatterns(patterns), whereTestPathPatternscan be imported from@jest/pattern[jest-reporters, jest-runner]Unhandled errors without stack get correctly logged to console (#14619)[jest-util]Always loadmjsfiles withimport(#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 whereObjectContainingmatched non-object values. ([#15463])(#15463).
- Adds a
conditional/checkto ensure the argument passed toexpectis an object.- Add unit tests for new
ObjectContainingbehavior.- Remove
invalid/wrongtest case assertions forObjectContaining.[jest-worker]Addresses incorrect state on exit (#15610)Performance
[*][BREAKING] Bundle all of Jest's modules intoindex.js(#12348, #14550 & #14661)[jest-haste-map]Only spawn one process to check forwatchmaninstallation (#14826)[jest-runner]Better cleanupsource-map-supportafter 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 ofmicromatchto^4.0.7(#15082)[*][BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)[*][BREAKING] Drop support fortypescript@4.3, minimum version is now5.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 toglob@10(#14509)[*]UseTypeErroroverErrorwhere appropriate (#14799)[docs]Fix typos inCHANGELOG.mdandpackages/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/coreto^7.11(#14109)[babel-jest, @jest/transform]Updatebabel-plugin-istanbulto v6 (#15156)[babel-plugin-jest-hoist]Move unnecessarydependenciestodevDependencies(#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--initargument (#14490)[jest-config, @jest/core, jest-util]Upgradeci-info(#14655)[jest-mock][BREAKING] RemoveMockFunctionMetadataType,MockFunctionMetadataandSpyInstancetypes (#14621)[@jest/reporters]Upgradeistanbul-lib-source-maps(#14924)[jest-schemas]Upgrade@sinclair/typebox(#14775)[jest-transform]Upgradewrite-file-atomic(#14274)[jest-util]Upgradepicomatchto 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]Addnpm init/yarn createinitialiser for Jest projects (#14465)[jest-validate]Allow deprecation warnings for unknown options (#14499)Fixes
[jest-resolver]Replace unmatched capture groups inmoduleNameMapperwith empty string instead ofundefined(#14507)[jest-snapshot]Allow for strings as well as template literals in inline snapshots (#14465)[@jest/test-sequencer]Calculate test runtime ifperStats.durationis missing (#14473)Performance
[@jest/create-cache-key-function]Cache access ofNODE_ENVandBABEL_ENV(#14455)Chore & Maintenance
[jest-cli]Move internal config initialisation logic to thecreate-jestpackage (#14465)New Contributors
- @bawjensen made their first contribution in #14465
- @malaviya-parth made their first contribution in #14467
- @niklasholm made their first contribution in #14507
Full Changelog: v29.6.4...v29.7.0
29.6.3
Fixes
[expect, @jest/expect-utils]ObjectContainingsupportsymbolas key (#14414)[expect]Remove@types/nodefrom dependencies (#14385)[jest-core]Use workers in watch mode by default to avoid crashes (#14059 & #14085).[jest-reporters]Updateistanbul-lib-instrumentdependency 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 throughjest.isolateModulesAsync(#14397)Chore & Maintenance
[jest-changed-files, jest-circus, jest-console, @jest/core, @jest/runtime, @jest/transform]UseinvariantandnotEmptyfromjest-utilrather than own internal (#14366)New Contributors
- @karlnorling made their first contribution in #14401
- @vinicinbgs made their first contribution in #14388
- @panteleevnikita made their first contribution in #14433
Full Changelog: v29.6.2...v29.6.3
29.6.2
Fixes
[jest-circus]Fix snapshot matchers in concurrent tests when nr of tests exceedsmaxConcurrency(#14335)[@jest/core]When running global setup and teardown, do not try to change themessageproperty of the thrown error object when themessageproperty is unwritable (#14113)[jest-snapshot]Move@types/prettierfromdependenciestodevDependencies(#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]Usepluralizefromjest-utilrather than own internal (#14322)New Contributors
- @Kloen made their first contribution in #14328
- @eryue0220 made their first contribution in #14322
- @david-szabo97 made their first contribution in #14113
Full Changelog: v29.6.1...v29.6.2
29.6.1
Fixes
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]AllowcoverageDirectoryandcollectCoverageFromin project config (#14180)[jest-core]Always use workers in watch mode to avoid crashes (#14059).[jest-environment-jsdom, jest-environment-node]Fix assignment ofcustomExportConditionsviatestEnvironmentOptionswhen custom env subclass defines a default value (#13989)[jest-matcher-utils]Fix copying value of inherited getters (#14007)[jest-mock]Tweak typings to allowjest.replaceProperty()replace methods (#14008)[jest-mock]Improve user input validation and error messages ofspyOnandreplacePropertymethods (#14087)[jest-runtime]Bindjest.isolateModulesAsynctothis(#14083)[jest-runtime]ForwardwrapperLengthto theScriptconstructor ascolumnOffsetfor accurate debugging (#14148)[jest-runtime]Guard_isMockFunctionaccess within(#14188)[jest-snapshot]Fix a potential bug when not using prettier and improve performance (#14036)[@jest/transform]Do not instrument.jsonmodules (#14048)Chore & Maintenance
[*]Updatesemverdependency to get vulnerability fix (#14262)[docs]Updated documentation for the--runTestsByPathCLI 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
- @huntie made their first contribution in #13989
- @liammulh made their first contribution in #14001
- @BenceSzalai made their first contribution in #14007
- @Mike-Dax made their first contribution in #14056
- @bakasmarius made their first contribution in #14025
- @PeteTheHeat made their first contribution in #14015
- @tjenkinson made their first contribution in #14083
- @soyjuanmacias made their first contribution in #14101
- @bharathkalyans made their first contribution in #14154
- @itzjacki made their first contribution in #14165
- @DmitryMakhnev made their first contribution in #14174
- @BobdenOs made their first contribution in #14148
- @william-lai-927 made their first contribution in #14179
- @bakamitai456 made their first contribution in #14045
- @rbuckton made their first contribution in #14188
- @barbados-clemens made their first contribution in #14180
- @rburdet made their first contribution in #14197
- @cw1997 made their first contribution in #14184
- @renovate made their first contribution in #14209
- @stekycz made their first contribution in #14110
- @ziyad-elabid-nw made their first contribution in #14262
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.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 activeFixes
- `[jest-snapshot-utils] Fix deprecated goo.gl snapshot guide link not getting replaced with fully canonical URL (#15787)
[jest-circus]Fixit.concurrentnot working withdescribe.skip(#15765)[jest-snapshot]Fix mangled inline snapshot updates when used with Prettier 3 and CRLF line endings[jest-runtime]Importing from@jest/globalsin more than one file no longer breaks relative paths (#15772)Chore
[expect]Update docblock fortoContain()to display info on substring check (#15789)
30.0.5 (from changelog)
Features
[jest-config]AllowtestMatchto take a string value[jest-worker]LetworkerIdleMemoryLimitaccept 0 to always restart worker child processesFixes
[expect]Fixbiginterror (#15702)
30.0.4 (from changelog)
Features
[expect]TheInversetype is now exported (#15714)[expect]feat: supportasync functionsintoBe(#15704)Fixes
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 thedefaultAsyncResolver(#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 deprecatejest-replpackage (#15673)[jest-resolver]Replace customisBuiltinModulewith node'sisBuiltin(#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.0and follow the migration guide: Upgrading from Jest 29 to 30.Features
[*]RenamedglobalsCleanupModetoglobalsCleanupand--waitNextEventLoopTurnForUnhandledRejectionEventsto--waitForUnhandledRejections[expect]AddArrayOfasymmetric matcher for validating array elements. (#15567)[babel-jest]Add optionexcludeJestPresetto allow opting out ofbabel-preset-jest(#15164)[expect]Revert #15038 to fixexpect(fn).toHaveBeenCalledWith(expect.objectContaining(...))when there are multiple calls (#15508)[jest-circus, jest-cli, jest-config]AddwaitNextEventLoopTurnForUnhandledRejectionEventsflag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)[jest-circus]Add awaitBeforeRetryoption tojest.retryTimes(#14738)[jest-circus]Add aretryImmediatelyoption tojest.retryTimes(#14696)[jest-circus, jest-jasmine2]AllowsetupFilesAfterEnvto export an async function (#10962)[jest-circus, jest-test-result]AddstartedAttimestamp inTestCaseResultObjectwithinonTestCaseResult(#15145)[jest-cli]ExportbuildArgv(#15310)[jest-config][BREAKING] Addmtsandctsto defaultmoduleFileExtensionsconfig (#14369)[jest-config][BREAKING] UpdatetestMatchandtestRegexdefault option for supportingmjs,cjs,mts, andcts(#14584)[jest-config]Loads config file from provided path inpackage.json(#14044)[jest-config]Allow loadingjest.config.ctsfiles (#14070)[jest-config]ShowrootDirin error message when apresetfails to load (#15194)[jest-config]Support loading TS config files usingesbuild-registervia 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]AddperfStatsto surface test setup overhead (#14622)[@jest/core][BREAKING] Changed--filterto accept an object with shape{ filtered: Array<string> }to match documentation (#13319)[@jest/core]Support--outputFileoption for--listTests(#14980)[@jest/core]Stringify Errors properly with--jsonflag (#15329)[@jest/core, @jest/test-sequencer][BREAKING] ExposesglobalConfig&contextstoTestSequencer(#14535, & #14543)[jest-each]Introduce%$option to add number of the test to its title (#14710)[@jest/environment][BREAKING] Remove deprecatedjest.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 thejsdomenvironment, allowing usage of custom versions of JSDOM (#14717)[jest-environment-node]Update jest environment with dispose symbolsSymbol(#14888 & #14909)[expect, @jest/expect][BREAKING] Add type inference for function parameters inCalledWithassertions (#15129)[@jest/expect-utils]Properly compare all types ofTypedArrays (#15178)[@jest/fake-timers][BREAKING] Upgrade@sinonjs/fake-timersto v13 (#14544 & #15470)[@jest/fake-timers]Exposing new modern timers functionadvanceTimersToFrame()which advances all timers by the needed milliseconds to execute callbacks currently scheduled withrequestAnimationFrame(#14598)[jest-matcher-utils]AddSERIALIZABLE_PROPERTIESto allow custom serialization of objects (#14893)[jest-mock]Add support for the Explicit Resource Management proposal to use theusingkeyword withjest.spyOn(object, methodName)(#14895)[jest-reporters]Add support for DEC mode 2026 (#15008)[jest-resolver]Supportfile://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 functionjest.advanceTimersToFrame()from@jest/fake-timers(#14598)[jest-runtime]Supportimport.meta.filenameandimport.meta.dirname(available from Node 20.11) (#14854)[jest-runtime]Supportimport.meta.resolve(#14930)[jest-runtime][BREAKING] Make it mandatory to passglobalConfigto theRuntimeconstructor (#15044)[jest-runtime]Addunstable_unmockModule(#15080)[jest-runtime]AddonGenerateMocktransformer callback for auto generated callbacks (#15433 & #15482)[jest-runtime][BREAKING] Usevm.compileFunctionovervm.Script(#15461)[@jest/schemas]Upgrade@sinclair/typeboxto v0.34 (#15450)[@jest/types]test.each(): Accept a readonly (as const) table properly (#14565)[@jest/types]Improve argument type inference passed totestanddescribecallback functions fromeachtables (#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 fromjest-snapshotinto its own package (#15095)[pretty-format][BREAKING] Do not render empty string children ('') in React plugin (#14470)Fixes
[expect]ShowAggregateErrorto display (#15346)[*]Replaceexitwithexit-x(#15399)[babel-plugin-jest-hoist]Usedenylistinstead of the deprecatedblacklistfor Babel 8 support (#14109)[babel-plugin-jest-hoist]Do not rely on buggy Babel behaviour (#15415)[expect]Check error instance type fortoThrow/toThrowError(#14576)[expect]Improve diff for failingexpect.objectContaining(#15038)[expect]UseArray.isArrayto check if an array is anArray(#15101)[expect]Fix Errorcauseassertion errors (#15339)[jest-changed-files]Print underlying errors when VCS commands fail (#15052)[jest-changed-files]Abortsl rootcall if output resembles a steam locomotive (#15053)[jest-circus][BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)[jest-circus]Replace recursivemakeTestResultsimplementation with iterative one (#14760)[jest-circus]Omitexpect.hasAssertions()errors if a test already has errors (#14866)[jest-circus, jest-expect, jest-snapshot]Passtest.failingtests 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 respectrunInBandoption (#14578)[jest-config]SupporttestTimeoutin project config (#14697)[jest-config]SupportcoverageReportersin project config (#14697)[jest-config]Allowreportersin project config (#14768)[jest-config]Allow Node16/NodeNext/BundlermoduleResolutionin project's tsconfig (#14739)[@jest/create-cache-key-function]Correct the return type ofcreateCacheKey(#15159)[jest-each]Allow$keypathtemplates withnullorundefinedvalues (#14831)[@jest/expect-utils]Fix comparison ofDataView(#14408)[@jest/expect-utils][BREAKING] exclude non-enumerable in object matching (#14670)[@jest/expect-utils]Fix comparison ofURL(#14672)[@jest/expect-utils]CheckSymbolproperties 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 multiplehasteImplModulePaths (#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_importCoreModelso required core module is consistent if modified while loading (#15077)[jest-schemas, jest-types][BREAKING] Fix type oftestFailureExitCodeconfig option(#15232)[jest-util]Make sureisInteractiveworks in a browser (#14552)[pretty-format][BREAKING] PrintArrayBufferandDataViewcorrectly (#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
testPathPatternconfiguration option totestPathPatterns, which now takes a list of patterns instead of the regex.- [BREAKING]
--testPathPatternis now--testPathPatterns- [BREAKING] Specifying
testPathPatternswhen programmatically callingwatchmust be specified asnew TestPathPatterns(patterns), whereTestPathPatternscan be imported from@jest/pattern[jest-reporters, jest-runner]Unhandled errors without stack get correctly logged to console (#14619)[jest-util]Always loadmjsfiles withimport(#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 whereObjectContainingmatched non-object values. ([#15463])(#15463).
- Adds a
conditional/checkto ensure the argument passed toexpectis an object.- Add unit tests for new
ObjectContainingbehavior.- Remove
invalid/wrongtest case assertions forObjectContaining.[jest-worker]Addresses incorrect state on exit (#15610)Performance
[*][BREAKING] Bundle all of Jest's modules intoindex.js(#12348, #14550 & #14661)[jest-haste-map]Only spawn one process to check forwatchmaninstallation (#14826)[jest-runner]Better cleanupsource-map-supportafter 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 ofmicromatchto^4.0.7(#15082)[*][BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)[*][BREAKING] Drop support fortypescript@4.3, minimum version is now5.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 toglob@10(#14509)[*]UseTypeErroroverErrorwhere appropriate (#14799)[docs]Fix typos inCHANGELOG.mdandpackages/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/coreto^7.11(#14109)[babel-jest, @jest/transform]Updatebabel-plugin-istanbulto v6 (#15156)[babel-plugin-jest-hoist]Move unnecessarydependenciestodevDependencies(#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--initargument (#14490)[jest-config, @jest/core, jest-util]Upgradeci-info(#14655)[jest-mock][BREAKING] RemoveMockFunctionMetadataType,MockFunctionMetadataandSpyInstancetypes (#14621)[@jest/reporters]Upgradeistanbul-lib-source-maps(#14924)[jest-schemas]Upgrade@sinclair/typebox(#14775)[jest-transform]Upgradewrite-file-atomic(#14274)[jest-util]Upgradepicomatchto 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.
↗️ jsesc (indirect, 2.5.2 → 3.1.0) · Repo
Commits
See the full diff on Github. The new version differs by 18 commits:
Release v3.1.0Clean upfeat: support bigint (#71)Release v3.0.2feat: check for Buffer existence (#64)Release v3.0.1Tweak whitespace scriptEscape non-ASCII whitespace in minimal mode (#62)Release v3.0.0Remove problematic testAvoid old-school Buffer usage in testsRemove stray requireReplace string escaping with regex replace (#61)Test in modern versions of Node.jsUpdate test expectationRevert "Escape lone surrogates in minimal output (#59)"Escape lone surrogates in minimal output (#59)Fix typo
↗️ make-dir (indirect, 3.1.0 → 4.0.0) · Repo
Release Notes
4.0.0
Breaking
Improvements
- Update dependencies c419a8a
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
micromatchprior to version 4.0.8 is vulnerable to Regular Expression Denial of Service (ReDoS). The vulnerability occurs inmicromatch.braces()inindex.jsbecause 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:
4.0.8run verb to generate README documentationMerge branch 'v4' into hauserkristof-feature/v4.0.8Merge pull request #266 from hauserkristof/feature/v4.0.8lintfix: CHANGELOG about braces & CVE-2024-4068, v4.0.5fix: CVE numbers in CHANGELOGfeat: updated CHANGELOGfix: use actions/setup-node@v4feat: rework test to work on macos with node 10,12 and 14fix: removed unused isObject functionfeat: backported CVE fix from 4.0.6 over to 4.0.7Release 4.0.7.Prepare for 4.0.7 with picomatch v2Update README.mdAdd sponsor to readme
↗️ 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?
1.1.0
What's new?
- Added bright color variants #55
1.0.1
What's new?
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 16 commits:
picocolors@1.1.1Add chalk v5 and yoctocolors to benchmarks (#88)Rework color detection (#87)fix: usage of `node12` in `testing.yaml` (#73)Use mitata, esbuild for benchmarking speed and size (#86)fix(types): move types declaration into "real" types declaration file (.d.ts) (#82)picocolors@1.1.0test: add test (shouldn't overflow when coloring already colored large text) (#74)feat: bright colors variants (#55)miscv1.0.1fix: iteratively replace "close" to avoid maximum stack error (#64)Fix color detection in edge runtime (#56)uniform api usage in complex benchmarkupdate benchmarks per recent job runCreate .gitignore (#37)
↗️ pirates (indirect, 4.0.5 → 4.0.7) · Repo
Release Notes
4.0.7
4.0.7 (2025-03-27)
Bug Fixes
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:
chore: downgrade stack-utilsfix: remove build process and ship source directlyfix: Update some wording and fix grammar in messages (#121)chore: update dev deps and remove renovatechore(deps): lock file maintenance (#89)chore(deps): update babel monorepo (#117)chore(deps): update dependency eslint-plugin-import to v2.28.0chore(deps): update babel monorepo to v7.22.9chore(deps): bump word-wrap from 1.2.3 to 1.2.4 (#115)chore(deps): update babel monorepochore(deps): update dependency decache to v4.6.2chore(deps): bump semver from 5.7.1 to 5.7.2 (#113)chore: fix release and add Node.js 18 and 20 to test matrixfix: update package.json (#102)chore(deps): update babel monorepo to v7.21.4chore(deps): update babel monorepo to v7.21.0chore(deps): update dependency eslint-plugin-import to v2.27.5chore(deps): update dependency eslint-plugin-import to v2.27.4chore(deps): update dependency eslint-plugin-import to v2.27.2chore(deps): update dependency @babel/core to v7.20.12chore(deps): bump json5 from 1.0.1 to 1.0.2chore(deps): update babel monorepo to v7.20.7chore(deps): bump decode-uri-component from 0.2.0 to 0.2.2chore(deps): update dependency @babel/core to v7.20.5chore(deps): update babel monorepo to v7.20.2chore(deps): update dependency @babel/core to v7.19.6chore(deps): update dependency @babel/preset-env to v7.19.4chore(deps): update babel monorepo to v7.19.3chore(deps): update babel monorepo to v7.19.1chore(deps): update babel monorepo to v7.19.0chore(deps): update dependency @babel/core to v7.18.13chore(deps): update babel monorepo to v7.18.10chore(deps): update babel monorepo to v7.18.9chore(deps): update babel monorepo to v7.18.6chore(deps): update dependency @babel/core to v7.18.5chore(deps): update babel monorepo to v7.18.2chore(deps): update babel monorepo to v7.18.0chore(deps): update babel monorepo to v7.17.12chore(deps): update babel monorepo to v7.17.10chore(deps): update github/codeql-action action to v2chore(deps): update dependency @babel/core to v7.17.9chore(deps): update dependency eslint-plugin-import to v2.26.0chore(deps): update codecov/codecov-action action to v3chore(deps): update actions/setup-node action to v3chore(deps): update actions/checkout action to v3chore(deps): update actions/cache action to v3chore(deps): bump minimist from 1.2.5 to 1.2.6chore(deps): update babel monorepo
↗️ 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
actfromreactf1338f
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.refsto support string ref codemod 909071- Warn for deprecated
findDOMNodeoutside StrictMode c3b283- Warn for deprecated
test-utilsmethods d4ea75- Warn for deprecated Legacy Context outside StrictMode 415ee0
- Warn for deprecated string refs outside StrictMode #25383
- Warn for deprecated
defaultPropsfor function components #25699- Warn when spreading
key#25697- Warn when using
actfromtest-utilsd4ea75React DOM
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 12 commits:
Export `React.act` from 18.3Bump to 18.3.1Add deprecation warning for unmountComponentAtNodeAdd deprecation warning for findDOMNodeReactDOMTestUtils deprecation warningsSupport writing to this.refs from userspaceDeprecate `renderToStaticNodeStream` (#28872) (#28874)Backport legacy context deprecation warningEnable warning for defaultProps on function components for everyone (#25699)Turn on key spread warning in jsx-runtime for everyone (#25697)Turn on string ref deprecation warning for everybody (not codemoddable) (#25383)Bump version from 18.2 to 18.3
↗️ 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
928e56d#591 better handling of whitespace (#591) (@lukekarrys, @joaomoreno, @nicolo-ribaudo)
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:
chore(master): release 9.3.0 (#253)chore(deps-dev): Bump braces from 3.0.2 to 3.0.3 (#251)feat: respect node:coverage comments (#252)chore(deps): Bump @babel/traverse from 7.22.8 to 7.23.2 (#243)chore(deps): Bump @babel/traverse (#230)chore(deps): update dependency @types/node to v20 (#231)chore(master): release 9.2.0 (#235)feat: support `/* v8 ignore` ignore hints (#228)chore(master): release 9.1.3 (#227)fix: no wrapperLength for empty coverage (#210)chore: refresh lockfile (#226)chore(master): release 9.1.2 (#225)fix: upgrade `convert-source-map` (#224)chore(deps): update dependency standard to v17 (#191)chore(master): release 9.1.1 (#223)fix: ignore hint to mark uncovered files statements and lines (#218)ci: run tests on node v20 (#222)test: empty coverage (#208)chore: update CI badge in README (#213)chore(deps-dev): Bump word-wrap from 1.2.3 to 1.2.4 (#219)chore(master): release 9.1.0 (#207)chore(deps): update dependency @types/node to v18 (#200)feat: ignore hint more now accepts more suffixes (#203)chore(deps): Bump json5 from 1.0.1 to 1.0.2 (#205)chore(deps): Bump minimatch from 3.0.4 to 3.1.2 (#204)chore(deps): Bump qs from 6.5.2 to 6.5.3 (#202)
↗️ 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-atomicis now compatible with the following semver range for node:^14.17.0 || ^16.13.0 || >=18.0.0Features
5506c07#122 postinstall for dependabot template-oss PR (@lukekarrys)
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:
chore: release 5.0.1chore: enable auto-publish (#161)chore: bump @npmcli/template-oss from 4.13.0 to 4.14.1 (#160)chore: bump @npmcli/template-oss from 4.12.1 to 4.13.0 (#158)deps: bump signal-exit from 3.0.7 to 4.0.1 (#157)chore: bump @npmcli/template-oss from 4.12.0 to 4.12.1 (#154)chore(deps): remove mkdirp and rimraf (#143)chore: postinstall for dependabot template-oss PRchore: bump @npmcli/template-oss from 4.11.4 to 4.12.0chore: postinstall for dependabot template-oss PRchore: bump @npmcli/template-oss from 4.11.3 to 4.11.4chore: postinstall for dependabot template-oss PRchore: bump @npmcli/template-oss from 4.11.0 to 4.11.3chore: postinstall for dependabot template-oss PRchore: bump @npmcli/template-oss from 4.10.0 to 4.11.0chore: postinstall for dependabot template-oss PRchore: bump @npmcli/template-oss from 4.8.0 to 4.10.0chore: postinstall for dependabot template-oss PRchore: bump @npmcli/template-oss from 4.6.1 to 4.8.0chore: postinstall for dependabot template-oss PRchore: bump @npmcli/template-oss from 4.5.1 to 4.6.1chore: bump @npmcli/eslint-config from 3.1.0 to 4.0.0chore: release 5.0.0 (#123)chore: postinstall for dependabot template-oss PRchore: bump @npmcli/template-oss from 4.4.4 to 4.5.1chore: postinstall for dependabot template-oss PRchore: bump @npmcli/template-oss from 4.3.2 to 4.4.4feat!: postinstall for dependabot template-oss PRchore: bump @npmcli/template-oss from 3.6.0 to 4.3.2chore: postinstall for dependabot template-oss PRchore: bump @npmcli/template-oss from 3.5.0 to 3.6.0chore(main): release 4.0.2 (#112)fix: linting (#111)chore: bump @npmcli/template-oss from 3.4.2 to 3.4.3 (#110)chore: postinstall for dependabot template-oss PRchore: bump @npmcli/template-oss from 3.4.1 to 3.4.2chore: bump @npmcli/template-oss from 3.2.0 to 3.4.1 (#108)chore: bump tap from 15.2.3 to 16.0.1 (#105)chore: bump @npmcli/template-oss from 2.9.2 to 3.2.0 (#104)chore: update @npmcli/template-oss requirement from ^2.9.1 to ^2.9.2 (#100)chore: update @npmcli/template-oss requirement from ^2.8.1 to ^2.9.1 (#99)chore: update @npmcli/template-oss requirement from ^2.7.1 to ^2.8.1 (#97)
↗️ yargs (indirect, 17.5.1 → 17.7.2) · Repo · Changelog
Release Notes
17.7.2
17.7.2 (2023-04-27)
Bug Fixes
17.7.1
17.7.1 (2023-02-21)
Bug Fixes
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
17.6.2
17.6.2 (2022-11-03)
Bug Fixes
17.6.1
17.6.1 (2022-11-02)
Bug Fixes
17.6.0
17.6.0 (2022-10-01)
Features
- lang: Czech locale (#2220) (5895cf1)
- usage: add YARGS_DISABLE_WRAP env variable to disable wrap (#2210) (b680ace)
Bug Fixes
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 29 commits:
chore(main): release 17.7.2 (#2323)fix: do not crash completion when having negated options (#2322)chore(main): release 17.7.1 (#2304)fix: address display bug with default sub-commands (#2303)chore(main): release 17.7.0 (#2285)feat: convert line break to whitespace for the description of the option (#2271)test: mock additional hasColors method introduced in Node 16 (#2297)fix: copy the description of the option to its alias in completion (#2269)chore: add en strings for unknown command (#2262)feat: add method to hide option extras (#2156)build: pin npm version (#2284)chore(main): release 17.6.2 (#2260)fix(lang): typo in Finnish unknown argument singular form (#2222)docs: add Typescript example for .terminalWidth() (#2224)docs: add Typescript example for .terminalWidth() (#2224)fix(deps): update dependency yargs-parser to v21.1.1 (#2231)build: GitHub Workflows security hardening (#2238)chore(main): release 17.6.1 (#2257)fix(deno): refactor to avoid prompts during module import (#2217)chore(deps): update dependency @types/node to v18 (#2255)fix(lang): fix "Not enough non-option arguments" message for the Czech language (#2242)chore(main): release 17.6.0 (#2213)fix(deps): cliui with forced strip-ansi update (#2241)fix(typescript): address warning with objectKeysfix(deno): use 'globalThis' instead of 'window' (#2186) (#2215)feat(lang): Czech locale (#2220)fix: dont clobber description for multiple option calls (#2171)feat(usage): add YARGS_DISABLE_WRAP env variable to disable wrap (#2210)docs: update links to main branch