Skip to content

Add a top-level Hunk version command#19

Merged
benvinegar merged 1 commit intomasterfrom
feat/cli-version-command
Mar 22, 2026
Merged

Add a top-level Hunk version command#19
benvinegar merged 1 commit intomasterfrom
feat/cli-version-command

Conversation

@benvinegar
Copy link
Member

Summary

  • add hunk --version, hunk -v, and hunk version
  • resolve the packaged version from the shipped manifest instead of hardcoding it
  • cover both parser and spawned-CLI version output in tests

Why

We needed an easy way to verify which Hunk build is actually running after beta installs, especially while testing the new prebuilt npm release flow.

What changed

  • src/core/cli.ts
    • adds version resolution from nearby package.json
    • handles top-level --version, -v, and version
    • advertises -v, --version in the help text
  • test/cli.test.ts
    • verifies top-level version parsing
  • test/help-output.test.ts
    • verifies the spawned CLI prints only the version string without terminal takeover sequences

Validation

  • bun run typecheck
  • bun test test/cli.test.ts test/help-output.test.ts

@benvinegar benvinegar merged commit 8cf5088 into master Mar 22, 2026
9 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.

1 participant