-
Notifications
You must be signed in to change notification settings - Fork 5
Semantic versioning
How this project uses Semantic Versioning (semver)
This product follows the Semantic Versioning 2.0 specification for communicating changes by type to both humans and software agents.
ℹ️ Bumps are
major
,minor
, orpatch
version increments.
This project increments its product's semver without regard to a release.
Every change intended for the master
branch must have an associated semver increment.
Nah. If we can agree that release versions - aka "marketing" versions - and semver serve separate purposes, then it makes sense that semver strictly reflect software product changes.
Remember, semver is not only for humans, but also software. Semver gets us closer to automated dependency vulnerability and incompatibility detection and resolution.
No matter what: each patch
, minor
, and major
change has an associated tag in Git.
Prepend and publish these types of changes in a running CHANGELOG:
- BREAKING CHANGE: The public API introduces something that could throw exceptions in previous versions.
- feat: A new feature.
- fix: A bug fix.
- revert: The release goes back to a previous commit.
✅ This project automatically updates its CHANGELOG with
conventional-changelog
.
In order to automatically generate meaningful CHANGELOGs, contributors must adhere to the a commit message format.
✅ This project follows the angular convention for Git commit messages.
For example, if I add CI/CD stuff to the project or fix a defect, each addition or fix includes a patch
bump.
Likewise, once I've completed a milestone, I bump the minor
version. For example, if an MVP release consists of four milestones, then there will be four minor
version increments. In other words, if we start at
1.0.0
and add four features before the republishing on npm, the next public version of the product will be
1.4.0
If a change at any point during a development iteration results in backwards incompatibility, the major
version will be incremented.
The only exception to this approach will be the initial launch of the product, which will be versioned at 1.0.0. Anything before or after the 1.0.0 release will resume following the aforementioned principles, rules, and guidelines.
A release version usually designates new stuff that might be attractive to potential consumers. Release versions should therefore be simple to remember using Chronological Versioning (Werd 2017), Enumerated Versioning (version 1, version 2...version n), or Subjective Versioning (OS Olympus Mons).
This product does not make a distinction between release versions and semantic versions, since its target users/consumers are
- Software developers, architects, and designers
- Build, test, and integration engineers
If this product were targeting a different consumer base, I would use a simpler "release version" in addition to, but not instead of, semver.
And yeah, you can find opinionated debates about the merits and demerits of semver. If you have a better idea, publish it! Meanwhile, semver is a step in the right direction.
This work is licensed under a Creative Commons Attribution 4.0 International License.