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?

Bart van Ingen Schenau
78.8k20 gold badges129 silver badges196 bronze badges
asked Jun 1, 2019 at 21:59

1 Answer 1

3

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
answered Jun 3, 2019 at 9:48
1
  • 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. Commented Jun 3, 2019 at 11:01

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.