Skip to content

Migrate to Vitest 4#1221

Merged
graygilmore merged 2 commits into
mainfrom
gg-vitest-4-migration
Jun 2, 2026
Merged

Migrate to Vitest 4#1221
graygilmore merged 2 commits into
mainfrom
gg-vitest-4-migration

Conversation

@graygilmore
Copy link
Copy Markdown
Contributor

@graygilmore graygilmore commented Jun 1, 2026

Summary

Bumps Vitest from 2.1.9 to 4.1.0 and applies the migration cleanup needed for CI:

  • aligns package-local @vitest/expect versions with the root Vitest runner
  • removes the old ChaiUtils.eql type augmentation now that Chai owns that type
  • adds explicit Node test types for packages that use Node globals in test helpers
  • moves the fork worker config to the Vitest 4 top-level options
  • tightens a couple of language server test mock types that Vitest 4 now exposes more strictly

Context

This supersedes #1219. The Dependabot bump alone fails during the build because the older test setup no longer type-checks against the Vitest 4/Chai types.

This keeps the dependency upgrade but makes it an explicit migration PR instead of carrying source changes on the Dependabot branch.

dependabot Bot and others added 2 commits June 1, 2026 21:55
Bumps [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest) from 2.1.9 to 4.1.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/v4.1.0/packages/vitest)

---
updated-dependencies:
- dependency-name: vitest
  dependency-version: 4.1.0
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Vitest 4 updates Chai and mock typing enough that the old test setup no longer type-checks. Drop the local ChaiUtils.eql augmentation now that Chai owns that type, align package-local @vitest/expect versions with the root runner, and add explicit Node test types where the workspace uses Node globals.

Move the fork worker options to the Vitest 4 top-level config shape and make the language server test mocks explicit so TypeScript does not infer private @vitest/spy types.
@graygilmore graygilmore marked this pull request as ready for review June 1, 2026 22:45
@graygilmore graygilmore requested a review from a team as a code owner June 1, 2026 22:45
Copy link
Copy Markdown
Contributor

@karreiro karreiro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @graygilmore!

@graygilmore graygilmore merged commit 31e866a into main Jun 2, 2026
8 checks passed
@graygilmore graygilmore deleted the gg-vitest-4-migration branch June 2, 2026 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants