Skip to content
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

Recommend different bumping strategy for 0.x versions #294

Closed
bajtos opened this issue Mar 2, 2018 · 3 comments
Closed

Recommend different bumping strategy for 0.x versions #294

bajtos opened this issue Mar 2, 2018 · 3 comments

Comments

@bajtos
Copy link

bajtos commented Mar 2, 2018

Right now, conventional-recommended-bump does not distinguish between 0.x and post-1.0 versions when recommending the next version.

The current behaviour for 0.x versions:

  • Breaking changes bump semver-major version to 1.0.0. This is almost never wanted!
  • Features bump semver-minor version (0.<x>.0). This does not work with npm's carrot (^) operator.
  • Patches bump semver-patch version (0.x.<y>).

I am proposing to implement a different behavior for 0.x versions:

  • Breaking changes bump semver-minor version (0.<x>.0).
  • All backwards-compatible changes (features and patches) bump semver-patch version (0.x.<y>).

This allows consumers of modules to specify the dependency version as ^0.x.y to receive all backwards-compatible updates.

See https://www.npmjs.com/package/semver#caret-ranges-123-025-004:

Caret Ranges ^1.2.3 ^0.2.5 ^0.0.4
(...) this allows patch and minor updates for versions 1.0.0 and above, patch updates for versions 0.X >=0.1.0, and no updates for versions 0.0.X.

@bajtos bajtos changed the title Recommend different bump strategy for 0.x versions Recommend different bumping strategy for 0.x versions Mar 2, 2018
@bajtos
Copy link
Author

bajtos commented Mar 2, 2018

If we agree this change is welcome, then I am happy to contribute a pull request myself. However, it would great if the licensing issue #286 could be sorted out first!

@hutson
Copy link
Contributor

hutson commented Mar 2, 2018

@bajtos there was a similar issue filed several months ago - #239

conventional-recommended-bump simply determines what type of change was made (major, minor, patch) and defers to the downstream user as to what version number is generated from that release type.

@bajtos
Copy link
Author

bajtos commented Mar 2, 2018

@hbetts thank you for a quick response. I read through the discussion in #239 and npm/node-semver#177. The reasoning make sense, I am closing this issue as a duplicate and/or invalid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants