Skip to content
Optimal Lab

DevOps · interactive

Semantic versioning

Your library is at 2.4.1. A version number is a promise: MAJOR changes may break callers, MINOR adds features, PATCH only fixes. Projects that depend on you pick ranges that trust those promises.

2.4.1 → 2.4.2

dependent's rangemeansgets 2.4.2?
^2.4.0same major: >=2.4.0 <3.0.0✓ on next install
~2.4.0same minor: >=2.4.0 <2.5.0✓ on next install
2.4.1exactly 2.4.1✗ stays
>=2.0.0anything from 2.0.0 up✓ on next install

Only fixes: a PATCH release that every compatible range accepts.

  1. 1

    Same API, bugs fixed. Safe to take automatically.

    2.4.1 → 2.4.2

  2. 2

  3. 3

  4. 4

In production

Tools and technologies

Package managers rely on semantic versions.

Not tied to one language — use these names when you search docs or design a system.