-
Notifications
You must be signed in to change notification settings - Fork 494
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
special-case for 0.x in ^ is very counter-inutitive and rage-inducing #79
Comments
I've started using < 1.0.0 for modules I consider to be not ready for general use. Anything that I think is ready for other people, i make v1.0.0, and go from there. I understand where you are coming from though, as probably 50 of my modules are < 1, and I run into the same issue constantly. I'm re-versioning them as I come across them. |
There is a reason why all my new modules start at version 1.0.0 . The same goes for @dominictarr I believe @isaacs did a survey of what users of npm thought We should make a PR on |
@Raynos so all modules would initially be marked as stable? I don't think that's a good workaround. |
This is actually part of the spec and it's awfully confusing and prone to abuse.
What does 'stable' even mean though? There's plenty of modules that never, ever change their API, so you could consider them 'stable' but never live to break away from 0.x because of this illogical fear of major version number commitment.
The npm ecosystem is infamous for being of flakey quality and everything being perpetually stuck in 0.x doesn't help as it mostly defeats purpose of using semver at all. Going 1.x out of the box might help decrease people's threshold for what constitutes acceptably "stable", and increase people's sense of responsibility to not break API's and overall getting more people using semver correctly. |
@Raynos no, @isaacs implemented the official spec... which is a bit bloated. it's the most explicit is to either use |
the worst part of semver is that it couples a representation of the change with future expectations of stability. These two things should be independent. Still want to indicate the nature of the change even if the module is not stable. |
What @dominictarr said bugs the heck out of me too. |
@aredridel prehaps the best compromize that is closest to spec following is to use semver the good parts, plus, use the same spec but shifted across one (and just But even better is just use simple semver, and just indicate stability separately in the documentation. |
also, using ^ will break all the node@0.8 tests on travis. |
Yes, that's my strategy so far. Stability is complex, so needs documentation and discussion. I just label my interface compatibility. |
Agree, people should be going to 1.0 sooner and just bump major when they need to. Don't stop using |
@dominictarr |
Seems I'd love to see this ported to RubyGems etc. And I'd love to see people stop depending on 0.y.z releases. |
The If you're using version numbers differently from how the SemVer spec suggests, then I'm fine with that. So, no, we're not going to change the default. It's configurable. Set it however you want. I think that maybe we could do a patch release of 0.8 for Travis just to get a newer node-semver in there, though. Would that be worthwhile? Or would it be better to just hasten 0.8's inevitable decline and deprecation? |
@isaacs I think if we #ship 0.12 then we can remove 0.8 from all our travis files. cc @tjfontaine #shipit |
@Raynos but won't that cause everyone who installs your module to update to the latest npm? |
@dominictarr i meant the travis preinstall hook in the |
@Raynos yes - okay I can rest easy now. |
Also things I had to do: git commit -m "Module generated by goodeggs-npm" git push --set-upstream origin master Add a project description on GitHub
Since the SemVer spec is weirdly magical about 0.x.y versions, and we cannot ever hope to get everyone to believe what the correct interpretation of 0.x versions are, let's just skip them entirely.
- addressing semver ^0.x special case: npm/node-semver#79 - bumping from v0.57 to v0.60 per rollup-plugin-babel requirement
I just started using ^ but am now completely stripping out ^ everywhere because the special case with 0.x makes it extremely counter-intuitive behavior, especially where swapping ~ for ^ is concerned.
I just went through a package.json recently and was pulling my hair out trying to figure out why
"duplexer2": "^0.0.1"
wasn't installing 0.0.2 until I found #41.We currently have no way of tersely describing "up to the next major release" without special cases for 0.x. As it stands I'm not going to be using ^ anymore anywhere.
The text was updated successfully, but these errors were encountered: