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
feat: improve heuristics when dist-tags.latest is in range (#33)
Previously, there were two problems.
First problem, even though we heuristically choose the version that best
suits the stated 'engines' restriction, we were skipping that check when
the 'defaultTag' (ie, 'latest', typically) version was a semver match.
Second problem, the heuristic was improperly being set for 'staged' and
'restricted' packages, resulting in failure to sort those versions
properly.
Only choose the defaultTag version if it both a semver match, _and_
passes the engines/staged/restricted heuristics, and apply those
heuristics properly in the sort that comes later, if the defaultTag
version is not used.
Related-to: npm/rfcs#405
<!-- What / Why -->
<!-- Describe the request in detail. What it does and why it's being
changed. -->
## References
<!-- Examples:
Related to #0
Depends on #0
Blocked by #0
Fixes #0
Closes #0
-->
0 commit comments