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

no-unsupported-features/node-builtins reports false positive for backported feature when using >= #212

Closed
gabegorelick opened this issue Apr 8, 2020 · 2 comments

Comments

@gabegorelick
Copy link

no-unsupported-features/node-builtins flags usages of fs.promises with the following error: The 'fs.promises' is not supported until Node.js 11.14.0 (backported: ^10.17.0). The configured version range is '>=10.17.0'.

However, I have "node": ">=10.17.0" in my engines field. Switching to ^10.17.0 fixes this, but it shouldn't be necessary.

>=10.17.0 || ^10.17.0 doesn't work either.

@gabegorelick
Copy link
Author

I think this is working as expected. Assuming the data in this repo is correct, then fs.promises was added in 10.17.0 and 11.14.0. But >=10.17.0 can match a version like 11.0.0. Likewise, >=10.17.0 || ^10.17.0 can also match 11.0.0. Thus you can potentially have a version that does not support this feature.

I think what I should use instead is something like ^10.17.0 || >=11.14.0.

@jaydenseric
Copy link

Thanks for sharing your realization, it really helped me too!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants