Skip to content

[BUG] X-Range with Prerelease Ignores Prerelease #510

Closed
@WalkerCodeRanger

Description

@WalkerCodeRanger

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

A range like >=1.x.x-rc appears to ignore the -rc and be treated as equal to >=1.x.x. For example, it does not match the version 1.0.0-rc.1.

Expected Behavior

Since it isn't clear what prerelease versions >=1.x.x-rc should match, I think it should be an invalid range. If one really wanted to support it, then it would need to match multiple prerelease ranges (e.g. 1.0.0-rc, 1.0.5-rc, 1.5.6-rc, etc.).

Steps To Reproduce

As I am not a Node developer but rather a maintainer of a semver package for C# that needs to support npm style version ranges, I am using https://semver.npmjs.com/ to test. Simply put the listed versions into it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugthing that needs fixingNeeds Triageneeds an initial review

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions