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: Add .parserConfiguration()
method, deprecating package.json config
#1262
Conversation
@jean-emmanuel this looks great, we should add a test though 👍 |
I just pushed 2 tests, what do you think ? |
Travis' fail seems unrelated by the way. |
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.
Really excited for this!
One small tweak and we're good to go.
…breaks test suite) This reverts commit 41fe766.
@evocateur @jean-emmanuel where does this stand? would love to land the work; I'm thinking perhaps we land this as a major, and then in the next major actually retire it? |
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.
I think this is good to go now, @bcoe
This strikes me as semver-minor, with removal in the next major. If there are other semver-majors waiting in the wings, it could certainly go along with that. |
@evocateur @jean-emmanuel, @isaacs just pointed this out to me: https://nodejs.org/api/util.html#util_util_deprecate_fn_msg_code ☝️ Node.js has a built in deprecate message that debounces. |
let's use this -- @evocateur there's some somewhat finicky breaking changes landing in |
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 your patience @jean-emmanuel, do you have time to migrate to util.deprecate()
?
@bcoe As @jean-emmanuel rightly pointed out, |
.parserConfiguration()
method, deprecating package.json config
Thanks @jean-emmanuel! |
woohooo ! |
…onfig (#1262) BREAKING CHANGE: we now warn if the yargs stanza package.json is used.
this is now available in |
Uh, yeah. @bcoe?
Recommendations? |
BTW, your documentation shows: yargs.parserConfiguration({
"yargs": {
"short-option-groups": true,
"camel-case-expansion": true,
"dot-notation": true,
"parse-numbers": true,
"boolean-negation": true
}
}) but "test/fixtures/configured-bin.js" shows: var argv = require('./yargs/index.js')
.parserConfiguration({'dot-notation': true})
.help('help')
.version()
.argv |
@plroebuck we can no longer promise that
We would be open to back-porting this change-request, and security patches back to
☝️ I believe the documentation is wrong. @plroebuck could you open a few issues rather than commenting on a closed issue, the odds of us losing track of your comment are high. @jean-emmanuel interested in back-porting this to |
Using the "yargs" key with 'package.json' was deprecated. See yargs/yargs#1262 for more information
Using the "yargs" key with 'package.json' was deprecated. See yargs/yargs#1262 for more information
A non-breaking proposal to address #1259 and #1248, it might be incomplete so please amend if needed.