Repository navigation
fix: analyze is read-only, --ci --json is valid JSON, clean --backups works - #11
Open
AjayBThorat-20 wants to merge 1 commit into
Open
AjayBThorat-20 wants to merge 1 commit into
AjayBThorat-20 wants to merge 1 commit into
Conversation
… works - analyze no longer creates .devcompass/ folders, writes a knip.json, or appends to the project's .gitignore on every run. The analysis cache moves to ~/.devcompass/cache (keyed by project path); knip's temp config goes to the OS temp dir and is removed. graph and fix's backups create only the folder they need and print a .gitignore tip instead of editing it. - --ci --json: the CI status line goes to stderr and the CLI sets process.exitCode from the result, instead of printing after the JSON and calling process.exit() inside runAnalyze(). - clean --backups emptied .devcompass/backups/, which nothing writes to, and reported success; it now cleans .devcompass-backups/. --cache reaches ~/.devcompass/cache. clean gains -p/--path. - A failed outdated check is reported as incomplete, not as "up to date"; projects with no dependencies skip the outdated/unused checks (no network).
2 of 3 tasks
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.
What and why
analyzewrites nothing to the project anymore. It created six.devcompass/folders on every run, wrote a temporaryknip.json, and appended.devcompass/to the project's.gitignore. The cache now lives in~/.devcompass/cache/(keyed by project path), and knip's config goes to the OS temp dir and is deleted afterwards.graphandfix's backups create only the folder they need and print a.gitignoretip instead of editing the file.--ci --jsonis valid JSON again. The "CI Check Passed/Failed" line went to stdout after the JSON; it now goes to stderr, and the exit code is set from the result instead ofprocess.exit()mid-write.clean --backupscleaned nothing. It emptied a folder nothing writes to. It now cleans.devcompass-backups/;--cachereaches~/.devcompass/cache/, andcleangains-p/--path.Stacked on #10.
Merging the stack: use Create a merge commit, not squash (squashing makes every later PR show these commits again). After merging the PR below this one, click Delete branch on it; GitHub then retargets this PR to
mainand CI runs.How I tested it
npm run test:coverageon Node 24.21.0, cleannpm ci, network disabled: 121/121 pass, 35.9% linesnpm audit --audit-level=highcurrently fails on GHSA-mrwp-f3q8-3g9p (follow-redirects, published after this branch was made); the lockfile fix is in feat: rank vulnerabilities by exploit risk (CISA KEV + FIRST EPSS) #14analyzeon a fixture project:git statusclean afterwardsanalyze --ci --json > out.jsonparses🤖 Generated with Claude Code