Skip to content

feat: add --version flag to CLI#40

Merged
dastratakos merged 1 commit into
mainfrom
dastratakos/republish-npm-package
May 7, 2026
Merged

feat: add --version flag to CLI#40
dastratakos merged 1 commit into
mainfrom
dastratakos/republish-npm-package

Conversation

@dastratakos
Copy link
Copy Markdown
Contributor

@dastratakos dastratakos commented May 7, 2026

Summary

Add stagereview --version support so users can check which version they have installed.

Changes

  • Use Commander's built-in .version() to register the --version / -V flag
  • Read the version from package.json at runtime via createRequire

Testing

  • pnpm typecheck, pnpm lint, and pnpm test all pass
  • Built and verified stagereview --version outputs 0.1.2

Open in Stage

Use Commander's built-in .version() support, reading the version
from package.json at runtime via createRequire.
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces dynamic versioning for the CLI by reading the version directly from package.json. The reviewer suggests extending this approach to include the package name as well, which would further improve maintainability by centralizing configuration.

Comment thread packages/cli/src/index.ts
@dastratakos dastratakos marked this pull request as ready for review May 7, 2026 19:16
@dastratakos dastratakos merged commit 0ed8955 into main May 7, 2026
5 checks passed
@dastratakos dastratakos deleted the dastratakos/republish-npm-package branch May 7, 2026 19:16
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