-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
For a version range with a single equality (e.g. vers:semver/>=1.0.0), the algorithm described in Checking if a version is contained within a range will not do an iteration in step “iterate over the current and next contiguous constraints pairs (aka. pairwise) in the second list” because there is no pair in a list of one element. Therefore, the algorithm considers no version (if the inequality uses < or >) or exactly one version (if the inequality uses <= or >=) to be in the version range.
A possible fix would be to
- pull the step “If this is the first iteration and current comparator is "<" or <=" and the "tested version" is less than the current version then the "tested version" is IN the range. Check is finished.” out of the loop body and change it to “If the first comparator is "<" or <=" and the "tested version" is less than the first version then the "tested version" is IN the range. Check is finished.”
- pull the step “If this is the last iteration and next comparator is ">" or >=" and the "tested version" is greater than the next version then the "tested version" is IN the range. Check is finished.” out of the loop body and change it to “If the last comparator is ">" or >=" and the "tested version" is greater than the last version then the "tested version" is IN the range. Check is finished.”
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels