version-controlversioningsemantic-versioning

Is a small breaking change enough to do a Major Version Upgrade while using SemVer?


I am new to the concept of SemVer. It's seems like very promising idea to implement in my current project.

According to the SemVer concept, if a project is name project-a.b.c then, a is Major update(breaking changes), b is Minor update(newer implementations), c is patch update(bug fixes).

My question is, say if I had a Very Small breaking change for which I need to build and update my repo. What should I do then?

Is it a Major update or a Patch update?

Also, is SemVer only suitable for certain software technologies and not for every thing? For example, some Node Devs told me they rarely use this. But, I am not sure what percentage of people are practising it.


Solution

  • Breaking change is a breaking change, no ifs or buts. You should do a MAJOR update.

    SemVer purpose is to convey meaning about the underlying code and what has been modified from one version to the next. This scheme is suitable for everything where there is a need to solve compatibility issues of any kind and SemVer convention fits the purpose.

    https://semver.org/

    It is useful to ask a number of questions to help you determine the impact and not to deviate from the SemVer convention:

    1. Have there been a change to my deliverable?
    2. Can this change break anyone's code out there? Yes => breaking change; No => move on to next question of MINOR vs PATCH.

    As to whether developers using or not using SemVer convention you would be surprised to find huge number of projects using it because of its usefulness and simplicity, so I would encourage you to use it where it makes sense, e.g. distributed deliverable.