semver-check icon indicating copy to clipboard operation
semver-check copied to clipboard

bug: Invalid semver marked as valid

Open mattfarina opened this issue 3 years ago • 3 comments

Try the version 1.0.0-dev.01 and it will show it is valid. Except the spec says of pre-releases:

Numeric identifiers MUST NOT include leading zeroes.

mattfarina avatar Mar 22 '21 13:03 mattfarina

Could 01 possibly be interpreted as non-numeric prerelease version and thus valid?

UPD: I guess Identifiers consisting of only digits are compared numerically. rule says otherwise.

trafium avatar May 26 '21 07:05 trafium

Same goes for empty ‘identifiers’ (that’s what SemVer2 calls the parts between dots within the ‘prerelease’ field).

But this bug is more subtle too: although the version check field turns green with both of these invalid versions, the field below gives away that internally they are considered wrong (or cannot be processed at least), because it cannot tell what the next release version(s) will be.

image

image

image

vovtz avatar Sep 02 '21 14:09 vovtz