-
-
Notifications
You must be signed in to change notification settings - Fork 41
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: no-unsupported-features/es-builtins: fetch reported unsupported despite Node.js >=18.16.0 #253
Comments
Thank you for the report! 🤔 Technically fetch was not However, there is still a bug here, as we mark is as supported in v18: eslint-plugin-n/lib/rules/no-unsupported-features/es-builtins.js Lines 604 to 606 in a0b45ee
This could be related to #252, but |
It makes me think that the wrong value is getting to As the range is truthy: |
> semverRangeSubset('>=18.1.0', '>=18.0.0 <19||>18')
false it seems an issue in |
just pushed a patch: https://github.com/eslint-community/eslint-plugin-n/releases/tag/v17.3.1 |
mmm, that is a strange bug! const subset = require("semver/ranges/subset")
subset('^17.2.0 || >17', '^17.2.0 || >17') // true
subset('^17.2.0 || >17', '^17.2.0 || >=18') // true
subset('^17.2.0 || >=18', '^17.2.0 || >17') // true
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 I was wondering if something like this would work, but alas it does not either: const [ latest ] = rsort(supported);
const range = getSemverRange(
[
...supported.map((version) => `^${version}`),
`>= ${major(latest + 1)}`,
].join('||'),
); |
can you file the issue in |
I am going to close this, as I think the patch did fix it. We can track the semver issue in #250. |
Environment
Node version: 18.20.1
npm version: 10.5.0
ESLint version: 8.57.0
eslint-plugin-n version: 17.3.0
Operating System: Mac OS / Ubuntu 22.04
What rule do you want to report?
n/no-unsupported-features/es-builtins
Link to Minimal Reproducible Example
(unclear how to reproduce this on the ESLint playground)
What did you expect to happen?
I expected the following to not cause any errors:
But actually I'm seeing these errors, although our
package.json
requires Node.js >=18.16.0:Participation
Additional comments
Noticed via failing test in this Dependabot PR.
The text was updated successfully, but these errors were encountered: