Skip to content

Commit

Permalink
remove false from version type
Browse files Browse the repository at this point in the history
* this has had no effect since sindresorhus#68
  • Loading branch information
tommy-mitchell committed Feb 29, 2024
1 parent 7b9e739 commit 049f962
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ The description will be shown above your help text automatically.

##### version

Type: `string | boolean`\
Type: `string`\
Default: The package.json `"version"` property

Set a custom version output.
Expand Down
4 changes: 1 addition & 3 deletions source/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,8 @@ export type Options<Flags extends AnyFlags> = {

/**
Set a custom version output. Default: The package.json `"version"` property.
Set it to `false` to disable it altogether.
*/
readonly version?: string | false;
readonly version?: string;

/**
Automatically show the help text when the `--help` flag is present. Useful to set this value to `false` when a CLI manages child CLIs with their own help text.
Expand Down
2 changes: 1 addition & 1 deletion test/options/version.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ test('custom version', verifyVersion, {
test('version = false has no effect', verifyVersion, {
args: '--version',
execaOptions: {env: {VERSION: 'false'}},
expected: '1.0.0',
expected: 'false',
});

test('manual showVersion', verifyVersion, {
Expand Down

0 comments on commit 049f962

Please sign in to comment.