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

semver: satisfies function work incorrect on pre-release part #6303

Open
wuhuizuo opened this issue Dec 24, 2024 · 1 comment
Open

semver: satisfies function work incorrect on pre-release part #6303

wuhuizuo opened this issue Dec 24, 2024 · 1 comment
Labels
bug Something isn't working needs triage

Comments

@wuhuizuo
Copy link

Describe the bug

Steps to Reproduce

Run with Deno:

~> deno --version
deno 2.1.4 (stable, release, x86_64-unknown-linux-gnu)
v8 13.0.245.12-rusty
typescript 5.6.2
~> deno
Deno 2.1.4
exit using ctrl+d, ctrl+c, or close()
REPL is running with all permissions allowed.
To specify permissions, run `deno repl` with allow flags.
> import { parse, parseRange, satisfies } from "jsr:@std/semver@^1.0.3";
undefined
> satisfies(parse("v9.0.0-alpha"), parseRange(">=8.0.0-0"))
false
> satisfies(parse("v9.0.0-0"), parseRange(">=8.0.0-0"))
false
> satisfies(parse("v9.0.0"), parseRange(">=8.0.0"))
true
> satisfies(parse("v9.0.0-alpha"), parseRange(">=8.0.0"))
false
>

Expected behavior

  • satisfies(parse("v9.0.0-alpha"), parseRange(">=8.0.0-0")) should return true
  • satisfies(parse("v9.0.0-0"), parseRange(">=8.0.0-0")) should return true
  • satisfies(parse("v9.0.0-alpha"), parseRange(">=8.0.0")) should return true

Environment

  • OS: Ubuntu 24.04.1 LTS
  • deno version: 2.1.4
  • std version: 1.0.3?
@wuhuizuo wuhuizuo added bug Something isn't working needs triage labels Dec 24, 2024
@wuhuizuo wuhuizuo changed the title semver satisfies function work correct on pre-release part semver: satisfies function work correct on pre-release part Dec 24, 2024
@wuhuizuo wuhuizuo changed the title semver: satisfies function work correct on pre-release part semver: satisfies function work incorrect on pre-release part Dec 24, 2024
@wuhuizuo
Copy link
Author

wuhuizuo commented Dec 24, 2024

I saw there was a issue about the pre-release: #4300

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage
Projects
None yet
Development

No branches or pull requests

1 participant