简体   繁体   English

我是否应该在进行非功能性更改时发布新的库版本?

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

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. 我正在维护一组javascript库,并且通常必须更新一些不需要任何功能更改的依赖项,例如当我的库不受依赖性​​中断更改影响时。

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 PD:我正在使用语义版本控制

When you are using semver you would have to release a minor update. 当您使用semver您必须发布一个minor更新。

From the docs: 来自文档:

Patch version Z (xyZ | x > 0) MUST be incremented if only backwards compatible bug fixes are introduced. 如果仅引入向后兼容的错误修复,则补丁版本Z(xyZ | x> 0)必须递增。 A bug fix is defined as an internal change that fixes incorrect behavior. 错误修复被定义为修复错误行为的内部更改。

Minor version Y (xYz | x > 0) MUST be incremented if new, backwards compatible functionality is introduced to the public API . 如果向公共API引入了新的向后兼容功能,则必须递增次要版本Y(xYz | x> 0)。 It MUST be incremented if any public API functionality is marked as deprecated. 如果任何公共API功能被标记为已弃用,则必须递增。 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. 当次要版本增加时,补丁版本必须重置为0。

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. 最后没有THE RULE,但在我看来,更多信息比没有信息更好,因为你不知道其他开发者试图完成什么。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM