-
Notifications
You must be signed in to change notification settings - Fork 511
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[QUESTION] Incorrect loose parsing of version? #164
Comments
Also using |
That is indeed quite curious! I agree with your expectation here. This is a bug. To determine whether this is going to be a breaking change, though, we should check the registry to make sure there aren't any examples of this kind of oddness in the wild. |
I have the expectation that this |
@blanchma, As it still isn't supported in loose mode, IMO, you should create a separate issue about expanding the scope of loose parsing to include |
I have mixed feelings about this, and loose mode in general. Personally I think it makes more sense in extensions/more general version parsers (e.g. https://github.com/megawac/semvish) |
I'm seeing this as well. This is because I'm trying to use
Even adding |
@Mark-Hatch-Bose Yes, that is the same issue as referenced earlier in this issue, which would be addressed by PR #167, but we never landed that, and it would be a breaking change. In general, loose versions are not very well specified, and have some weird edge cases as a result. Would the solutions discussed in #167 solve your problem? |
From #167
The PR looks hopeful to my understanding but the comment above makes this seem like it's still not quite there yet. Still confused why a solely numeric version Maybe this is best solved with an optional parameter defining the behavior desired? Or do we know of examples where the above use-case (numeric only loose version desired to be interpreted as prerelease for any single digit beyond patches) is actually being used? It seems farfetched. |
Currently, because loose mode does not require a
Not that I can see, no. There aren't a lot of folks using loose mode with >3 numbers in the tuple, as far as I can tell from the inactivity on this issue, which is presumably why it was forgotten for 2 years. |
Ah I see, thanks for the explanation. I didn't understand the parsing order I think. If the change is made for loose versioning to support |
Let '.' start non-numeric prerelease in loose mode
I'm using the
semver.valid()
function (withloose = true
) to check if strings are possibly semantic versions and I've got an unexpected result with one of the inputs:When in loose mode I'd expect this to either fail to parse it and return
null
or parse it as9.4.1208-jre7
.Can anyone explain this behaviour or is it a bug?
The text was updated successfully, but these errors were encountered: