You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The README includes mention of a proposal for process.mainsArgs. Is there still interest in that as a separate proposal, or diminishing returns after parseArgs?
I see two possible benefits from process.mainArgs:
supplying arguments to other argument parsers, explicitly by library user or implicitly in library implementation
potential for things building on Node.js to support process.mainArgs in author friendly way, compared with process.argv which sometimes breaks Node.js conventions (e.g. Electron, zx). This is a speculative benefit which may not eventuate!
If process.mainArgs is unlikely, then it is a decision for parseArgs alone whether to expose the implicit args in context of richer parsing information (#84 (comment), #84 (comment), #84 (comment)).
I see two possible benefits from process.mainArgs:
There's another benefit specifically for parseArgs, which is that sometimes you want to do some preprocessing before passing arguments to parseArgs. For example, some utilities will want to slice off everything after -- and treat those values as something other than positionals (e.g. to be forwarded to another program).
This hasn't got additional interest (thanks for comment @bakkot) and isn't likely to get championed out of this project. The Tooling Group is a more likely place to gather interest.
The README includes mention of a proposal for
process.mainsArgs
. Is there still interest in that as a separate proposal, or diminishing returns afterparseArgs
?I see two possible benefits from
process.mainArgs
:process.mainArgs
in author friendly way, compared withprocess.argv
which sometimes breaks Node.js conventions (e.g. Electron, zx). This is a speculative benefit which may not eventuate!If
process.mainArgs
is unlikely, then it is a decision forparseArgs
alone whether to expose the implicit args in context of richer parsing information (#84 (comment), #84 (comment), #84 (comment)).I think
process.mainArgs
was first suggested in argument parsing thread: nodejs/tooling#19 (comment)This later comment follows up on a meeting and agrees with dropping
process.mainArgs
and focus on argument parsing : nodejs/tooling#19 (comment)The text was updated successfully, but these errors were encountered: