Should major SemVer updates cascade?

后端 未结 3 2265
野性不改
野性不改 2021-02-14 16:55

So \"myLibrary\" references \"anotherLibrary\". Both libraries follow http://semver.org/

If I release a new version of myLibrary that forces consumers to update to a new

3条回答
  •  悲哀的现实
    2021-02-14 17:35

    It really depends on if the public API of the main library changes. I tend to treat libraries as a black box. I don't need to know the details of how it's implemented. So unless the inner library is exposed somehow then the API of the outer library hasn't changed.

    So, if the inner library is not exposed at all, I would bump the patch number and that's it. If the inner library is exposed then you'll have to decide whether that exposure has changed enough to warrant a major version bump (incompatible or breaking change).

    Of course if the API of the outer library has changed to support the upgrade of the inner library then a major version bump is warranted.

    • No outer API change - update patch number
    • Outer API exposes inner library type - update minor or major version
    • Outer API changed - update minor or major depending on level of change

提交回复
热议问题