Version handling improvements

We're rolling out improvements to how Cloudsmith evaluates relational version ranges across the platform to ensure clearer and more predictable results for semantic version searches and version-based ordering.

This update improves the accuracy of package listings, policies, deny rules, entitlement restrictions, and searches. In most cases, your existing rules already behaved as expected. These changes primarily refine how we handle edge cases, particularly those related to prereleases.

What's changing

As we migrate customers across, Cloudsmith will apply stricter and more consistent logic when comparing and ordering versions. This change resolves edge cases where a query like >=1.0 could incorrectly match prerelease versions, such as 1.0-a1.

The core improvements:

  • Relational searches only consider versions that can be parsed and compared as semantic versions.
  • Version comparisons now follow a single consistent semantic ordering, including prereleases.
  • When a version cannot be parsed, we fall back to string-based behavior, allowing existing tag-like versions to continue working as before, including labels such as “alpha” and “beta.”

Changes required

You generally don’t need to change any existing rules or queries, unless you want to maintain previous behavior for prereleases. To do so, you can use a “lowest possible” prerelease version as part of your search term, such as:

  • To exclude prerelease versions in <1.0 or <=1.0 searches, use <1.0-a or <=1.0-a instead.
  • To include prerelease versions in >=1.0 searches, use >=1.0-a instead.

Phased rollout

We're rolling this out to organizations in stages to ensure a smooth transition across the platform. If you haven't seen the change yet, your organization will be migrated across in the coming weeks. Want early access? Contact us and we'll enable it for you right away.

Why this helps

This new functionality represents a positive behavioral change. It makes version comparison and ordering more reliable, reducing corner-case surprises. It also brings version queries closer to standard semantic version expectations.

If you use complex constraints or prerelease handling, the results may appear more specific than before. If anything appears differently than you expect, or if you would like to confirm how a specific query is handled, please reach out, and we can review it with you.

Keep up to date with our monthly product bulletin