You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The only thing I can to make this work is use SatisfiesNpm and pass in includeAllPrerelease: true. IMO this shouldn't be necessary; regardless of the pre-release flag, 1.2.3 is definitely less than 1.2.4.
Is this functioning as intended? I've read the description for this parameter a couple of times and I'm still struggling to get my head around exactly what it's intended to do:
includeAllPrerelease:
Whether to include all prerelease versions satisfying the bounds in the range
or to only include prerelease versions when it matches a bound that explicitly
includes prerelease versions.
The text was updated successfully, but these errors were encountered:
This is the intended and expected behavior. This follows the npm convention, which other systems follow as well. This behavior is documented in the Prerelease Versions section of the page that explains the range syntax.
I agree with you that it isn't obvious that this behavior should be the default. However, it does make sense in the context of package managers where one prefers not to include prerelease versions by accident. Also, the default behavior would be very difficult to achieve without a special mode for it.
Setting includeAllPrerelease to true is the correct thing to do if you want those versions to match. If you have suggestions for how to clarify the doc comments while keeping them fairly short and readable, let me know.
I'm expecting version
1.2.3-alpha
to satisfy the range< 1.2.4
, but that doesn't seem to be the case.I'm not sure if the
<
part of this is specific to npm or part of the underlying semver spec, but both of the following return false.The only thing I can to make this work is use
SatisfiesNpm
and pass inincludeAllPrerelease: true
. IMO this shouldn't be necessary; regardless of the pre-release flag, 1.2.3 is definitely less than 1.2.4.Is this functioning as intended? I've read the description for this parameter a couple of times and I'm still struggling to get my head around exactly what it's intended to do:
The text was updated successfully, but these errors were encountered: