chore(test): move vitest cache to node_modules/.cache#1274
Merged
John-David Dalton (jdalton) merged 1 commit intomainfrom Apr 24, 2026
Merged
chore(test): move vitest cache to node_modules/.cache#1274John-David Dalton (jdalton) merged 1 commit intomainfrom
John-David Dalton (jdalton) merged 1 commit intomainfrom
Conversation
`pnpm install` already clears `node_modules/` (and its `.cache/` subdir) automatically, so pinning vitest's cacheDir there gives us free cache invalidation on every install without needing a dedicated clean step. Matches the pattern applied in ../socket-packageurl-js, ../socket-sdk-js, and ../meander. Applied to the shared vitest base config (the isolated config extends from it, so it picks up the change automatically). Dropped `**/.cache/` from .gitignore — nothing writes to a top-level `.cache/` anymore; remaining cache consumers all land under node_modules.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is ON. A cloud agent has been kicked off to fix the reported issue.
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 021b8ac. Configure here.
James Tu (jmsjtu)
approved these changes
Apr 24, 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.

Summary
cacheDirmoves from<repo>/.cache/vitestto<repo>/node_modules/.cache/vitestin the shared vitest base config. The isolated config extends from it, so it picks up the change automatically.pnpm installalready wipesnode_modules/(and its.cache/subdir), so this buys us free cache invalidation on every install — no dedicated clean step needed.../socket-packageurl-js,../socket-sdk-js(Cleanup debugFn messages #616), and../meander.**/.cache/from.gitignoresince nothing writes to a top-level.cache/anymore.Test plan
pnpm lint+pnpm test+pnpm run build.pnpm install/pnpm test— not run here; the worktree I authored this from had a pre-existingpackages/package-builder/build/…workspace-link issue that blocked install. The pre-commit hook's docstring expressly allows--no-verifyfor local bypass while the pre-push hook continues to enforce security checks, so the commit was made with--no-verifyknowing CI will fully verify. Nothing in the diff would be affected by the skipped local check (it's a 2-line config change + gitignore cleanup).Note
Low Risk
Low risk: only changes test runner cache location and a gitignore pattern, with no runtime or production code impact.
Overview
Vitest now writes its cache to
node_modules/.cache/vitest(instead of a top-level.cache/vitest), relying onpnpm installto naturally invalidate caches by wipingnode_modules/..gitignoreis tightened by removing the broad**/.cache/ignore since the repo no longer uses a top-level.cache/directory for Vitest.Reviewed by Cursor Bugbot for commit 021b8ac. Configure here.