You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't think it's generally a problem to be loose with semver parsing, but I wonder if semver_parse("", ...) should fail instead of the current behavior of yielding 0.0.0?
A related side effect of this is "-1.2.3" is parsed as 0.0.0 with prerelease "1.2.3", which probably wasn't the intent of that string. In general, anything that forms a valid prerelease and/or metadata suffix is accepted as a valid semver in itself.
I don't think it's generally a problem to be loose with semver parsing, but I wonder if
semver_parse("", ...)
should fail instead of the current behavior of yielding 0.0.0?A related side effect of this is "-1.2.3" is parsed as 0.0.0 with prerelease "1.2.3", which probably wasn't the intent of that string. In general, anything that forms a valid prerelease and/or metadata suffix is accepted as a valid semver in itself.
And other strangeness:
Outputs:
All of those seem like they should, at least philosophically, result in parse failures. 🤷♂️
Having the parser verify that a major component is present would cover all those cases as well as the empty string case.
I mean, there's loose, and then there's loose... 😂
The text was updated successfully, but these errors were encountered: