Masterminds / semver

Work with Semantic Versions in Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Zero Major Caret Special Case

tarrencev opened this issue · comments

The semver specification has a special case for the caret constraint when the major version is zero. In that case it is equivalent to tilde. It is described a bit more here: https://nodesource.com/blog/semver-tilde-and-caret/

Would you be ok with me adding this logic?

Edit: Hm i see this is described here but i'm seeing a different behavior

semver/doc.go

Line 152 in 49c09bf

* `^0.2` is equivalent to `>=0.2.0 <0.3.0`

Ah I was pulling an old version of the lib. Works great in v3!