chore(deps-dev): bump the jest family to 30.5.1 together + group it for dependabot - #685
Merged
Merged
Conversation
…or dependabot Supersedes #682 (@jest/globals alone) and #683 (jest-environment-jsdom alone). #682 failed the admin-ui typecheck:specs step with 1,455 TS2339 errors ("Property 'toBeInTheDocument' does not exist on type 'Matchers<...>'"). Every jest package pins its siblings to the exact same version, so @jest/globals 30.5.1 demanded @jest/expect 30.5.1 while jest 30.4.2 kept @jest/expect 30.4.1 hoisted; npm nested a second copy under @jest/globals. The specs' `@testing-library/jest-dom/jest-globals` import augments the top-level copy, but `expect` from @jest/globals came from the nested one and never saw the matchers. Fix: jest, @jest/globals, jest-environment-jsdom, jest-environment-node move to 30.5.1 in one `npm install`, leaving a single @jest/expect in the lockfile. A dependabot `groups` entry for the family (jest, @jest/*, jest-environment-*) makes future bumps arrive as one PR instead of a failing series; ts-jest stays out on its own 29.x cadence. Verified locally: typecheck:specs 0 errors, tsc --noEmit clean, jest 1261 passed / 123 suites, lint 0 errors, next build OK.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🐛 What
Supersedes #682 (
@jest/globalsalone, red) and #683 (jest-environment-jsdomalone, green by luck). Dependabot should auto-close both once this merges.🔍 Why #682 fails
Every jest package pins its siblings to the exact same version.
@jest/globals30.5.1 demands@jest/expect30.5.1, while the still-30.4.2jestkeeps@jest/expect30.4.1 hoisted, so npm nests a second copy under@jest/globals(plus 35 other nested duplicates in that lockfile).The specs import
@testing-library/jest-dom/jest-globals, which augmentsMatcherson the top-level copy.expectfrom@jest/globalscomes from the nested copy and never sees the augmentation:Reproduced on the #682 branch: 1,455 errors in
typecheck:specs. Same rule that bit the 29→30 move in July.✅ Fix
npm install -D jest@30.5.1 @jest/globals@30.5.1 jest-environment-jsdom@30.5.1 jest-environment-node@30.5.1in one go. The lockfile ends with a single@jest/expectand no nested@jest/globals..github/dependabot.yml: agroupsentry for the jest family (jest,@jest/*,jest-environment-*) so future trains arrive as one PR.ts-jeststays out on its own 29.x cadence.🧪 Verified locally
typecheck:specstsc --noEmitjestlintnext build