Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Inconsistent behaviour of caret versions with includePrerelease #557

Open
1 task done
adamreeve opened this issue May 2, 2023 · 0 comments
Open
1 task done
Labels
Bug thing that needs fixing Needs Triage needs an initial review

Comments

@adamreeve
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

The behaviour of satisfies when using a caret range with includePrerease: true seems to depend on whether a major version number is present:

> semver.satisfies('0.0.3-alpha', '^0.0.3', {includePrerelease: true})
true
> semver.satisfies('0.2.3-alpha', '^0.2.3', {includePrerelease: true})
true
> semver.satisfies('1.2.3-alpha', '^1.2.3', {includePrerelease: true})
false

Expected Behavior

I'd expect the above calls to all return false, for consistency with the reasoning in #409

Steps To Reproduce

No response

Environment

  • semver: 7.5.0
  • npm: 8.5.1
  • Node: 12.22.9
  • OS: Ubuntu 22.04.2
@adamreeve adamreeve added Bug thing that needs fixing Needs Triage needs an initial review labels May 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Needs Triage needs an initial review
Projects
None yet
Development

No branches or pull requests

1 participant