npmversionsemantic-versioning

In semantic versioning, which version is updated when a module adds compatibility without any breaking changes?


I had an npm module that was not compatible with React 18 and Next.js. Now, I have made changes to certain sections to ensure compatibility with these packages, without causing any breaking changes for those who were using this module. After making these changes, which part of the version should be modified: major or minor?

I read the Semantic Versioning document, but unfortunately, I could not find a solution.


Solution

  • Is React 18 fully compatible with 17 and older versions? If not, then I can say you transitively introduced a breaking change so you should change the major version. Otherwise change the minor version