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
feat: split demand() into demandCommand()/demandOption() #740
Conversation
@ljharb sorry this turned into a never ending yak shave! The Any ways, months overdue but I think this gets things to what you pushed us towards. Thanks @lrlna for the hard work 🎉 |
Thanks to everybody :-) I look forward to consuming it once it's released. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for finishing this off @bcoe ✨ ; it looks really good!!
@bcoe are you doing this one as a major though? Or with |
@lrlna since we opted to keep the
|
@bcoe I think that sounds like a good plan. What do you think when should we take action about the readme refactoring? |
@maxrimue I approve of this message; I've noticed a lot of big JS projects have moved towards smaller READMEs with external doc sites. |
@maxrimue want to start pulling together a |
@bcoe on it |
As of 6.6.0, |
@kumar303 mind sharing the syntax that had a regression for you, I'd like to patch this in the |
Sure, here is a script to reproduce it: var yargs = require('yargs');
yargs
.help('help')
.demand(0, 0, 'This is a custom message to explain the error better')
.strict()
.argv; In
In
|
@kumar303 thank you; I'll get a regression test written this evening. |
Getting @lrlna's wonderful work on splitting
demand()
intodemandCommand()
/demandOption()
over the finish line.Everything is %99 of the way there, just addressing some final nits from @maxrimue and myself -- excited to try to get yargs down to a few less open issue.
TODO:
demand
message is provided, gsub in “got” and “count” #438.fixes #504, #431 follow up with #618