Closed sodatea closed 2 years ago
Good question! Currently undecided, but this issue will prompt the discussion.
The target for this project was writing code for inclusion in Node.js. Mission accomplished! We haven't had discussions yet about supported versions of Node.js.
I was likewise thinking it might be useful to have a table of equivalent versions of @pkgjs/parseArgs
and Node.js in the README.
There may be some changes to code once supported versions decided: https://github.com/pkgjs/parseargs/pull/40#discussion_r790178856
(I had a pick look at the test failure in node 14, and the first error is in primordials.js
. That file is largely just a shim for api compatibility with the Node.js environment so can be dumbed down, or perhaps copied from older Node.js.)
I suspect we'll start by looking at how feasible LTS support is. (@bcoe has written: Maintainers Should Consider Following Node.js’ Release Schedule)
Yeah in Vite we also plan to ship a new major every year to drop support for the EOL Node.js versions. In the upcoming 3.0 our baseline is Node.js 14+, and next year we'll only support Node.js 16+.
The idea was inspired by a similar article: https://nodesource.com/blog/the-Node.js-application-maintainer-guide/
For comparison, similar https://github.com/nodejs/node-core-test currently says:
This is a user-land port of node:test, the experimental test runner introduced in Node.js 18. This module makes it available in Node.js 14 and later.
Thanks for your work on this project! Really happy to see Node.js finally got a good built-in argument parser.
Now that
parseArgs
has landed innode:utils
, I would like to migrate my projects to use it for argument parsing.Most of my projects support Node.js Maintenance LTS releases (currently it's v14+), as
utils.parseArgs
is only available in Node.js 18.3+, I still need to install this package separately for at least 2 more years. But I'm not sure if that's the plan of this package too. I can't find anengines
field in thepackage.json
, nor is Node.js versions mentioned in the documentation. The CI only runs in Node.js 16.So, what's the project's plan of supported Node.js versions? It's a pity that I cannot advocate it to my teammates without getting a definite answer to this question.