Skip to content

feat: Add -v/--version flags to CLI#137

Merged
nzakas merged 2 commits intomainfrom
copilot/fix-133
Aug 22, 2025
Merged

feat: Add -v/--version flags to CLI#137
nzakas merged 2 commits intomainfrom
copilot/fix-133

Conversation

@nzakas
Copy link
Copy Markdown
Contributor

@nzakas nzakas commented Aug 22, 2025

This pull request adds support for displaying the CLI tool's version via a new --version/-v flag and introduces corresponding automated tests to ensure correct functionality. The changes improve usability by allowing users to easily check the installed version and strengthen reliability with thorough test coverage.

New CLI flag and functionality:

  • Added a --version/-v flag to the CLI options in src/bin.js, which outputs the version from package.json and exits when invoked.
  • Updated the help message to document the new --version/-v flag.

Testing enhancements:

  • Added a new test suite in tests/bin.test.js to verify that the CLI correctly displays the version for both --version and -v flags, and that the output matches the version in package.json.
  • Imported fs and defined builtExecutablePath in tests/bin.test.js to support the new tests.

Copilot AI and others added 2 commits August 22, 2025 13:16
Co-authored-by: nzakas <38546+nzakas@users.noreply.github.com>
@nzakas nzakas merged commit 798ebc4 into main Aug 22, 2025
43 checks passed
@nzakas nzakas deleted the copilot/fix-133 branch August 22, 2025 14:12
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.

2 participants