GithubHelp home page GithubHelp logo

Comments (7)

scagood avatar scagood commented on June 22, 2024 1

Thank you for the report!

🤔 Technically fetch was not supported until 21.0.0, and so should be experimental in 18.20.1:
image


However, there is still a bug here, as we mark is as supported in v18:

fetch: {
[READ]: { supported: ["18.0.0"] },
},

This could be related to #252, but 18.0.0 is a subset of >=18.0.0.

from eslint-plugin-n.

aladdin-add avatar aladdin-add commented on June 22, 2024 1

can you file the issue in node-semver repo, please? 🙏

from eslint-plugin-n.

scagood avatar scagood commented on June 22, 2024

It makes me think that the wrong value is getting to isSupported

As the range is truthy:
https://runkit.com/scagood/662900db83c1e60008f2ccd4

image

from eslint-plugin-n.

aladdin-add avatar aladdin-add commented on June 22, 2024
> semverRangeSubset('>=18.1.0', '>=18.0.0 <19||>18')
false

it seems an issue in node-semver. I'll revert that change then.

from eslint-plugin-n.

aladdin-add avatar aladdin-add commented on June 22, 2024

just pushed a patch: https://github.com/eslint-community/eslint-plugin-n/releases/tag/v17.3.1

from eslint-plugin-n.

scagood avatar scagood commented on June 22, 2024

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('||'),
);

from eslint-plugin-n.

scagood avatar scagood commented on June 22, 2024

I am going to close this, as I think the patch did fix it.

We can track the semver issue in #250.

from eslint-plugin-n.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.