dfreire's programming blog home

26 Jun 2015

Semantic Versioning

Semantic Versioning, usually abbreviated as semver, is a software versioning scheme that uses the format: MAJOR.MINOR.PATCH.

If you are using a library with the semver version 1.4.2, the next patch version should be 1.4.3, the next minor version should be 1.5.0, and the next major version should be 2.0.0.

A patch version should only contain bug fixes and remain backwards compatible.

A minor version contains new features, but remains backwards compatible.

A major version can contain new features that break backward compatibility.

When your projects dependend on semantically versioned packages, you need to specify the version ranges you are willing to accept. For example, if you have a npm project that depends on lodash, you can declare the dependecy in your package.json file: