Culture dev video tutorial: Semantic versioning

In this tutorial, I suggest you discover the semantic version management which defines rules on how to version an application/library. The principle is based on 3 numbers which are incremented in different ways.

  • The first number, designating the MAJOR version, is incremented when there are changes which are not backward compatible (which contain breaking changes).
  • The second number, designating the MINOR version, is incremented when there is an addition of functionality (which does not break backward compatibility).
  • The third number, designating the PATCH version, is incremented when there are backward compatible bug fixes.

In addition to these numbers, it is possible to add an additional label to designate specific pre-delivery versions (-beta, -alpha…).

Usage in Declaring Dependencies

This management of the numbering is very important because it makes it possible to better predict the consequences of a version upgrade in the dependencies. When installing a dependency on a project, it is possible to add constraints on the versions that can be installed.

  • ^1.2.3A ^ allows you to indicate that you accept versions greater than or equal to the requested version and which will not contain breaking changes (equivalent to >= 1.2.3 <2.0.0)
  • ~1.2.3THE ~ allows you to accept a version upgrade with the same meaning (~1.2.3 equals >=1.2.3 <1.3.0 And ~1.2 equals >=1.2 <2.0).
  • 1.2.3locks the version at the requested number (but deprives of possible bug fixes).

Useful links


Please enter your comment!
Please enter your name here