Update commands semantics#217
Conversation
thelovekesh
commented
May 16, 2026
- Decouple version normalization from init command.
- Make package details in publish command to be terminal compat.
There was a problem hiding this comment.
Code Review
This pull request refactors version normalization into a new dedicated package and updates the publish command to conditionally format output for terminals. Feedback indicates that the new Normalize function fails to handle leading zeros and short forms as documented because the underlying semver library is stricter than expected. Additionally, the change to the publish command suppresses critical package information in non-terminal environments like CI/CD; it is recommended to provide a plain-text fallback for these logs.
b962a20 to
dc7d422
Compare
217ef3a to
b162ae7
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request centralizes version normalization into a new pkg/version package and refactors the init command to use it. It also improves terminal output by ensuring color codes are only applied when supported and adds support for the FORCE_COLOR environment variable. Feedback highlights a regression in the new Normalize function where leading zeros in pre-release segments cause validation failures, and suggests consistent handling of the "0" value for the FORCE_COLOR variable.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request centralizes version normalization logic into a new pkg/version package, replacing local implementations and adding comprehensive test coverage. It also improves terminal output by adding support for the FORCE_COLOR environment variable and introducing conditional ANSI styling in the publish command. Feedback includes suggestions for early input validation in the normalization function to prevent processing excessively long strings, refining the handling of leading zeros in prerelease segments, and refactoring the terminal color helper into a reusable utility.