v0.1.9: fix prerelease comparison treating rc.10 as older than rc.9#13
Merged
Conversation
ComparePrerelease used string.CompareOrdinal, which orders "rc.9" after
"rc.10" character-by-character ('9' > '1'), so `update --prerelease` on
0.5.0-rc.9 reported "Already up to date" against a 0.5.0-rc.10 release.
Comparison now follows Semantic Versioning §11: dot-separated prerelease
identifiers compare left to right, numeric identifiers compare numerically,
numeric ranks below alphanumeric, and a longer identifier set outranks a
shorter one with an equal prefix.
Also bumps all NuGet dependencies to their latest versions.
Co-Authored-By: Claude Opus 4.8 (1M context) <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.
Problem
pl-app update --prereleaseon0.5.0-rc.9reported "Already up to date" against a0.5.0-rc.10release:Cause
UpdateChecker.ComparePrereleaseusedstring.CompareOrdinal, which compares"rc.9"vs"rc.10"character-by-character.'9'(0x39) sorts after'1'(0x31), so it concludedrc.9was newer thanrc.10.Fix
Prerelease comparison now follows Semantic Versioning §11:
rc.10>rc.9)beta.1>beta)Added test cases for the exact reported scenario plus the surrounding semver rules. All 196 tests pass.
Also
🤖 Generated with Claude Code