Skip to content

Update commands semantics#217

Merged
thelovekesh merged 11 commits into
mainfrom
update/comamnds-semantics
May 16, 2026
Merged

Update commands semantics#217
thelovekesh merged 11 commits into
mainfrom
update/comamnds-semantics

Conversation

@thelovekesh
Copy link
Copy Markdown
Collaborator

  • Decouple version normalization from init command.
  • Make package details in publish command to be terminal compat.

@thelovekesh thelovekesh added enhancement New feature or request command any changes to the wpm cli command labels May 16, 2026
@github-actions
Copy link
Copy Markdown

📦 wpm cli builds 📦

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 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.

Comment thread pkg/version/version.go
Comment thread cli/command/publish/publish.go Outdated
@thelovekesh thelovekesh force-pushed the update/comamnds-semantics branch 5 times, most recently from b962a20 to dc7d422 Compare May 16, 2026 13:55
@thelovekesh thelovekesh force-pushed the update/comamnds-semantics branch 2 times, most recently from 217ef3a to b162ae7 Compare May 16, 2026 14:21
@thelovekesh
Copy link
Copy Markdown
Collaborator Author

/gemini review

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 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.

Comment thread pkg/version/version.go Outdated
Comment thread pkg/streams/out.go Outdated
@thelovekesh
Copy link
Copy Markdown
Collaborator Author

/gemini review

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 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.

Comment thread pkg/version/version.go
Comment thread pkg/version/version.go
Comment thread cli/command/publish/publish.go
@thelovekesh thelovekesh merged commit 114a180 into main May 16, 2026
17 checks passed
@thelovekesh thelovekesh deleted the update/comamnds-semantics branch May 16, 2026 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

command any changes to the wpm cli command enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant