[GH-ISSUE #658] Range class returns different in > 7.3.2 #6443

Closed
opened 2026-06-17 05:14:28 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @Brianzchen on GitHub (Feb 10, 2021).
Original GitHub issue: https://github.com/semver/semver/issues/658

In semver 7.3.3 and 7.3.4, new Range('^v0.x.x') returns different results compared to 7.3.2. This broke users of the flow-typed project.

In the returned object, we expect to find two Comparators in range.set but in the newer versions it only returns one.

> 7.3.2

Range {
  options: {},
  loose: false,
  includePrerelease: false,
  raw: '^v0.x.x',
  set: [ [ [Comparator] ] ],
  range: '<1.0.0-0'
}

7.3.2

Range {
  options: { loose: false, includePrerelease: false },
  loose: false,
  includePrerelease: false,
  raw: '^v0.x.x',
  set: [ [ [Comparator], [Comparator] ] ],
  range: '<1.0.0-0'
}

Issue ref: https://github.com/flow-typed/flow-typed/issues/3988

Originally created by @Brianzchen on GitHub (Feb 10, 2021). Original GitHub issue: https://github.com/semver/semver/issues/658 In semver `7.3.3` and `7.3.4`, `new Range('^v0.x.x')` returns different results compared to `7.3.2`. This broke users of the flow-typed project. In the returned object, we expect to find two Comparators in `range.set` but in the newer versions it only returns one. ## > 7.3.2 ``` Range { options: {}, loose: false, includePrerelease: false, raw: '^v0.x.x', set: [ [ [Comparator] ] ], range: '<1.0.0-0' } ``` ## 7.3.2 ``` Range { options: { loose: false, includePrerelease: false }, loose: false, includePrerelease: false, raw: '^v0.x.x', set: [ [ [Comparator], [Comparator] ] ], range: '<1.0.0-0' } ``` Issue ref: https://github.com/flow-typed/flow-typed/issues/3988
Author
Owner

@Brianzchen commented on GitHub (Feb 10, 2021):

opened in wrong place 🤦

<!-- gh-comment-id:776993490 --> @Brianzchen commented on GitHub (Feb 10, 2021): opened in wrong place 🤦
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/semver#6443