-
Notifications
You must be signed in to change notification settings - Fork 75
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
Support NPM verison ">=" following by a whitespace #127
Comments
Hey! That's an interesting suggestion; however, the specification at https://github.com/npm/node-semver#range-grammar does not allow that form:
Would you have any pointer to the |
Also, please note that this is the same topic as discussed in #115 and in |
My preference would be to accept that node-semver documented specs are incomplete and that the only correct spec is the JS code? What do you think? |
I have a workaround. I clean the versions where I can, ignore version in some cases. 100% accuracy (accuracy is defined by interoperability with NPM install) is not critical in my use case. |
@larytet re:
Thanks! this helps. I guess we will need this in https://github.com/nexB/univers/blob/6ad300ea515f99ffaae8b6a160724c32f027b5c0/src/univers/version_range.py#L226 for correctness so @larytet is there some code we can stole from you for this? 😇 |
This is a proprietary code. There is not anything complex. I remove whitespaces, I apply a few simple regex. Please keep in mind that there is less ~3% packages (if my memory serves) with non complying versions. I left the project and I can't check it now. |
Any news regarding this ticket?
|
@SpecialK118 The upstream discussion in npm/node-semver#392 hasn't had any movement. I would like to decide this based on an explicit documented behaviour on NPM end, but couldn't find any. |
@rbarrois |
For example
>= 1.4.0 < 2
Apparently there are ~30K packages in the NPM which dependencies lists have versions with a white space.
Also support for
latest
I see also (illegal?)
~2.2.0rc
More outlandish examples:
^v2.7.4
,> =3.10
,~>1.4.1
,~ 2.0.0
,^0.20.0 && >=0.20.0
,^00.5.1
In the package
@ansyn/core
0.2.82.4
The text was updated successfully, but these errors were encountered: