semver4j
semver4j copied to clipboard
Invalid Suffix
Hi,
if i get the semantic versioning specification right (https://semver.org/#spec-item-9), the following versions sould not be valid:
Semver sv = new Semver("1.0.0-"); //Identifiers MUST NOT be empty sv = new Semver("1.0.0-alpha..1"); //Identifiers MUST NOT be empty sv = new Semver("1.0.0-001"); //Numeric identifiers MUST NOT include leading zeroes sv = new Semver("1.0.0-äöü"); //Identifiers MUST comprise only ASCII alphanumerics and hyphen
We also run into this issue. We had users enter 1.2.3.
(so with a trailing dot) as a version in our application, causing issues downstream. I believe the TS is right and this is not a valid semver according to the specification.
@amiel92 if you are still interesting, I've made copy of this lib and fix bug reported by you. Look for version 2.0.1