logoalt Hacker News

philipwhiuktoday at 12:29 AM1 replyview on HN

> An example: Java Maven artifacts typically name the exact version of their dependencies. They rarely write "1.2.3 or any newer version in the 1.2.x series"

You can definitely do this.

To be honest, you just end up with the same thing via dependabot/renovate.


Replies

amiga386today at 12:40 AM

Yes, that's why I said "typically" and "rarely".

You can specify a dependency version range in Maven artifacts. But the Maven community culture and default tooling behaviour is to specify exact versions.

You can specify an exact dependency version in npm packages. But the npm community culture and default tooling behaviour is to specify version ranges.

Even if a maintainer uses a bot to bump dependency versions, most typically they will test if their package works before publishing an updated version, and also because this release work is manual (even if the bot helps out), it takes some time after the dependency is released for upstream consumers of it to endorse and use it. Therefore, nobody consuming foo 1.0.4 will use dependency bar 2.3.5 until foo 1.0.5 is released... whereas an npm foo 1.0.4 with bar dependency "^2.3.0" will give its users bar 2.3.6 from the very moment bar 2.3.6 is released, even without a foo 1.0.5 release.