What's the Deal with NPM Versioning for New Libraries?
Asked by
shelter-in-place
Hey everyone! I'm currently working on maintaining a new library that has its version starting at 0.x. I've learned that when dealing with this versioning scheme, NPM interprets the `minor` version as a potentially breaking change if a dependency is specified with a caret. This essentially makes me rely on the `patch` version for changes that are still backwards compatible. Is this approach okay? What's the best way to handle versioning in this situation?
Answers
So, according to semantic versioning guidelines, versions below 1.x are seen as unstable and can have breaking changes. The safest bet is to aim for a stable version 1 release once your API is solidified.
Reply to this answer
Totally agree! But one challenge is how to communicate with early users before reaching that stable version. Should they just be advised to run 'npm update' regularly?
Reply to this answer
Add your answer
Answers are reviewed before publication.
Related Discussions