Member-only story
Programming Basics
Semantic Versioning
Demystifying SemVer and avoiding “dependency hell”

Last year, I created the video below explaining semantic versioning, but I still meet many people that do not understand how it works. So, in this post, I will explain it to those that prefer to read instead of watch.
Semantic versioning indicates the type of changes since the last release of a library, as well as if these changes break backward compatibility. This is very important because breaking backward compatibility might require code changes for the consumer.
Semantic versioning has a defined structure and rules that dictate how the version changes. The structure requires a major version (x), followed by a minor version (y), and lastly a patch version (z).

Each part is a non-negative integer with no leading zeros. The type of changes since the last version dictate which portion of the version you increment or reset.
Every release should have a unique version. This helps developers easily identify which version individuals were using when they provide feedback or bug reports.
Let’s work through an example starting with version 0.1.0.

Having a major version of zero signifies initial development and that anything may change at any time.
Let’s assume we’re on our third initial release with version 0.3.0.

The next change introduces a backward-compatible bug fix but does not add new…