build(deps): vitest 3→4 + jsdom 25→29#348
Merged
Merged
Conversation
Adopts Dependabot #331 (vitest) and #334 (jsdom), both of which CI-failed as bare bumps. vitest 4's tinyspy invokes a mock's implementation as a constructor under `new`, so class mocks written as arrows — Connection, PublicKey, AgentCore, TorqueMCPClient — threw "() => ({...}) is not a constructor". Converted those to function form ((args) => ({...}) -> function (args) { return ({...}) }) across 42 test files via an AST codemod; the mock bodies are byte-preserved and plain function mocks (loadNetworkConfig, deriveViewingKey, ...) are left untouched. vite stays on ^6 (vitest 4 compatible); no coverage-provider or workspace-config migration needed. vitest bumped in all 4 workspace packages to keep a single major. Verified: typecheck green (all 4 projects), root 563/563, agent 1718, app 577, sdk 118. Pre-existing order-dependent flakes (rate-limiter, CORS, viewing-key) pass in isolation and are unrelated to this bump.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Jun 25, 2026
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adopts Dependabot #331 (vitest 3→4) and #334 (jsdom 25→29) together — both are test-infra and both CI-failed as bare bumps. Verified-then-adopted.
The vitest 4 break
vitest 4's spy lib (tinyspy 4) now invokes a mock's implementation as a constructor under
new. Class mocks written as arrows throw() => ({...}) is not a constructor. Affected classes:Connection,PublicKey,AgentCore,TorqueMCPClient.Fix: converted those mocks to function form across 42 test files via an AST codemod (ts-morph):
Connection: vi.fn()...) and imperative (mockConnectionCtor.mockImplementation(...),vi.mocked(TorqueMCPClient)...) forms handled, includingas nevercasts.loadNetworkConfig,deriveViewingKey, …) are left as arrows — they're called normally, not constructed.Infra
@vitest/coverage-v8to major-match; novitest.workspace.tsto migrate.Verification
pnpm typecheckpackages/agentapp(jsdom 29)packages/sdkPre-existing order-dependent flakes (rate-limiter, CORS, viewing-key-hierarchy) pass in isolation and are unrelated to this bump.
Supersedes #331 and #334.