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

fix: re-add options to check callback #2079

Merged
merged 4 commits into from Nov 30, 2021
Merged

fix: re-add options to check callback #2079

merged 4 commits into from Nov 30, 2021

Conversation

jly36963
Copy link
Contributor

@jly36963 jly36963 commented Nov 26, 2021

Addresses:

#2069

Problem

Check callback options is undefined. It should be an object.

The docs show options in the call signature for the callback incheck. In yargs 17, options is missing from that call signature.

Questions

  • Not sure if the options object I used is the correct one (or if it's in the correct state).
  • Not sure if mutable access to options should be exposed. Should it be read-only or a copy?

Let me know if there are any changes that need to happen, or if I should add more tests.

@jly36963 jly36963 requested a review from bcoe November 27, 2021 19:42
Copy link
Member

@bcoe bcoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a reasonable fix to me, not sure why we dropped this behavior when moving to v17.

@jly36963 jly36963 marked this pull request as ready for review November 29, 2021 02:25
@bcoe bcoe merged commit e75319d into yargs:main Nov 30, 2021
@bcoe
Copy link
Member

bcoe commented Nov 30, 2021

@jly36963 thank you for the contribution 👍

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

Successfully merging this pull request may close these issues.

None yet

2 participants