Skip to content

fix: analyze is read-only, --ci --json is valid JSON, clean --backups works - #11

Open
AjayBThorat-20 wants to merge 1 commit into
fix/cve-data-accuracyfrom
fix/cli-output-bugs
Open

AjayBThorat-20 wants to merge 1 commit into
fix/cve-data-accuracyfrom
fix/cli-output-bugs

Conversation

@AjayBThorat-20

@AjayBThorat-20 AjayBThorat-20 commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

What and why

  • analyze writes nothing to the project anymore. It created six .devcompass/ folders on every run, wrote a temporary knip.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. graph and fix's backups create only the folder they need and print a .gitignore tip instead of editing the file.
  • --ci --json is 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 of process.exit() mid-write.
  • clean --backups cleaned nothing. It emptied a folder nothing writes to. It now cleans .devcompass-backups/; --cache reaches ~/.devcompass/cache/, and clean gains -p/--path.
  • A failed outdated check is reported as incomplete, not "everything is up to date". A project with no dependencies skips the outdated/unused checks (no network).

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 main and CI runs.

How I tested it

🤖 Generated with Claude Code

… 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).
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