Skip to content
Discussion options

You must be logged in to vote

The node package for semver confirms that it indeed handles the v prefix.
https://www.npmjs.com/package/semver#versions
Also the parse code seems to be quite forgiving:

function parse(rawVersion) {

Here are some tests with it:

v8.13.9 -> 8.13.9
5.26.2.10099-ls280 -> 5.26.2
1.42.1.10060-4e8b05daf-ls278 -> 1.42.1
1.0.1277_17-08-2025 -> 1.0.1277
version-6.13.1 -> 6.13.1
nightly-version-2.13.2.4685 -> 2.13.2
3.1.0.1073-1-ls221 -> 3.1.0
4e00d3ba-ls21 -> 4.0.0
nightly-0.4.19.2811-ls400 -> 0.4.19

So if the version has more than 3 tags then everything gets cut off.

But it's might not be the best idea to leave it to it's devices, as the lo…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by NLZ
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants