Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Beta versions currently have suffixes like
-beta1
,-beta2
,-beta3
etc. That works fine until we reach-beta10
. Unfortunately, the10
in there is not treated numerically, so according to npm’s semver-beta2
is “higher” than-beta10
. Numbers only seem to be treated numerically when preceded by a.
.This is problematic because:
^1.1.0-beta1
happens to work as expected.^1.1.0-beta2
on the other hand matches1.1.0-beta2
to1.1.0-beta9
and then1.1.0-beta20
, but not1.1.0-beta10
to1.1.0-beta19
.You can play around with the above at https://semver.npmjs.com/.
In this example, I want
-1
all the time, but it fails when going from 9 to 10:But with a dot it works:
Unfortunately,
1.1.0-beta.13
is considered lower than1.1.0-beta12
, so I recommend waiting with merging this until you have released the next stable version.