Open Source

Versioning and Releases

In 2016, a popular npm package author changed behavior in a patch version. Millions of projects auto-updated via `^1.0.0` range and broke in production. Semver is a contract. Break it once and you lose trust forever.

  • React 16 → 17: zero breaking changes, migration guide explained every single change
  • Angular: strict semver, every major release is on a fixed schedule every 6 months
  • semantic-release: used in Babel, Jest, Electron for fully automated releases
  • Vue 2 → 3: two-year migration period, compatibility builds - a model for how to do major changes

Semantic Versioning: major.minor.patch

**Semver (Semantic Versioning)** is a contract with your users about what version numbers mean. When you change a version a certain way, you communicate what changed. Breaking semver is one of the most toxic things an OSS maintainer can do.

**Breaking semver destroys trust.** If a PATCH changes behavior that broke a prod project - that's a contract violation. Users will pin exact versions (`1.2.3` instead of `^1.2.3`) and stop auto-updating. This is especially painful for security patches that need fast uptake.

You're adding a new required parameter to a function. Which version bump is correct?

CHANGELOG and Release Automation

**CHANGELOG.md** is the history of changes - written for users, not developers. A good CHANGELOG answers: «do I need to update, and what will break?». Conventional commits let you generate it automatically.

Why do conventional commits (feat:, fix:, chore:) matter beyond just style?

Key Ideas

  • patch: bug fix with no breaking changes. minor: new features with no breaking changes. major: breaking changes
  • Breaking semver destroys trust - users start pinning exact versions
  • CHANGELOG.md is for users, not developers: what changed and how to migrate
  • Conventional commits + release-it/semantic-release = automatic CHANGELOG and version bump
  • Pre-release: alpha → beta → rc before a major version

Related Topics

Publishing mastered. Moving on to the career side: how OSS builds reputation.

  • Next Lesson — Logical continuation

Вопросы для размышления

  • You want to rename a function (it has a bad name). How do you do this with minimal disruption to users? Describe the migration path.
  • Why do some projects release a major version every 6 months on a schedule (Angular), rather than whenever breaking changes are ready?

Связанные уроки

  • se-02
Versioning and Releases

0

1

Sign In