Align npm dist-tags with upstream registries

By default, Cloudsmith assigns the latest dist-tag to the package with the highest semantic version number, which may not match what the upstream registry considers latest.

A new per-repository setting, npm upstream tags take precedence, lets upstream distribution tags (dist-tags) override Cloudsmith’s semantic versioning (SemVer)-based tag assignment.

When enabled, Cloudsmith's npm metadata logic still uses SemVer as the baseline, then checks for the latest dist-tag in the upstream registry. The upstream tag is applied as an override only if the corresponding version is present within the versions available to the client. If the version is not available (which can be affected by index policy controls, like cooldown policies), the latest tag defaults to the semantically highest available version.

Who this is for

npm users who want to closely replicate npm upstreams. For example, engineering teams who:

  • Publish packages to both npmjs.com and Cloudsmith
  • Use release tooling that depends on dist-tags
  • Pull packages using tag-based resolution (e.g. @latest or @next) rather than pinned versions

How it works

You can configure upstream tag precedence for a repository by setting "npm_upstream_tags_take_precedence": true via the API, or by enabling the npm upstream tags take precedence option in the repository settings form:

For more information, see Upstream tag precedence in the Cloudsmith documentation.

Keep up to date with our monthly product bulletin