google / deps.dev

Resources for the deps.dev API
https://deps.dev
Apache License 2.0
258 stars 20 forks source link

How to choose the default version of a package #91

Closed zhangzhenyu2 closed 5 months ago

zhangzhenyu2 commented 5 months ago

How to choose the default version of a package? Is it based on the release time of the package? The latest release time package is the default version?

sarnesjo commented 5 months ago

deps.dev chooses the default version of a package using ecosystem-specific logic which is intended to match the behavior of the canonical, upstream tools (e.g. npm, mvn, etc).

Taking npm as an example, if the package has a dist-tag called latest, the version it points to is chosen. If not, the greatest version by semver order, ignoring versions with prerelease or build tags, is chosen. Release time is not used.