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 needed to parse versions of a library that has versions such as "0.7-beta" and "1.0". Because these versions aren't strictly semver syntax, I had to fudge it a bit by appending .0 as a fallback.
It's a bit weird to ask for non-semver parsing in a semver library, but maybe it's something you'd consider (I can imagine it might be useful in other cases, such as correcting user input that is supposed to be semver, but isn't).
Interface-wise perhaps ParseError could have a field with a best-effort parsed Version object.
The text was updated successfully, but these errors were encountered:
And if we wanted to add a field to ParseError then it would probably be good to solve #135 using a black-box structure that could expose this through a method.
I think I'd like to keep this crate in accordance with the spec. If I did add it, I would want it to be under a different api, like _lossy or something, and at that point, it could be in a separate crate.
Thank you, but I'm not going to take PRs for this.
I needed to parse versions of a library that has versions such as "0.7-beta" and "1.0". Because these versions aren't strictly semver syntax, I had to fudge it a bit by appending
.0
as a fallback.It's a bit weird to ask for non-semver parsing in a semver library, but maybe it's something you'd consider (I can imagine it might be useful in other cases, such as correcting user input that is supposed to be semver, but isn't).
Interface-wise perhaps
ParseError
could have a field with a best-effort parsedVersion
object.The text was updated successfully, but these errors were encountered: