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

[PR with tiny fixes] Fix help command for subcommands with an executable handler and only a short help flag. Do not use undefined long help option flag in legacy code. Change initial variable values in test for better error messages. #1930

Merged
merged 5 commits into from
Aug 19, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix version() parameter type
Borrowed from a3f0e28 that was supposed to land in the now-closed #1921.
  • Loading branch information
aweebit committed Aug 3, 2023
commit e8bea4aedd750418d094591d63699010f5c7b623
2 changes: 1 addition & 1 deletion lib/command.js
Original file line number Diff line number Diff line change
Expand Up @@ -1807,7 +1807,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
*
* You can optionally supply the flags and description to override the defaults.
*
* @param {string} str
* @param {string} [str]
aweebit marked this conversation as resolved.
Show resolved Hide resolved
* @param {string} [flags]
* @param {string} [description]
* @return {this | string} `this` command for chaining, or version string if no arguments
Expand Down
2 changes: 1 addition & 1 deletion typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ export class Command {
*
* You can optionally supply the flags and description to override the defaults.
*/
version(str: string, flags?: string, description?: string): this;
version(str?: string, flags?: string, description?: string): this;

/**
* Define a command, implemented using an action handler.
Expand Down