Skip to content

Add vers-spec test suite as submodule#13

Merged
andrew merged 1 commit intomainfrom
spec-compliance
Mar 5, 2026
Merged

Add vers-spec test suite as submodule#13
andrew merged 1 commit intomainfrom
spec-compliance

Conversation

@andrew
Copy link
Owner

@andrew andrew commented Mar 5, 2026

Adds the official package-url/vers-spec test suite as a git submodule and a test runner for version comparison, range containment, and native-to-vers conversion across supported schemes. All 1516 spec assertions pass.

Fixes found through the spec suite:

  • Gem pessimistic upper bounds use minimal segments (2.1 not 2.1.0)
  • Unbounded ranges include scheme in vers URI
  • Exact versions omit = prefix (implicit per spec)
  • Constraint sorting follows spec ordering by version
  • npm: tilde with prerelease, operator+x-range, bare version lists
  • npm: normalize versions to semver three segments
  • npm: fix || groups to parse space-separated AND constraints
  • Exclusion-only ranges start from unbounded
  • Detect != pattern in to_vers_string output

Adds the official package-url/vers-spec test suite as a git submodule
and a test runner for version comparison, range containment, and
native-to-vers conversion across supported schemes. All 1516 spec
assertions pass.

Fixes found through the spec suite:
- Gem pessimistic upper bounds use minimal segments (2.1 not 2.1.0)
- Unbounded ranges include scheme in vers URI
- Exact versions omit = prefix (implicit per spec)
- Constraint sorting follows spec ordering by version
- npm: tilde with prerelease, operator+x-range, bare version lists
- npm: normalize versions to semver three segments
- npm: fix || groups to parse space-separated AND constraints
- Exclusion-only ranges start from unbounded
- Detect != pattern in to_vers_string output
@andrew andrew force-pushed the spec-compliance branch from 7c17206 to 4f3195e Compare March 5, 2026 12:18
@andrew andrew merged commit 657628e into main Mar 5, 2026
2 checks passed
@andrew andrew deleted the spec-compliance branch March 5, 2026 12:19
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