Understanding Semantic Versioning Specification

A Beginner’s Guide With an Example

Bhargav Bachina
Bachina Labs

--

In software management, we often change our code and all these changes need to be tracked. As our projects grow, all the dependencies of the projects increase as well. If you want to make changes to your project and move forward, you need to make sure all your dependencies works with your current changes as well. We can’t move forward if these dependencies are too tight or loosely defined. This is called dependency hell.

In this post, we can see how we can avoid this dependency hell and manage these dependencies. Here are the topics I cover

  • What is Semantic Versioning
  • Basic Rules
  • Why Should We Use It
  • Example Project
  • Version History and Precedence
  • How to Install Specific Versions
  • Difference between tilde(~) and caret(^)
  • Best Practices

What is Semantic Versioning

Semantic Versioning is introduced to avoid the dependency hell discussed above and to keep the javascript ecosystem healthy, reliable and secure. Every time we change our package, it is recommended to change the version in package.json.

--

--