pkgjs / parseargs

Polyfill of `util.parseArgs()`
Apache License 2.0
121 stars 9 forks source link

🔨 Moving towards MVP Milestone 1 #87

Closed shadowspawn closed 2 years ago

shadowspawn commented 2 years ago

I feel like we are close to having a decent MVP version with a (close to) zero-config parse-anything mode with predictable behaviours, and a strict mode that detects many common user errors so the author does not have to.

We are at risk of stalling though. @darcyclarke who did the initial proposal in this repo is currently doing his own thing in https://github.com/darcyclarke/minargs (taking into account some discussions here), and I think @bcoe is taking a break from trying to coax some consensus (he did mention threads with "4 people with 8 opinions in them" as annoying, but good!). I suspect also the wider tooling group who are behind this initiative have been busy elsewhere.

I have been leaving it up to common agreement, or Benjamin to move things forward. We have covered a lot of good ground in discussions, but there are multiple viewpoints and goals and desires. I am going to try being more active to push towards a first milestone with key functionality implemented while we have people engaged here. Potentially with some approach rather than a universally agreed approach. It doesn't mean it is ready for Node.js consideration, or everything it could be, but I would like to try for something reasonably solid and implemented and usable.

I'll put 🔨 in any comments where I am pushing for a way forward. Speak up if I am out of order on a decision or process, and I'll cease and desist. 🙊

(Disclaimer: I am a maintainer of Commander. When issues come up I often research what other libraries are doing and what the POSIX and GNU guidelines say. I believe I have solid knowledge and experience of how command line parsing works in practice. I don't have experience with building a parser on top of a parser as such, which although not one of the stated goals of this repo is definitely of interest to people!)

shadowspawn commented 2 years ago

Is strict actually a goal? https://github.com/pkgjs/parseargs/issues/11#issuecomment-1082664767

74

shadowspawn commented 2 years ago

Restructure result conventions (again) https://github.com/pkgjs/parseargs/issues/70#issuecomment-1082688095

83

shadowspawn commented 2 years ago

Reporting indexes (maybe post-MVP) https://github.com/pkgjs/parseargs/issues/84#issuecomment-1082694686

Not MVP.

bakkot commented 2 years ago

Can we add https://github.com/pkgjs/parseargs/issues/85 to the MVP also? That's not one which can be left for later; if positionals are opt-out in the MVP it will be hard to change.

(I'm happy to implement/document/test this behavior, if that would help.)

shadowspawn commented 2 years ago

I have not added #85 because I wasn't happy enough with it to block MVP working it out. But it has now been mentioned so some visibility, and opportunity for feedback from a wider group than the fairly hard-core strict people. 😄

shadowspawn commented 2 years ago

We have landed the ones that I identified as ready for MVP! 🎉