-
Notifications
You must be signed in to change notification settings - Fork 492
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
Shorthand syntax for ranges like ">=1.2 <2.0"? #38
Comments
Set your dependency to version 1.x.x?
|
In that case it's not clear what's the minimal Minor version the module is On Sat, Jul 6, 2013 at 10:16 AM, Adam Tuttle notifications@git.luolix.topwrote:
|
How about It sounds like you're looking for a looser |
You're right, I would say, if you consider this behavior interesting like I do, that's actually the behavior I'd expect from the tilde. I don't think its current meaning matches any meaninful semver understanding. Why would you not accept Minor updates? Since they are to be backwards compatible, the only reason would be to avoid bigger dependencies, and I don't think that's so important, do you? Granted, incorporating bugfixes in greater Minor versions would be much more important than that. Of course, the loosened tilde should still match no prerelease versions. Also, because of the nature of Minor bumps, loosening the current implementation of the tilde shouldn't break anything either. It could even be done in I know this may sound minor (no pun intended), but once you give it some thought, let me know your rationale not to loosen |
I was also a little surprised to discover that However, it does seem that it would make sense for there to be a shorthand for this, since it really should be in a sense the "default" - it maps closest to the meaning "I require at minimum package level X, but would like all backwards-compatible updates". Here's two options that might not suck too much for the proposed operator:
Of course there are plenty of other options, and I think it's far less important which particular operator is used than that there is one. Ideally someday maybe it could even be the default for |
I'm guessing this has already been brought up in the past, but I couldn't find this discussion on the web. I'm sorry if this is a recurring question.
In my understanding of semver v2, it should be safe (and desirable, I think) to install packages of greater Minor versions than the minimal one with which the package was originally implemented, because Minor bumps should be backwards-compatible.
Desirability comes from the idea that if I implement something that depends on module
abc@1.2.3
at one point, and abc evolves a lot and reaches version 1.9.9, version 1.9.9 is likely to have improvements over 1.2.3 funcionality that were not introduced as 1.2 bugfixes.It takes a very diligent maintainer to fix a bug of 1.2 functionality on version 1.9.x and create a 1.2 bugfix for it. In fact, he would need to create one bugfix for each Minor version in the 1.2~1.9 range, or at least for each tag in that range. Normally, they just tell you to update the package if you encounter problems, which is fine, but currently that's only automatically done by npm in bugfix increments, since people are instructed to use 1.2.x notation.
Even though Minor bumps mostly introduce new functionality, they may also introduce bugfixes that I would like npm to install for me without requiring me to update my
package.json
.Thoughts?
The text was updated successfully, but these errors were encountered: