node-semver: [BUG] pre-release versions not matched when using `||`

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Here are the >=5 stable releases: image

Here are the >=5.2.0-beta pre-releases: image

But when put together with an ||, there are no pre-releases: image

Supprisingly, this works correctly with >=5.1.0-beta: image

Expected Behavior

I expect the stable 5 and the pre-release 5.2 to be listed.

Steps To Reproduce

  1. In this environment… https://semver.npmjs.com/#syntax-examples
  2. With this config… typescript, >=5 || >=5.2.0-beta
  3. Run ‘…’ ‘List Versions’ button
  4. See error…

Environment

  • npm: ?
  • Node: ?
  • OS: ?
  • platform: ?

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 1
  • Comments: 20 (4 by maintainers)

Most upvoted comments

But it’s all good, I’ve raised one myself https://github.com/npm/feedback/discussions/999, please upvote it so that this feature can be fixed.

@mbtools So in my case, I want to support both the stable version of 5, and the current pre-releases of 5. How can I select that?