Question

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?

Was it helpful?

Solution

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
Licensed under: CC-BY-SA with attribution
scroll top