A version number is a promise
Semver only means something if you are honest about what a breaking change is, and it is broader than changing a signature.
Patch fixes a bug without changing the contract. Minor adds capability that existing code can ignore. Major breaks something. The part people miss is how much counts as breaking: tightening validation, changing a default, making an error message that someone parsed different, changing the order of a result, or dropping a Node version. If somebody’s working code stops working, it is major, regardless of how small the diff was.
The deprecation path costs you one release and buys enormous goodwill. Add the new thing, mark the old one deprecated in JSDoc so editors strike it through, keep it working, and remove it in the next major with a changelog entry that says what to use instead. Doing this well is one of the clearest signals that a maintainer can be relied on.
Write the changelog as you go, in a file, aimed at the person upgrading rather than at your future self. "Fixed edge case" tells nobody anything. "Timers scheduled during a flush no longer run twice; if you were compensating by tracking ids, remove that" is a sentence someone can act on in ninety seconds.
You should now be able to
- Classify a change as patch, minor or major honestly
- Deprecate something without breaking anyone this week
Loading…