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

satisfy version miscomputed tilde ranges #17756

Open
2heal1 opened this issue Oct 19, 2023 · 4 comments · May be fixed by #18235
Open

satisfy version miscomputed tilde ranges #17756

2heal1 opened this issue Oct 19, 2023 · 4 comments · May be fixed by #18235
Assignees

Comments

@2heal1
Copy link

2heal1 commented Oct 19, 2023

Bug report

The webpack inner semver function computed result is different from the npm package semver , and the webpack inner function result seems not right.

What is the current behavior?

Running the function satisfy from semver and parseRange results in a possible bug. Specifically:

satisfy(parseRange('~1'), '1.2.3') === false

What is the expected behavior?

satisfy(parseRange('~1'), '1.2.3') === true

Other relevant information:
the result is not the same with semver

const semver = require('semver');
semver.satisfies('1.2.3','~1') === true
@2heal1
Copy link
Author

2heal1 commented Oct 23, 2023

I added a reproduction repository

https://github.com/2heal1/webpack-demo

Running test by the follow steps:

  1. instal deps
npm i
  1. run test
npm run test-special-tilde
npm run test-special-x-range

@alexander-akait
Copy link
Member

@2heal1 Sounds like a bug, do you want to send a PR?

@snitin315 snitin315 self-assigned this Jan 16, 2024
@rohannsahh
Copy link

rohannsahh commented Mar 6, 2024

@alexander-akait hey is the issue still open? can i try it ?

@alexander-akait
Copy link
Member

Yes, feel free to send a PR

@SHARJIDH SHARJIDH linked a pull request Mar 24, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Priority - Medium
Development

Successfully merging a pull request may close this issue.

5 participants