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

Remove Node.js 16 support #7240

Closed
ybiquitous opened this issue Oct 16, 2023 · 12 comments · Fixed by #7301
Closed

Remove Node.js 16 support #7240

ybiquitous opened this issue Oct 16, 2023 · 12 comments · Fixed by #7301
Labels
status: wip is being worked on by someone type: enhancement a new feature that isn't related to rules
Milestone

Comments

@ybiquitous
Copy link
Member

ybiquitous commented Oct 16, 2023

We will remove Node.js 14 support in the next Stylelint version 16.0.0 (#6740).

But Node.js 16 also reached EOL in September 2023. See the announcement about Node.js 16 EOL:
Bringing forward the End-of-Life Date for Node.js 16

We are moving the End-of-Life date of Node.js 16 by seven months to coincide with the end of support of OpenSSL 1.1.1 on September 11th, 2023.

Thus, some of the dependencies or libraries have dropped the support for Node.js 16. So should we also drop Node.js 16 in the next version 16.0.0 (#6930)?

I want any feedback. Thank you.

@ybiquitous ybiquitous added the status: needs discussion triage needs further discussion label Oct 16, 2023
@ybiquitous ybiquitous added this to the future-major milestone Oct 16, 2023
@Mouvedia
Copy link
Member

Mouvedia commented Oct 16, 2023

So should we also drop Node.js 16 in the next version 16.0.0 (#6930)?

👎 for me
Id say dropping one node LTS per Stylelint major is enough.
Deprecating it? Maybe if the console.warn can be hidden using a flag.


Also could you add a list of the dependencies that are currently affected?
It will help out in our decision making.
e.g. lint-staged 15.0.0

@mattxwang
Copy link
Member

I don't think I have a strong opinion on this, though personally I have no issue dropping two node LTS issues in a major release (since it is EOL). We could also always release a v17 of Stylelint relatively soon after v16, if we want to pace it out (there are some other major-breaking changes that are smaller-scale that I could work on there).

e.g. lint-staged 15.0.0

Would that be affected? lint-staged is just a dev dependency, so it doesn't affect downstream users of Stylelint (to my understanding).

@Mouvedia
Copy link
Member

is just a dev dependency

Exactly my point.
I wanna have, at least, a list of the dependencies that are already dropping v16.
It would be better to have a list of the packages that are planning to drop it, but that would be quite time consuming to compile.

@ybiquitous
Copy link
Member Author

Listing up dependencies is a good idea.

Sharing ls-engines report (on v16 branch):

$ npx ls-engines@latest
`node_modules` found; loading tree from disk...
┌────────┬─────────────────────────────────────────────────────────────────┐
│ engine │ Currently available latest release of each valid major version: │
├────────┼─────────────────────────────────────────────────────────────────┤
│ node   │ v20.8.1, v19.9.0, v18.18.2                                      │
└────────┴─────────────────────────────────────────────────────────────────┘

┌───────────────────────────────────┬───────────────────────────┐
│ package engines:                  │ dependency graph engines: │
├───────────────────────────────────┼───────────────────────────┤
│ "engines": {                      │ "engines": {              │
│   "node": "^16.13.0 || >= 18.0.0" │   "node": ">= 18"         │
│ }                                 │ }                         │
└───────────────────────────────────┴───────────────────────────┘


┌────────┬─────────────────┬─────────────────┬──────────────────────────┐
│ engine │ current version │ valid (package) │ valid (dependency graph) │
├────────┼─────────────────┼─────────────────┼──────────────────────────┤
│ node   │ v20.8.1         │ yes!            │ yes!                     │
└────────┴─────────────────┴─────────────────┴──────────────────────────┘

Your “engines” field allows more node versions than your dependency graph does.

┌──────────────────────────────┬──────────────┐
│ Conflicting dependencies (1) │ engines.node │
├──────────────────────────────┼──────────────┤
│ postcss-safe-parser          │ >=18.0       │
└──────────────────────────────┴──────────────┘


If you want to narrow your support, you can run `ls-engines --save`, or manually add the following to your `package.json`:
"engines": {
  "node": ">= 18"
}

Currently, the following deps require Node.js 18:

  • postcss-safe-parser

Also, the following are dev deps:

  • rollup

@Mouvedia
Copy link
Member

We should follow lint-staged footsteps and go directly to ≥18.12.0 for v17.
see https://nodejs.org/en/blog/release/v18.12.0

@jeddy3
Copy link
Member

jeddy3 commented Nov 5, 2023

We could also always release a v17 of Stylelint relatively soon after v16

Major releases have historcally been troublesome for the ecosystem (especially for plugin authors), which is why we only usually do one a year. As Node 16.0.0 has already reached EOL, I suggest we jump straight to Node 18.12.0 for v16 and get ahead of more of our dependencies doing the same over the coming year.

@Mouvedia
Copy link
Member

Mouvedia commented Nov 5, 2023

I suggest we jump straight to Node 18.12.0 for v16

I am not against it but that will delay v16 even more.
see also #6930 (comment)

which is why we only usually do one a year

What about changing that to once every 6 months?

@mattxwang
Copy link
Member

I am not against it but that will delay v16 even more. see also #6930 (comment)

I admit I'm not familiar with the 16-18 migration, but is there a specific reason why? I would have thought that dropping support for a Node version is pretty low-lift. I've been unable to help with larger reviews, but bumping dependencies / changing the package requirements is definitely something I can put some cycles into!

@ybiquitous
Copy link
Member Author

@jeddy3 Thanks for the supplement.

Considering the burden on plugin authors, I agree with keeping the one-year pace of major releases.

I don't have a strong opinion here, but if we could drop Node.js 16 support with Stylelint 16.0.0, the number of possible dependency problems (e.g., cannot update some deps requiring Node.js 18 or later) would decrease from now on.

Although I'm unsure about the disadvantages of cutting Node.js 16 users away.

@Mouvedia
Copy link
Member

Mouvedia commented Nov 6, 2023

Apart from our dependencies being outdated and the EOL state there's possibly another reason that would warrant stepping directly to 18: switching the test runner.
i.e. node:test is supported by version 18

would be updated

punted to v17 due to pure ESM

  • string-width
  • balanced-match
  • globby
  • strip-ansi

@ybiquitous
Copy link
Member Author

@Mouvedia Thanks for listing the deps. I have the same idea about them.

node:test is supported by version 18

I believe this built-in test support with Node.js 18 is unstable yet, right? Also, the test coverage feature may not be mature. Probably, we should open another ticket to discuss the migration to node:test, although it's surely one of motivations.

@jeddy3
Copy link
Member

jeddy3 commented Nov 6, 2023

It seems like the consensus is that the pros of jumping to 16 outweigh the cons. I'll label it accordingly. I can pick this one up.

@jeddy3 jeddy3 added status: wip is being worked on by someone type: enhancement a new feature that isn't related to rules and removed status: needs discussion triage needs further discussion labels Nov 6, 2023
@ybiquitous ybiquitous linked a pull request Nov 6, 2023 that will close this issue
@jeddy3 jeddy3 closed this as completed Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: wip is being worked on by someone type: enhancement a new feature that isn't related to rules
Development

Successfully merging a pull request may close this issue.

4 participants