Let's say my npm package of 1.0.0 publicly exposes a function called foo
for users to use among many other functions and features.
I then remove the foo
function which will break for all the users who are using this function.
NPM says:
Changes which break backwards compatibility: Major release, increment the first number, e.g. 2.0.0
I'm quite confused exactly what this means. Should the major number be updated always if we break a change for users even if it's just a small change such as removing a function?
At the moment I update the major number whenever I possibly break a publicly exposed feature. I see npm packages with small major versions and thinking that I am incorrect in doing this as I am updating my own packages major number very fast.
via Martin Mazza Dawson
No comments:
Post a Comment