Skip to content

fix(ci): set-version.sh ate the closing quote on prerelease bumps - #113

Merged
delorenj merged 1 commit into
mainfrom
ci/set-version-prerelease-fix
Aug 4, 2026
Merged

delorenj merged 1 commit into
mainfrom
ci/set-version-prerelease-fix

Conversation

@delorenj

@delorenj delorenj commented Aug 4, 2026

Copy link
Copy Markdown
Owner

The capturing prerelease group from #112 shifted capture numbering — ${2} became the prerelease group instead of the closing quote, corrupting src/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.

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.
Copilot AI lite review requested due to automatic review settings August 4, 2026 05:49
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@delorenj
delorenj merged commit f098ffb into main Aug 4, 2026
3 checks passed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.ts replacement regex to make the optional prerelease portion non-capturing ((?:...)), preserving capture numbering for the closing quote.

@delorenj
delorenj deleted the ci/set-version-prerelease-fix branch August 4, 2026 05:52
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.

2 participants