Skip to content

fix: [sc-139428] binary-version-reader` CLI output is not valid JSON#99

Merged
monkbroc merged 3 commits intomasterfrom
bug/sc-139428/binary-version-reader-cli-output-is-not-valid
May 1, 2026
Merged

fix: [sc-139428] binary-version-reader` CLI output is not valid JSON#99
monkbroc merged 3 commits intomasterfrom
bug/sc-139428/binary-version-reader-cli-output-is-not-valid

Conversation

@monkbroc
Copy link
Copy Markdown
Member

@monkbroc monkbroc commented May 1, 2026

Story details: https://app.shortcut.com/particle/story/139428

Make the output of npx binary-version-reader usable as JSON.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the binary-version-reader command-line interface to emit machine-consumable JSON so its output can be reliably piped into tools like jq.

Changes:

  • Added a CLI-focused unit test that validates JSON output and error behavior.
  • Updated cli.js to print JSON.stringify() output (and omit fileBuffer) instead of console.dir().
  • Refreshed README CLI documentation and example output to reflect JSON output.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
specs/lib/cli.spec.js Adds tests asserting the CLI returns parseable JSON and proper exit code on missing file.
cli.js Switches CLI output to structured JSON and adds error handling.
README.md Documents JSON CLI output and shows piping to jq.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread specs/lib/cli.spec.js
Comment thread specs/lib/cli.spec.js
Comment thread cli.js
Comment thread README.md
@monkbroc monkbroc merged commit 8a55335 into master May 1, 2026
7 checks passed
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.

3 participants