Sitelet https://web.archive.org/web/20220409210633/https://github.com/nodejs/node/pull/42675
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

process: add parseArgs method #42675

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

process: add parseArgs method #42675

wants to merge 1 commit into from

Conversation

Copy link
Member

@bcoe bcoe commented Apr 9, 2022 •

Adds process.parseArgs helper for higher level command-line argument parsing.


Background

There has been an ongoing effort in pkgjs/parseargs to define a command-line argument parsing API for Node.js core.

The effort has taken several years to get to this point, with many amazing contributors across a variety of companies and projects: IBM, Microsoft, Google, Shopify, npm, nvm, commander, yargs, just to name a few.

Where parseArgs is at

@shadowspawn, who's been most recently pushing a lot of the work on parseArgs forward, indicates in pkgjs/parseargs/issues/87 that "we're close to having a decent MVP."

I agree, and thought it would be worth having a candidate PR open on Node.js to get additional feedback.

This is a controversial topic, be kind

There's a lot of nuance and opinion, as to what constitutes a "decent MVP" for a command-line argument parser. Please be respectful of opinions you might not agree with 😊

Before leaving feedback on this thread, I suggest reading past issues on parseArgs. Perhaps there's already been a discussion that touches on your feedback (or there's an ongoing discussion).

Similarly, if themes of discussion jump out in this PR, let's move them to an issue in parseArgs (this should help keep this PR less confusing).

ToDo

CC: @ljharb, @bakkot, @iansu, @darcyclarke, @ruyadorno, @shadowspawn, @nodejs/tooling, @Trott (who I believe asked after this), @aaronccasanova.

Adds process.parseArgs helper for higher level command-line
argument parsing.

Refs: https://github.com/pkgjs/parseargs
@nodejs-github-bot
Copy link
Contributor

@nodejs-github-bot nodejs-github-bot commented Apr 9, 2022

Review requested:

@nodejs-github-bot nodejs-github-bot added lib / src needs-ci labels Apr 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lib / src needs-ci
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants