A colleague asked me a couple of days ago: “So we roll version numbers forward only with breaking changes, right?”
Well, the best approch for any sane project in 2017 is to follow Semantic Versioning. That is not a long document to read, but here is a summary. In a nutshell, version numbers have three facets, major.minor.patch.
- If your new release breaks something that used to work, increment major.
- If your release adds new functionality that clients might want to rely on, increment minor.
- If your release only fixes a bug, increment patch.
Then dependencies of the form “^3.4.2” (for example, in package.json for a JavaScript project) mean “that version, or anything backwards-compatible with it”. Which means the same major version number (3 in this case) and the same or better minor number (4 or higher); or, if the minor version is the same, then the same or better patch level (2 or higher).

This is an excellent, simple and battle-proven system.
However. Continue reading →