Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should I publish a new library version when making non functional changes?

Tags:

javascript

npm

I'm maintaining a set of javascript libraries and it's usual to have to update some dependencies that doesn't require any functional changes for instance when my library is not affected by a dependency breaking change.

Do you usually publish a new version of the library once updated its dependencies or wait to have to make a functional change for publishing a new version?

Also, do you include which dependencies have been update in the changelog?

PD: I'm using semantic versioning

like image 723
Borja Tur Avatar asked Nov 07 '22 16:11

Borja Tur


1 Answers

When you are using semver you would have to release a minor update.

From the docs:

Patch version Z (x.y.Z | x > 0) MUST be incremented if only backwards compatible bug fixes are introduced. A bug fix is defined as an internal change that fixes incorrect behavior.

Minor version Y (x.Y.z | x > 0) MUST be incremented if new, backwards compatible functionality is introduced to the public API. It MUST be incremented if any public API functionality is marked as deprecated. It MAY be incremented if substantial new functionality or improvements are introduced within the private code. It MAY include patch level changes. Patch version MUST be reset to 0 when minor version is incremented.

So I would suggest to also take the updates of the 3rd party libraries into consideration and decide depending on what features they have introduced and decide based on this.

You have to take into consideration that depending on what distribution channels are used (and they may change) developers might have extended your library to a way that they are also using features of third partys which your library depends on or themselves depend on.

In the end there is not THE RULE but in my opinion more information is better than no information because you dont know what other developers try to accomplish.

like image 194
Code Spirit Avatar answered Nov 10 '22 00:11

Code Spirit