Semantic Versioning 1.0.0

This is the first version of this article and hopefully it will not be changed later. But that is something that cannot be guaranteed.

So you are building your API, service, or App. We have Alpha, Beta, Live, yeah, but how do these relate to semantic versioning? Versioning is important. Semantic versioning refers to the format of MAJOR.MINOR.PATCH, so a major version would be 1.0.0 and a patch on the major version would be 1.0.1.


The above is all fine and good, but what does "Major" mean?

Major version when you make incompatible API changes

It doesn't mean "I've added a shed load of new features" so I'm going to release them all at once. Major actually means "If you used the last version, this version won't work for you" or "Oh, that is the older version, we don't do stuff like that anymore". Get your wallet out.


MINOR version when you add functionality in a backwards-compatible manner

This is when you have added a new feature or features.


Patch, or in other words bug fixes or security fixes. So you released version 1, added some features, but now something is broken and you have to get the fix out asap. This is where you increment the last digit/s i.e. 1.3.1. This means for version 1, feature version 3, there was one patch released.

The Importance of Versioning

Why is versioning important? Well one time I was working on a VBScript app that also used C++ and there were files called dll files. That is where I learned about "dll hell". Different versions of these files were old and incompatible. It was so difficult to find which version was correct. This is why in your package.json file, the two most important parts are the name and the version. You will not be able install your package if either or both of these are missing. The version is an essential part and must reflect the current status.


Semantic versioning

npm package.json documentation

Node and npm best practices

Git tagging