chore: drop NODE_COMPILE_CACHE + harden .env allowlist + ignore .cache/#1279
Open
John-David Dalton (jdalton) wants to merge 3 commits intomainfrom
Open
chore: drop NODE_COMPILE_CACHE + harden .env allowlist + ignore .cache/#1279John-David Dalton (jdalton) wants to merge 3 commits intomainfrom
John-David Dalton (jdalton) wants to merge 3 commits intomainfrom
Conversation
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 633bb68. Configure here.
Removes the project-level NODE_COMPILE_CACHE="./.cache" pin from .env.example and the now-redundant ".cache/**" excludes from both tsconfigs. The compile-cache pollution at repo root is noise that has no consumer in the codebase — vitest already writes its own cache under node_modules/.cache/.
…ommit-msg env allowlist, add **/.cache/ ignore Cursor Bugbot flagged that .env.precommit and packages/cli/.env.test still set NODE_COMPILE_CACHE="./.cache", so pre-commit hooks and test runs were still creating .cache/ at repo root. Removed both. The commit-msg hook's .env allowlist regex was anchored to the repo root (^.env.test$) and missing .env.precommit entirely, so committing the above edits was blocked. Switched to basename-based matching and added .env.precommit. Also added !.env.precommit and !.env.test to .gitignore so the templates stay re-traceable if re-added. Added **/.cache/ as a defensive gitignore so any tool dropping cache there (corepack, pnpm RC, external Node compile-cache invocations) stays untracked.
633bb68 to
a4f3ca0
Compare
Adds .cache/** back to every tsconfig with an exclude array — the previous commit dropped it from tsconfig.json and packages/cli/tsconfig.json on the assumption that .cache/ would not be created, but the new **/.cache/ gitignore is defense-in-depth, not prevention. Stray writers (Node compile-cache, corepack, pnpm RC) will still drop files there, and tsc would otherwise try to type-check them. Also adds the entry to the two tsconfig.check.json configs that did not previously list it. Sorted alphabetically for consistency.
Contributor
Author
|
Addressed in 499aeb2 + a4f3ca0:
|
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
NODE_COMPILE_CACHE="./.cache"pin from every place it was set (.env.example,.env.precommit,packages/cli/.env.test). Nothing in the codebase consumed the on-disk cache it produced — thevX.Y.Z-arch-hash-uiddirectories at repo root were pure noise from per-developer Node invocations..envallowlist: switches the file-name check from full-path-anchored regex to basename matching so nested.env.testfiles (e.g.packages/cli/.env.test) are not erroneously blocked, and adds.env.precommitto the allowlist alongside.env.exampleand.env.test. The previous regex wouldn't have allowed any of the templates this repo actually tracks except the root.env.example..gitignoreso the existing.env.*blanket-ignore pattern doesn't shadow them: adds!.env.precommitand!.env.test.**/.cache/as a defensive.gitignoreentry so stray writers (corepack, pnpm RC, ambient Node compile-cache) stay untracked..cache/**excludes intsconfig.json+packages/cli/tsconfig.json, and adds them to the twotsconfig.check.jsonfiles that did not previously list them. The**/.cache/gitignore is defense-in-depth, not prevention; tsc would still try to type-check anything that leaked through.The
clean:cachepnpm script (del-cli '**/.cache') is unchanged — it still functions as the explicit cleanup path.Test plan
pnpm teststill passes locally (config-only — no source changes).node_modules/.cache/vitest(already configured in.config/vitest.config.base.mts:34)..cache/at repo root after running unit tests.