chore(deps-dev): bump the testing group across 1 directory with 7 updates - #342
Conversation
LabelsThe following labels could not be found: Please fix the above issues or remove invalid values from |
…ates Bumps the testing group with 7 updates in the / directory: | Package | From | To | | --- | --- | --- | | [@playwright/test](https://github.com/microsoft/playwright) | `1.61.1` | `1.62.1` | | [@testing-library/jest-dom](https://github.com/testing-library/jest-dom) | `6.9.1` | `7.0.1` | | [@testing-library/react](https://github.com/testing-library/react-testing-library) | `16.3.2` | `16.3.3` | | [@testing-library/user-event](https://github.com/testing-library/user-event) | `14.6.1` | `14.6.7` | | [@vitest/coverage-v8](https://github.com/vitest-dev/vitest/tree/HEAD/packages/coverage-v8) | `4.1.10` | `5.0.0` | | [jsdom](https://github.com/jsdom/jsdom) | `27.4.0` | `30.0.1` | | [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest) | `4.1.10` | `5.0.0` | Updates `@playwright/test` from 1.61.1 to 1.62.1 - [Release notes](https://github.com/microsoft/playwright/releases) - [Commits](microsoft/playwright@v1.61.1...v1.62.1) Updates `@testing-library/jest-dom` from 6.9.1 to 7.0.1 - [Release notes](https://github.com/testing-library/jest-dom/releases) - [Changelog](https://github.com/testing-library/jest-dom/blob/main/CHANGELOG.md) - [Commits](testing-library/jest-dom@v6.9.1...v7.0.1) Updates `@testing-library/react` from 16.3.2 to 16.3.3 - [Release notes](https://github.com/testing-library/react-testing-library/releases) - [Changelog](https://github.com/testing-library/react-testing-library/blob/main/CHANGELOG.md) - [Commits](testing-library/react-testing-library@v16.3.2...v16.3.3) Updates `@testing-library/user-event` from 14.6.1 to 14.6.7 - [Release notes](https://github.com/testing-library/user-event/releases) - [Changelog](https://github.com/testing-library/user-event/blob/main/CHANGELOG.md) - [Commits](testing-library/user-event@v14.6.1...v14.6.7) Updates `@vitest/coverage-v8` from 4.1.10 to 5.0.0 - [Release notes](https://github.com/vitest-dev/vitest/releases) - [Changelog](https://github.com/vitest-dev/vitest/blob/main/docs/releases.md) - [Commits](https://github.com/vitest-dev/vitest/commits/v5.0.0/packages/coverage-v8) Updates `jsdom` from 27.4.0 to 30.0.1 - [Release notes](https://github.com/jsdom/jsdom/releases) - [Commits](jsdom/jsdom@v27.4.0...v30.0.1) Updates `vitest` from 4.1.10 to 5.0.0 - [Release notes](https://github.com/vitest-dev/vitest/releases) - [Changelog](https://github.com/vitest-dev/vitest/blob/main/docs/releases.md) - [Commits](https://github.com/vitest-dev/vitest/commits/v5.0.0/packages/vitest) --- updated-dependencies: - dependency-name: "@playwright/test" dependency-version: 1.62.1 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: testing - dependency-name: "@testing-library/jest-dom" dependency-version: 7.0.1 dependency-type: direct:development update-type: version-update:semver-major dependency-group: testing - dependency-name: "@testing-library/react" dependency-version: 16.3.3 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: testing - dependency-name: "@testing-library/user-event" dependency-version: 14.6.6 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: testing - dependency-name: "@vitest/coverage-v8" dependency-version: 4.1.11 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: testing - dependency-name: jsdom dependency-version: 30.0.1 dependency-type: direct:development update-type: version-update:semver-major dependency-group: testing - dependency-name: vitest dependency-version: 4.1.11 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: testing ... Signed-off-by: dependabot[bot] <support@github.com>
7d6ac39 to
fe8ac31
Compare
The testing-group bump takes vitest 4 -> 5 and @testing-library/jest-dom 6 -> 7, and the pair leaves the matcher types unreachable: `tsc --noEmit` reported 2245 errors, every one of them `Property 'toBeInTheDocument' does not exist on type 'Assertion<void, HTMLElement>'`. The suite itself was already green — the matchers register fine at runtime — so this is types only. Neither augmentation the package ships is usable here. The root entry `src/test/setup.ts` imports augments the global `jest.Matchers` namespace and needs `@types/jest`, which this repo does not install; vitest 4 bridged that gap because its own `Assertion<T>` extended `jest.Matchers`, and vitest 5 dropped the bridge. The `/vitest` entry is the obvious one-line alternative, and it is worth saying why it is not the fix, because it does make `tsc` pass. It declares `interface Assertion<T = any>` where vitest 5's is `Assertion<R, T>`, and TypeScript merges an interface only when the type parameter lists are identical — so the pairing is error TS2428. That error is raised inside `node_modules`, where `skipLibCheck: true` hides it while the members merge anyway. Measured, not assumed: with that import and `--skipLibCheck false`, tsc reports TS2428 three times, once per declaration. Taking it would leave the type gate correct only for as long as a compiler option keeps an error out of sight. So declare the matchers here, against `Matchers`, which is the interface vitest 5 documents as the extension point and which both `Assertion<R, T>` and `AsymmetricMatchersContaining` extend. One declaration therefore covers `expect(el).toBeInTheDocument()`, `expect(el).not…`, `expect.soft(…)` and `await expect.poll(…)` alike, and a future mismatch fails loudly because this file is ours. jest-dom's asymmetric-matcher parameter is passed `never` rather than the `any` both of its own augmentations use. vitest types `expect.stringContaining` as `any` and `any` is assignable to `string | RegExp`, so asymmetric matchers still typecheck while `toHaveAccessibleName(42)` is now rejected. Probed rather than assumed green: with the file in place a bogus matcher name still fails to resolve, `toHaveAttribute()` still fails on arity, and `toHaveAccessibleName(42)` fails on type — so the declaration inherits real signatures rather than widening `expect` to anything. Gates: tsc, eslint and prettier clean; 270 test files / 6989 tests pass, identical to main's counts under vitest 4, so nothing was silently dropped from collection. `vitest run --coverage`, `build-storybook` and `build:ha:prod` all succeed. Claude-Session: https://claude.ai/code/session_01DvDKK1wMEuMYybZdNixWVC
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #342 +/- ##
==========================================
+ Coverage 89.48% 89.51% +0.02%
==========================================
Files 234 234
Lines 8962 8952 -10
Branches 3037 3037
==========================================
- Hits 8020 8013 -7
+ Misses 736 733 -3
Partials 206 206 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
# Conflicts: # package-lock.json # package.json
# Conflicts: # package-lock.json
There was a problem hiding this comment.
🟡 Changes recommended
jsdom@30 raises the effective Node floor to ^22.22.2, but package.json still advertises engines.node >=22.12.0, which should be aligned to avoid unsupported-node installs/warnings.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Updates the repo’s dev/testing toolchain versions (Vitest 5, jsdom 30, Testing Library, Playwright) while keeping @testing-library/jest-dom matcher types working under Vitest 5 via a repo-owned ambient type augmentation.
Changes:
- Bump the testing-related devDependencies (Vitest + coverage, jsdom, Testing Library, Playwright).
- Add
src/types/jestDom.d.tsto reintroduce@testing-library/jest-dommatcher typing for Vitest 5 without relying onskipLibCheck-hidden node_modules errors. - Regenerate
package-lock.jsonfor the upgraded dependency graph.
File summaries
| File | Description |
|---|---|
| src/types/jestDom.d.ts | Adds a Vitest module augmentation so jest-dom matchers are typed correctly under Vitest 5. |
| package.json | Updates devDependency versions for the testing toolchain. |
| package-lock.json | Lockfile updates reflecting the bumped dependencies and transitive changes. |
Review details
- Files reviewed: 1/3 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Change 0340 declared `engines.node: ">=22.12.0"` while jsdom was still 27. Bumping jsdom to 30 invalidates that: jsdom 30 declares `^22.22.2 || ^24.15.0 || >=26.0.0`, so the repo was advertising support for Node 22.12.0-22.22.1, where it will not install. The PR that raises the floor is the PR that should move the declaration. The range is the intersection across the whole installed tree, not jsdom's alone. Re-derived over all 515 packages in the lockfile that declare `engines.node`, evaluated against 3224 candidate Node versions spanning majors 18-30: the set those 515 ranges jointly admit and the set this range admits are the same 1438 versions, with nothing claimed that the tree rejects and nothing excluded that the tree allows. jsdom is the binding constraint at every boundary. A bare `>=22.22.2` floor would be wrong in two places, which is why the range is spelled out. jsdom excludes the whole Node 23 line and also 24.0-24.14; a `>=` floor silently claims both. 0340 chose a simple floor when the only casualty was Node 23 (non-LTS and already EOL), and that trade no longer holds now 24.0-24.14 goes with it. Worth noting for anyone auditing the old value: `>=22.12.0` was already slightly optimistic before this bump. 22.12.0 is rejected by `@asamuzakjp/css-color`, `@asamuzakjp/dom-selector` and `eslint-visitor-keys`, all of which want `^22.13.0`. jsdom 30 widens an existing gap rather than opening the first one. Verified: `npm ci` clean on Node v22.23.2 with zero EBADENGINE warnings, and the lockfile moves by exactly one line (the root engines mirror) with no dependency drift. CI pins `node-version: '22.x'` (`'22'` in the e2e and deploy workflows), which resolves to the newest 22.x — v22.23.2 today, checked against nodejs.org rather than assumed — and so stays inside `^22.22.2`. Gates: lint clean; 270 test files / 6989 tests pass; coverage, build-storybook and build:ha:prod all succeed. Claude-Session: https://claude.ai/code/session_01DvDKK1wMEuMYybZdNixWVC
There was a problem hiding this comment.
🔵 Needs a closer look
There are a couple of correctness/maintainability issues in the newly added documentation and dependency declaration that should be addressed before merging.
Review details
Suppressed comments (1)
Previously missed (1) — in code that hasn't changed since the last review.
package.json:70
@testing-library/jest-dom7.x declares@testing-library/domas a required peer dependency (see package-lock’s peerDependencies block). Relying on it being pulled in transitively makes the root manifest less explicit and can lead to brittle installs if the transitive graph changes; add@testing-library/domtodevDependenciesand update the lockfile accordingly.
- Files reviewed: 1/3 changed files
- Comments generated: 0 new
- Review effort level: Lite
Bumps the testing group with 7 updates in the / directory:
1.61.11.62.16.9.17.0.116.3.216.3.314.6.114.6.74.1.105.0.027.4.030.0.14.1.105.0.0Updates
@playwright/testfrom 1.61.1 to 1.62.1Release notes
Sourced from @playwright/test's releases.
... (truncated)
Commits
26a9e47cherry-pick(#42043): docs: release notes for v1.62 Python, Java, and .NET (#4...0a81d5dcherry-pick(#42040): docs(release-notes): mention the isolated headless clipb...8376826cherry-pick(#42034): fix(aria): keep icon-only clickable elements in ai snaps...66c5cc9chore: mark v1.62.1 (#42020)9672bc3cherry-pick(#42009): fix(types): support branded primitives in evaluate argum...4325804cherry-pick(#41988): fix(aria): preserve names from collapsed text contributors9632f8echerry-pick(#42005): fix(tsconfig): do not throw when "extends"/"references" ...e3950d9chore: mark v1.62.0 (#41981)f07e0f7cherry-pick(#41940): docs: release notes for v1.62 (#41967)05a306ccherry-pick(#41964): Revert "feat(routeFromHar): add interceptAPIRequests opt...Updates
@testing-library/jest-domfrom 6.9.1 to 7.0.1Release notes
Sourced from @testing-library/jest-dom's releases.
Commits
3782c78fix: declare vitest as an optional peer dependency (#733)1e39089feat: add toContainAnyBy* and toContainOneBy* query matcherscae44dffeat: add toContainAnyBy* and toContainOneBy* query matchers (#731)55c07ceci: switch release to npm trusted publishing (#726)213256fdocs: move toHaveSelection from the deprecated section (#717)Maintainer changes
This version was pushed to npm by GitHub Actions, a new releaser for
@testing-library/jest-domsince your current version.Updates
@testing-library/reactfrom 16.3.2 to 16.3.3Release notes
Sourced from @testing-library/react's releases.
Commits
20ce75ffix: Avoid act() re-entrant when dispatching events (#1468)be9d81ddocs: fix typos in comments and types (#1446)Updates
@testing-library/user-eventfrom 14.6.1 to 14.6.7Release notes
Sourced from @testing-library/user-event's releases.
Commits
1e0020bfix: normalize DataTransfer format aliases (#1326)d4b0593feature: Add iframe support for user.keyboard typing (#1275)71a5475fix: default pointer event pointerType to empty string instead of the string ...43efda7fix: tab retargeting if focus moved during keydown (#1296)d7e80e3fix: keyboard event repeat property (#1312)43d8e6cci: remove broken npm backfill step (#1322)1d18b1ffix(release): manually release a patch version (#1321)232f3e6docs: add migration note and clean up README badges (#1320)83e2b22ci: remove deprecated CodeSandbox CI (#1318)e8da819ci: publish to npm via OIDC trusted publishing (#1317)Maintainer changes
This version was pushed to npm by GitHub Actions, a new releaser for
@testing-library/user-eventsince your current version.Updates
@vitest/coverage-v8from 4.1.10 to 5.0.0Release notes
Sourced from @vitest/coverage-v8's releases.
... (truncated)
Commits
f441c6fchore: release v5.0.0 (#11130)c4473e4fix(coverage): prevent crash on/@fs/prepended virtual files (#11119)897f51fchore: release v5.0.0-rc.4 (#11107)7db80dcchore: release v5.0.0-rc.3 (#11089)5f6a5e8feat(coverage): switch to@vitest/istanbuljspackages (#11053)c6174a6fix(coverage): v8 to ignore Vite SSR's generated import bindings (#11023)af83d1bchore: release v5.0.0-rc.2 (#10976)a7fa111chore: release v5.0.0-rc.1 (#10920)0553851chore: add Knip checks (#10847)b7be731chore: release v5.0.0-beta.7 (#10825)Updates
jsdomfrom 27.4.0 to 30.0.1Release notes
Sourced from jsdom's releases.
... (truncated)
Commits
658448530.0.10c51df6Update dependencies and dev dependencies32adb34Bump@asamuzakjp/dom-selector70f014aSpeed up range operations on large documents250d7eePartially fix getComputedStyle with calc()20a01fc30.0.08c8e583Precompute WPT expectation matchesf32245cBump Node.js floor and dependencies03ef23bAdd background-position longhandsded056fTest CSS.escape() with numeric IDsMaintainer changes
This version was pushed to npm by GitHub Actions, a new releaser for jsdom since your current version.
Install script changes
This version modifies
preparescript that runs during installation. Review the package contents before updating.Updates
vitestfrom 4.1.10 to 5.0.0Release notes
Sourced from vitest's releases.
... (truncated)
Commits
f441c6fchore: release v5.0.0 (#11130)d46a747fix: treat test.describe as a suite during static collection (#11128)584cf30fix: add a warning if inline project has duplicate plugins due to unexpected ...f08ce4bfix: apply queued mocks from doMock() in queue order (fixes #10706) (#11127)897f51fchore: release v5.0.0-rc.4 (#11107)1339b06chore(deps): update all non-major dependencies (#11104)51e9494feat!: parse files statically in vitest list by default (#11088)2122ffdfix: propagate --maxWorkers to projects (#11102)dc10f5ffix(browser): report the action error when a task times out (#11101)d4fe198feat: promote clearCache out of experimental (#11086)