Repository navigation
fix(scripts): sync-version.js が prerelease の版を扱えるようにする - #34
Merged
Merged
Conversation
- 版の正規表現を \d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)? にし、1.3.0-rc.1 のような prerelease を 1 つの版として置き換える。これまでは [\d.]+ が 1.2.0 の部分だけを 拾い、-rc.1 が後ろに残っていた - 置き換えるのは、もともと版を書いている箇所だけにする。版の無い `npm install @maplat/<名前>` などに版を足していた挙動をやめる - 一時ディレクトリに写した README で、prerelease 版と通常の版への同期を確かめる テストを足す Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
何を変えるか
scripts/sync-version.jsを prerelease の版(1.3.0-rc.1など)に対応させます。\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?にし、prerelease を含む版を 1 つの版として置き換えます。これまでは[\d.]+が1.2.0の部分だけを拾うため、1.2.0-rc.1を1.3.0に同期すると1.3.0-rc.1が残っていました。npm install @maplat/<名前>の行にも版を足していました。確かめたこと
versionを1.3.0-rc.2にすると、版つきの行がすべて1.3.0-rc.2に替わり、-rc.1が残らず、版の無い行は変わらないversionを1.3.0にすると、-rc.が 1 つも残らないnode scripts/sync-version.jsを走らせた後のgit diffは空(versionは今のまま)pnpm test・pnpm run typecheck・eslint は exit 0🤖 Generated with Claude Code