0

I doubt about to which semver version I should update my public NPM package. I didn't change any code, but I had to drop some node engine versions due to a dependency package which had a major update after using object spread props.

I have my doubts because my package has no changes that will break usage of my package, and I only had to drop node versions because of breaking Travis builds on my side. Will my update break builds of dependents too?

What did I do?

  • Updated dependencies incl. major updates (one was breaking my builds)
  • Changed node engine version in package.json from v4 to v8.6.0
  • Changed/Dropped Travis node versions to build against

Will dependents who are building at lower node engine versions have any problems after my update?

1

Will dependents who are building at lower node engine versions have any problems after my update?

That depends on how you are using that dependency that caused the update. If that dependency is only used in the testing of your package, but your package itself doesn't use it, then the users of your package will not be affected (at least not immediately).

If that dependency is used by the actual code of your package, then the users of your package will be affected the same as you by this major update of a (transitive) dependency.

Given that, I would do the following

  • In your update, mention explicitly that the node versions that you had to drop from Travis are no longer supported. This should be done because you can no longer guarantee that your package will (continue to) work with those node versions.
  • If the dependency is used only for testing, release an minor update of your package (because you are not immediately breaking any dependents). Note that by not testing with the lower node engine versions, you can't guarantee that you don't accidentally introduce incompatible code.
  • If the dependency is used by the production code, release a major update of your package, because it will be a breaking change for users with a node engine version lower than v8.6.0
  • The dependency is indeed used by production code. I think that it will be best practice to release a major update then. I had my doubts because my package can be used in exactly the same way as before, only testing/building could be a problem. And yes, I updated my history already. It says that I had tot drop those engine versions. It feels a bit strange though, releasing a major update but have no significant changes on my side. Thanks for your answer. – Tarabass Jun 3 at 11:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.