stylelint / eslint-config-stylelint

Stylelint org's shareable config for eslint
MIT License
60 stars 9 forks source link

Remove Node.js 14 support #224

Closed ybiquitous closed 1 year ago

ybiquitous commented 1 year ago

Which issue, if any, is this issue related to?

Ref: #222

Is there anything in the PR that needs further explanation?

This change adds engines.node to package.json to pass npm run release (np). If engines.node is missing, np fails:

Error: Please include a `engines.node` field in your package.json

Note that we could release 19.0.0 if this PR would approved.

Why node: ">=16.0.0"?

Because eslint-plugin-n requires the version. See the following test using ls-engines:

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

┌───────────────────────┬───────────────────────────┐
│ package engines:      │ dependency graph engines: │
├───────────────────────┼───────────────────────────┤
│ "engines": {          │ "engines": {              │
│   "node": ">= 16.0.0" │   "node": ">= 16"         │
│ }                     │ }                         │
└───────────────────────┴───────────────────────────┘

Your “engines” field exactly matches your dependency graph’s requirements!

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

$ npm v eslint-plugin-n engines
{ node: '>=16.0.0' }