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

Explanation for why the parsed property is deprecated? #2317

Open
dlong500 opened this issue Mar 30, 2023 · 1 comment
Open

Explanation for why the parsed property is deprecated? #2317

dlong500 opened this issue Mar 30, 2023 · 1 comment
Labels

Comments

@dlong500
Copy link

The parsed property is marked as deprecated (apparently with the #1898 commit) but without comments as to why it was deprecated or what we should be using going forward to access the same info.

I'm interested in getting a list of explicitly passed arguments (to differentiate from the final resolved arguments that contain defaults). Ideally this list would be generated by yargs internally in the same way the yargs.parsed.defaulted object is generated. See #513 for similar discussion. What would be the recommended way to access the yargs details going forward?

@shadowspawn
Copy link
Member

Thanks for the links, and saying why you are interested.

There is a closed PR that was going to offer new detailed parse information, which mentions issues with existing .parsed: #1472 (comment)

The PR would have changed the docs to say:

note: The .parsed option has known limitations and is deprecated. Instead use yargs.parserConfiguration({detailed: true}) to get a detailed parse.

So my reading is that .parsed has still been deprecated due to the limitations, but there is not a replacement yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants