Skip to content
New issue

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

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

Already on GitHub? # to your account

[BUG] subset('>=17.2.0', '^17.2.0 || >17') should be true #703

Open
1 task done
scagood opened this issue Apr 24, 2024 · 0 comments
Open
1 task done

[BUG] subset('>=17.2.0', '^17.2.0 || >17') should be true #703

scagood opened this issue Apr 24, 2024 · 0 comments
Labels
Bug thing that needs fixing Priority 2 will get attention when we're freed up

Comments

@scagood
Copy link

scagood commented Apr 24, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

const subset = require("semver/ranges/subset")

subset('^17.2.0 || >17', '>=17.2.0') // true
subset('>=17.2.0', '^17.2.0 || >17') // false

subset('^17.2.0 || >=18', '>=17.2.0') // true
subset('>=17.2.0', '^17.2.0 || >=18') // false

Expected Behavior

const subset = require("semver/ranges/subset")

subset('^17.2.0 || >17', '>=17.2.0') // true
subset('>=17.2.0', '^17.2.0 || >17') // true

subset('^17.2.0 || >=18', '>=17.2.0') // true
subset('>=17.2.0', '^17.2.0 || >=18') // true

Steps To Reproduce

https://runkit.com/scagood/662900db83c1e60008f2ccd4

Environment

  • npm: 10.5.0
  • Node: 20.12.2
  • OS: Ubuntu 22.04.4
  • platform: KDE

Other references

eslint-community/eslint-plugin-n#253

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Bug thing that needs fixing Priority 2 will get attention when we're freed up
Projects
None yet
Development

No branches or pull requests

2 participants