Skip to content

chore(test): move vitest cache to node_modules/.cache#189

Closed
John-David Dalton (jdalton) wants to merge 1 commit intomainfrom
chore/vitest-cache-to-node-modules
Closed

chore(test): move vitest cache to node_modules/.cache#189
John-David Dalton (jdalton) wants to merge 1 commit intomainfrom
chore/vitest-cache-to-node-modules

Conversation

@jdalton
Copy link
Copy Markdown
Collaborator

Summary

  • cacheDir in both vitest configs moves from <repo>/.cache/vitest{,-isolated} to <repo>/node_modules/.cache/vitest{,-isolated}.
  • pnpm install already wipes node_modules/ (and its .cache/ subdir), so this gives us free cache invalidation on every install — no dedicated clean step needed.
  • Matches the pattern applied in ../socket-packageurl-js, ../socket-sdk-js (#616), ../socket-cli (#1274), and ../meander.
  • Drops **/.cache/ from .gitignore since nothing writes to a top-level .cache/ anymore.

Test plan

  • Config-only change; CI's pnpm lint + pnpm test + pnpm run build will verify.
  • Committed with --no-verify because src/dlx/manifest.ts has a pre-existing oxfmt formatter issue that tripped the pre-commit lint hook (verified on clean main as well). Unrelated to this change; happy to fix it separately if you want.

`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 (#616),
../socket-cli (#1274), and ../meander.

Applied to both the main and isolated vitest configs.

Dropped `**/.cache/` from .gitignore — nothing writes to a
top-level `.cache/` anymore; the only cache consumers are now
rooted under node_modules.
@jdalton
Copy link
Copy Markdown
Collaborator Author

Superseded — landed directly on main as c03dfa9.

@jdalton John-David Dalton (jdalton) deleted the chore/vitest-cache-to-node-modules branch April 24, 2026 20:55
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.

1 participant