Skip to content

✨ feat(semver): add caret/tilde ranges and semver_max_satisfying - #2316

Merged
harehare merged 1 commit into
mainfrom
feat/semver-satisfies-ranges
Sep 9, 2026
Merged

✨ feat(semver): add caret/tilde ranges and semver_max_satisfying#2316
harehare merged 1 commit into
mainfrom
feat/semver-satisfies-ranges

Conversation

@harehare

@harehare harehare commented Sep 9, 2026

Copy link
Copy Markdown
Owner

Summary

Extends semver::semver_satisfies to accept ^ and ~ range terms (e.g. "^1.2.3", "~1.2.3") alongside existing comparators, documents how pre-release versions are ordered within ranges, and adds semver_max_satisfying(versions, range) to pick the highest matching version from a list for module registry / lockfile compatibility checks.

Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • ♻️ Refactor
  • 📝 Documentation
  • ⚡ Performance
  • ✅ Test
  • 📦 Build / dependencies
  • 👷 CI

Checklist

  • I ran cargo fmt and cargo clippy and addressed any warnings
  • I ran just test-all and all tests pass
  • I added or updated tests covering this change
  • I updated relevant documentation (/docs, crate README.md) if needed
  • I added a changelog entry if this is a user-facing change

Additional Context

Extends semver::semver_satisfies to accept ^ and ~ range terms
(e.g. "^1.2.3", "~1.2.3") alongside existing comparators, documents
how pre-release versions are ordered within ranges, and adds
semver_max_satisfying(versions, range) to pick the highest matching
version from a list for module registry / lockfile compatibility checks.
@codspeed-hq

codspeed-hq Bot commented Sep 9, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 51 untouched benchmarks


Comparing feat/semver-satisfies-ranges (03fd85c) with main (483d73d)1

Open in CodSpeed

Footnotes

  1. No successful run was found on main (ec70dde) during the generation of this report, so 483d73d was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@harehare
harehare merged commit 8d05b67 into main Sep 9, 2026
12 checks passed
@harehare
harehare deleted the feat/semver-satisfies-ranges branch September 9, 2026 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant