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
Using semver 7.7.1 (and possibly earlier versions), attempting to coerce a version string that contains a prerelease identifier that starts with digits, will result in that identifier to be truncated after the digits.
Is there an existing issue for this?
Current Behavior
Using semver
7.7.1
(and possibly earlier versions), attempting to coerce a version string that contains a prerelease identifier that starts with digits, will result in that identifier to be truncated after the digits.Here are some example:
1.0.0-alpha.1ab
produces1.0.0-alpha.1
1.0.0-alpha.12ab
produces1.0.0-alpha.12
1.0.0-alpha.1234.23cd
produces1.0.0-alpha.1234.23
This is problematic when the identifier is a hash that may start with a digit.
The issue doesn't seem to happen if the identifier is composed of only number, or if the identifier starts with an alphabetic character:
1.9.5-nightly.abc123
is coerced as expected1.9.5-nightly.abcdef
is coerced as expected1.9.5-nightly.123456
is coerced as expectedExpected Behavior
The prerelease identifier isn't truncated.
Steps To Reproduce
node index.mjs
Environment
The text was updated successfully, but these errors were encountered: