chore: rewrite increment-version in typescript with an auto-commit op… - #1533
Merged
Conversation
…tion Replaces scripts/increment-version.sh with scripts/increment-version.ts, run directly by node with no dependencies beyond the standard library. - `--commit` makes the `chore: release v<version>` commit itself, by explicit pathspec so unrelated staged work stays staged. It commits only; the tag remains the release workflow's. - `--bump` and `--yes` replace piping answers into the bash `select` prompt, and are required when stdin is not a terminal. - The version fields are re-read after the rewrite and asserted equal, so the root-only bump that publishes nothing while CI stays green fails here. - Output is styled through node:util styleText, which degrades to plain text under NO_COLOR or when piped. The version field is still rewritten textually rather than through a JSON round-trip, and list-publishable.sh remains the only source of truth for what is publishable. Every in-repo reference to the old path is updated. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Cz7sSmTSL4tgT6wd3ZpUzi
The commit was reachable only through --commit. It is now a y/N prompt in the interactive run, with --commit as its non-interactive answer, the way --yes answers the confirmation; --yes on its own leaves it at its default of no. The prompt sequence moves into planRelease, which returns the bump and the commit choice together, so main no longer carries a half-assigned newVersion across a try/finally. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Cz7sSmTSL4tgT6wd3ZpUzi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
adjust increment-version script and release new version