Skip to content

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

Merged
bcoe merged 8 commits intoyargs:masterfrom
OsmanAltun:feature/showversion
Mar 14, 2021
Merged

feat: add support for showVersion, similar to showHelp#1831
bcoe merged 8 commits intoyargs:masterfrom
OsmanAltun:feature/showversion

Conversation

@OsmanAltun
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

Comment thread docs/api.md Outdated
Comment thread test/usage.cjs
@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