0

Quite simply, this command works:

npm version 0.13.0-20190723T144221.855f01d 

But this one doesn't:

npm version 0.13.0-20190723T125957.0665893 

Why? It broke our build process, so it would be useful to understand why this occurred.

1
  • "Doesn't work" in what way? Error messages? Output other than expected? Formatted your hard drive? Commented Jul 23, 2019 at 15:03

1 Answer 1

2

None of the parts behind the hyphen are allowed to be numbers that have a leading 0 (unless the number equals 0).

This only applies to numbers, making both .855f01d and .0855f01d valid, but .0855 is not valid.

This can be found in Rule 9 of https://semver.org/spec/v2.0.0.html:

A pre-release version MAY be denoted by appending a hyphen and a series of dot separated identifiers immediately following the patch version.

Identifiers MUST comprise only ASCII alphanumerics and hyphen [0-9A-Za-z-]. Identifiers MUST NOT be empty.

Numeric identifiers MUST NOT include leading zeroes.

For testing purposes, you can fill in your proposed or attempted Version on this page: https://jubianchi.github.io/semver-check/#/ .

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.