On npm I read:
To help developers who rely on your code, we recommend starting your package version at 1.0.0 and incrementing as follows:
Assuming that the way packages are actually versioned in the real world matches the above recommendation; when they use the ambiguous word "incrementing", do they mean to recommend:
- The next release to be versioned either 1.0.1, 1.1.0 or 2.0.0
- The next release to be versioned anything greater than 1.0.0 (e.g. even 1.0.9)
Relevant example:
You have "your-package" published on npm as v1.0.0
You work on it, refactor the code, fix a bunch of bugs and tag the last commit as v1.0.1
Then you notice a serious bug and after fixing it, you put a v1.0.2 tag
Now you decide to publish a release, if you was to publish the release as v1.0.2 (without a v1.0.1 ever being published) would you be going against npm recommendation?
>Solution :
The general rule is that the versions you publish should use this scheme, which is called semantic versioning. If you’ve made a public v1.0.1 release in the repository, even if you haven’t published it to npm, then you should make the next bugfix release v1.0.2. You definitely should not upload your tagged v1.0.2 release to npm as v1.0.1, since that’s going to cause a lot of confusion.
However, absent a compelling reason, you should try not to have gaps in the way that you publish. Sometimes that happens for whatever reason, say, due to a CI bug, but overall you should try to avoid it.