Repository navigation
fix(ci): set-version.sh ate the closing quote on prerelease bumps - #113
Merged
Merged
Conversation
The capturing group added in #112 shifted capture numbering: ${2} became the prerelease group instead of the closing quote, so the substitution ate the trailing quote in src/index.ts (TS1002 Unterminated string literal). Use a non-capturing group (?:...) so group 2 stays the quote. Verified end-to-end: stable→beta and beta→stable bumps leave the literal intact.
Contributor
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes the prerelease-aware set-version.sh Perl substitution so the closing quote capture group remains stable when a prerelease suffix is present, preventing corruption of the src/index.ts version: '...' literal during prerelease bumps.
Changes:
- Update the
src/index.tsreplacement regex to make the optional prerelease portion non-capturing ((?:...)), preserving capture numbering for the closing quote.
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.
The capturing prerelease group from #112 shifted capture numbering —
${2}became the prerelease group instead of the closing quote, corruptingsrc/index.ts(version: '2.0.0-beta.0,→ TS1002). Non-capturing group fixes it; verified stable→beta and beta→stable end-to-end on a scratch repo with full-line assertions this time.