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

feat: add support for showVersion, similar to showHelp #1831

Merged
merged 8 commits into from Mar 14, 2021

Conversation

OsmanAltun
Copy link
Contributor

Description
This PR contains an added feature called showVersion. It has the same signature as the showHelp function. Also updated the docs and tests accordingly.

@bcoe
Copy link
Member

bcoe commented Jan 4, 2021

@OsmanAltun #1823 includes a significant overhaul of showHelp, to make it work better with async/await (the assumption being that users would rather have control over when they print the help message, or just get the help message as a string).

I would like to hold off on adding this feature until I've landed updates to showHelp, so that we can make sure the APIs match.

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.

This looks pretty much ready to go to me, just a couple nits:

  1. let's make the help show people the yargs() usage, vs., using the yargs singleton.
  2. need to run the linter.

docs/api.md Outdated Show resolved Hide resolved
test/usage.cjs Show resolved Hide resolved
@bcoe bcoe changed the title Feature/showversion feat: add support for showVersion, similar to showHelp Mar 14, 2021
@bcoe bcoe merged commit 1a1e2d5 into yargs:master Mar 14, 2021
@OsmanAltun OsmanAltun deleted the feature/showversion branch July 16, 2021 20:25
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.

Feature: showVersion function
2 participants