Skip to content

Conversation

mloskot
Copy link

@mloskot mloskot commented Jun 4, 2025

The "major level changes when the minor number is missing" was incorrect.


This variant of the sentence is ambiguous, possibly incorrect, especially the second part of it:

semver/README.md

Lines 187 to 188 in 1558ca3

The tilde (`~`) comparison operator is for patch level ranges when a minor
version is specified and major level changes when the minor number is missing.

The tests also confirm it is not about major level changes but minor:

semver/constraints_test.go

Lines 383 to 388 in 1558ca3

{"~1", "2.1.1", false},
{"~1", "1.3.5", true},
{"~1", "1.4", true},
{"~1.x", "2.1.1", false},
{"~1.x", "1.3.5", true},
{"~1.x", "1.4", true},

Unless, I'm completely confused myself :)

The "major level changes when the minor number is missing" was
incorrect.

Signed-off-by: Mateusz Łoskot <mateusz@loskot.net>
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