You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
compare-versions,6.1.1
According to https://semver.org/, dot-separated identifiers with letters or hyphens are sorted by ASCII values
Then 1.0.0-alpha-9.9A and 1.0.0-alpha-9.10A should be sorted by ASCII with "9A" and "10A", the first character '9' > '1',so it should be "1.0.0-alpha-9.9A" greater than "1.0.0-alpha-9.10A", but the result is the opposite.
But if changed to "1.0.0-alpha-9. A9A" and "1.0.0-alpha-9. A10A", "1.0.0-alpha-9. A9A" is bigger.
It seems that if a dot-separated identifier is prefixed with a number, compare-versions will be compared numerically, which does not meet the rule of "Identifiers with letters or hyphens are compared lexically in ASCII sort order".
The text was updated successfully, but these errors were encountered:
compare-versions,6.1.1
According to https://semver.org/, dot-separated identifiers with letters or hyphens are sorted by ASCII values
Then 1.0.0-alpha-9.9A and 1.0.0-alpha-9.10A should be sorted by ASCII with "9A" and "10A", the first character '9' > '1',so it should be "1.0.0-alpha-9.9A" greater than "1.0.0-alpha-9.10A", but the result is the opposite.
But if changed to "1.0.0-alpha-9. A9A" and "1.0.0-alpha-9. A10A", "1.0.0-alpha-9. A9A" is bigger.
It seems that if a dot-separated identifier is prefixed with a number, compare-versions will be compared numerically, which does not meet the rule of "Identifiers with letters or hyphens are compared lexically in ASCII sort order".
The text was updated successfully, but these errors were encountered: