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

Subcommands syntax and usage #764

Closed
a-fas opened this issue Feb 6, 2018 · 29 comments
Closed

Subcommands syntax and usage #764

a-fas opened this issue Feb 6, 2018 · 29 comments
Assignees
Milestone

Comments

@a-fas
Copy link

a-fas commented Feb 6, 2018

Hi there !

Is it possible to define subcommands in commander ?

e.g.

node script.js thecommand subcommand1 -op1 -op2
node script.js thecommand subcommand2 -op3

A particularly intended usage would be to define program.command('thecommand').action('./path/to/subcommands.js') in root index.js or other starting point and then I would have some dir with commands (path/to/subcommands), where I can then define subcommands

program
  .command('subcommand1').action(...)
  .command('subcommand2').action(...)

or maybe some kind of array with commands

module.exports = [
  { command: 'subcommand1', options: '...', action: someFn },
  { command: 'subcommand2', options: '...', action: someFn }
]

I found something promising here, but it is not documented and I cannot figure out how it works

@shadowspawn
Copy link
Collaborator

You can do this using git-style sub-commands. You call parse again when handling the first subcommand to add another layer of subcommands.

In the test code you linked to, the first level command processing which detects cache is in pm and the second level processing which extends this to cache clear and cache validate is in pm-cache.js.

@a-fas
Copy link
Author

a-fas commented Jun 24, 2018

yes, I figured that out already. But it is not always convenient as it requires separate file with specific name in specific location which is unflexible. So I ended up with something like this (posting here, maybe someone will find useful):

function patchCommander(commander) {
    commander.Command.prototype.forwardSubcommands = function() {
        var self = this;
        var listener = function(args, unknown) {
            // Parse any so-far unknown options
            args = args || [];
            unknown = unknown || [];

            var parsed = self.parseOptions(unknown);
            if (parsed.args.length) args = parsed.args.concat(args);
            unknown = parsed.unknown;

            // Output help if necessary
            if (unknown.includes('--help') || unknown.includes('-h')) {
                self.outputHelp();
                process.exit(0);
            }

            self.parseArgs(args, unknown);
        };

        if (this._args.length > 0) {
            console.error('forwardSubcommands cannot be applied to command with explicit args');
        }

        var parent = this.parent || this;
        var name = parent === this ? '*' : this._name;
        parent.on('command:' + name, listener);
        if (this._alias) parent.on('command:' + this._alias, listener);
        return this;
    };

    // some other utils here ...
}

patchCommander is obviously triggered over the main instance somewhere in the beginning of the code. And then I can do e.g.:

    const subCommand = program
        .command('journal')
        .description('Journal utils') // this should also be separate line, I don't remember why already
        .forwardSubcommands(); // instead of "action"

    subCommand
        .command('list <path>')
        .action(List);

    subCommand
        .command('print-recent <path>')
        .action(PrintRecent);

works well so far ... :)

@buehler
Copy link

buehler commented Oct 24, 2018

I don't know what the state of this is, but it seems that nearly ALL cli developers would like some custom way to define subcommands...

@riongull
Copy link

riongull commented Mar 30, 2019

Relevant issue: #532
Relevant pull request: #854

@shadowspawn
Copy link
Collaborator

I don't know what the state of this is, but it seems that nearly ALL cli developers would like some custom way to define subcommands...

I am not sure what people have in mind when upvoting this. I know there is interest in more flexibility in specifying the external executable for git-style commands.

Is there interest in being able to do sub subcommands using action handlers and not using external executables? (#63 #245 #655)

@callumgare
Copy link

Is there interest in being able to do sub subcommands using action handlers and not using external executables?

Speaking for my self that is exactly what I would like :)

@tkausl
Copy link

tkausl commented Apr 11, 2019

I'd love to have this aswell.

@a-fas code works good so far, I only added !args.length || !self.listeners('command:' + args[0]) as condition to the output-help if, since otherwise ./app command1 command2 --help would print command1s help page, not command2s.

@a-fas
Copy link
Author

a-fas commented Apr 13, 2019

I think if it seems useful i can PR it :)
(Will do next week)

@shadowspawn
Copy link
Collaborator

On a related note, there is a closed pull request to "connect the wires" for nested routines in #245. The first comment is a nice summary. (I have not analysed it deeply enough to contrast with @a-fas approach yet.)

@misterhat
Copy link

misterhat commented May 17, 2019

I had assumed this is how it functioned by default. Super unintuitive to involve separate files by default. Also subcommands that are in separate files expect the original filename prepended to theirs, even if you specify a custom .name. This is inconsistent because if you run the program with npm start it looks for bin-subcommand, but if you run it with node bin/index.js it expects index-subcommand. Again, this is after I specified a custom .name.

@alexstandiford
Copy link

alexstandiford commented Jun 18, 2019

Expanding on my new hero, @a-fas

If you tweak @a-fas's snippet and put it in a separate file, commander-patch.js and export it as a module, you can just call the patch instead of commander.

// File name: ./commander-patch.js
const oldCommander = require( 'commander' );

function patchCommander( commander ){
	if( commander.hasOwnProperty( 'forwardSubcommands' ) ) return commander;
	commander.Command.prototype.forwardSubcommands = function(){
		var self = this;
		var listener = function( args, unknown ){
			// Parse any so-far unknown options
			args = args || [];
			unknown = unknown || [];

			var parsed = self.parseOptions( unknown );
			if( parsed.args.length ) args = parsed.args.concat( args );
			unknown = parsed.unknown;

			// Output help if necessary
			if( unknown.includes( '--help' ) || unknown.includes( '-h' ) ){
				self.outputHelp();
				process.exit( 0 );
			}

			self.parseArgs( args, unknown );
		};

		if( this._args.length > 0 ){
			console.error( 'forwardSubcommands cannot be applied to command with explicit args' );
		}

		var parent = this.parent || this;
		var name = parent === this ? '*' : this._name;
		parent.on( 'command:' + name, listener );
		if( this._alias ) parent.on( 'command:' + this._alias, listener );
		return this;
	};

	return commander;
}

const commander = patchCommander( oldCommander );

module.exports = commander;
#!/usr/bin/env node

// File name: index.js
const program = require( './commander-patch' );

const projectCommand = program
	.version( '1.0.0' )
	.command( 'project' )
	.description( 'All Project-related commands' )
	.forwardSubcommands();

projectCommand
	.command( 'list' )
	.action( () => {
		console.log( 'ran' )
	} );

program.parse( process.argv );

With this, if you run node index.js project list

You will get a response, ran

@alexstandiford
Copy link

I should also mention that @a-fas's solution doesn't seem to support the .option() flag. I was able to workaround this by using Inquirer.js

@Samuel-B-D
Copy link

Samuel-B-D commented Jun 20, 2019

I was stumbling in the same case and have found a bunch of those issues open here.
I noticed you can do something like this, which works pretty well :

const mainCommand = newCommand()
    .description('Main command with subcommand');

mainCommand.command('sub')
    .description('This is a subcommand')
    .action(() => console.log('code goes here'));

Help seems working properly, except when no command at all is provided, help is not displayed.
Fixed the latter with this construct :

if (process.argv.length <= 2) {
    mainCommand.outputHelp();
    return;
}
mainCommand.parse(process.argv);

@alexstandiford
Copy link

I was stumbling in the same case and have found a bunch of those issues open here.
I noticed you can do something like this, which works pretty well :

const mainCommand = newCommand()
    .description('Main command with subcommand');

mainCommand.command('sub')
    .description('This is a subcommand')
    .action(() => console.log('code goes here'));

Help seems working properly, except when no command at all is provided, help is not displayed.
Fixed the latter with this construct :

    if (process.argv.length <= 2) {
        importCommand.outputHelp();
        return;
    }
    importCommand.parse(process.argv);

I wonder if that could be added in the prototype, somehow?

@shadowspawn
Copy link
Collaborator

(Side note: #655 proposed space separated words to describe subcommands.)

@a-fas
Copy link
Author

a-fas commented Aug 20, 2019

Submitted a PR, with docs and examples. Sorry for taking so long. :)

@alexstandiford on options: it does support them, the tricky thing is that the option you are looking for may be in parent ... or parent of parent ... I faced that too so I'm using another util to collect all the options from all levels. I submitted it within the PR. Here is the code just for reference + have a look at readme changes and tests

Command.prototype.collectAllOptions = function() {
  var allOpts = {};
  var node = this;
  while (node) {
    allOpts = node.options
      .map(o => o.attributeName())
      .filter(o => typeof node[o] !== 'function')
      .reduce((r, o) => ({ [o]: node[o], ...r }), allOpts); // deeper opts enjoy the priority
    node = node.parent;
  }
  return allOpts;
};

and then in action handler

// cmd
// option('quiet') << UPPER LEVELS
// subcmd
// option('force')
// action('doit <param1> <param2>', actionXhandler)
...
function actionXhandler(param1, param2, commanderInstance) {
  if (commanderInstance.collectAllOpts().quiet) {
    ...
  }
}

@tkausl I included your fix and it works but honestly I don't 100% understand the idea with the listener check. I did some tests and in fact the code in if just never called for me. But again, it works as needed and displayes help for the last command level specified

@a-fas
Copy link
Author

a-fas commented Aug 25, 2019

Replying here to a question from #1024 to keep the discussion centralized (P.S. PR number 210 - nice ! 😜 )

... whether this can be made a default behavior, rather than a special mode ...

I'm using the following approach:

  • There is a main module, which imports the commander and define the first level of commands and options
  • Then there are "submodules" which do the job and have to export their subcommand structure somehow - subcommands and related code should be one
  • However forwardSubcommands must be called from top level ...
  • So my submodules export a function, which awaits to be called from the main module

Something like this:

// featureX.cmd.js
module.exports = (program) => {
    const subCommand = program
        .command('journal')
        .description('Journal tools')
        .forwardSubcommands();

    subCommand
        .command('read <name>')
        .description('Blah blah')
        .action(readJournal);

    subCommand
        .command('delete <name>')
        .action(deleteJournal);
}
...
// main.js
const commander = require('commander');
const featureX = require('./commands/featureX.cmd.js')

featureX(commander); // assign the sub commands

In fact I don't like this code structure. It is indirect and confusing. What if reuse existing command and action for subcommands and detect intended behavior based on parameter type ?

Either this

// featureX.cmd.js
const commander = new require('commander').Command; // require commander explicitly
...
commander                        // define subcommands inside an independent instance
    .command('read <name>')
    .description('Blah blah')
    .action(readJournal);

commander
    .command('delete <name>')
    .action(deleteJournal);

module.exports = commander; // fully set up sub command branch

...
// main.js
const commander = require('commander');
const featureX = require('./commands/featureX.cmd.js')

commander
  .command('journal')
  .description('Journal tools')
  .action(featureX); // pass instance of Commander

But then main module start to know details about the subcommand which might be unwanted. So maybe push it a bit further.

// featureX.cmd.js
const commander = new require('commander').Command;
...
commander.name = 'journal';            // Command name - maybe this is OK to leave outside ...
commander.description('Journal tools); // Description should be inside
// code from above example

...
// main.js
const commander = require('commander');
const featureX = require('./commands/featureX.cmd.js')

commander.command(featureX); // pass instance of Commander

Or maybe both are OK.

Any thoughts ?

@alexstandiford
Copy link

I think your first example is better. I really like it because it feels a little more like you’re writing a mongoose model, or something like that.

But then main module start to know details about the subcommand which might be unwanted. So maybe push it a bit further.

Can you elaborate on this a bit? I’m not sure I understand.

@a-fas
Copy link
Author

a-fas commented Aug 26, 2019

Hmmm, you mean the very first example ? With function ?
It's not my favorite because the upper level (main.js) actively passes an object into a lower level (featureX) where this object is somehow unpredictably modified. This is not transparent and confusing imho. But not that it is terrible - probably just the matter of preference :)

But then main module start to know details about the subcommand which might be unwanted. So maybe push it a bit further.

Can you elaborate on this a bit? I’m not sure I understand.

I just meant kind of information encapsulation - the description and, probably, command name ("journal") are the attributes of the featureX module, so they should be inside. Like in example 1 and 3. Imho the main.js should just import the module and consume it without giving names and descriptions.

@alexstandiford
Copy link

alexstandiford commented Aug 26, 2019

Sorry, no. I meant this example:

// featureX.cmd.js
const commander = new require('commander').Command; // require commander explicitly
...
commander                        // define subcommands inside an independent instance
    .command('read <name>')
    .description('Blah blah')
    .action(readJournal);

commander
    .command('delete <name>')
    .action(deleteJournal);

module.exports = commander; // fully set up sub command branch

...
// main.js
const commander = require('commander');
const featureX = require('./commands/featureX.cmd.js')

commander
  .command('journal')
  .description('Journal tools')
  .action(featureX); // pass instance of Commander

But to be honest, I think this and your third example both achieve the intended goal for the sub-command usage, and if the third example does create a nicer object structure as you mentioned.

@a-fas
Copy link
Author

a-fas commented Aug 27, 2019

Ah, then it is OK :)

In fact, I think example 2 and 3 do not contradict each other, maybe both can be implemented, with the 3rd being the recommended way. I'll have a look - will adjust the PR.

UPD: sorry, meant example 2 and 3, edited

@shadowspawn
Copy link
Collaborator

I do like example 3 from #764 (comment) for cases where want to separate out the .action implementation from the top-level program, and avoid the subcommand being in control.

I do not like adding another overload of .command. Although the syntax is likely clear enough when reading a working program, I think overloads with different parameters types (rather than optional parameters) are a bit of a nightmare when people are being guided by the IDE completion suggestions. This is more of a problem in JavaScript than in TypeScript.

My question in #1024 about making this a "default behavior" was questioning whether need to call forwardSubcommands, or could just make it work if add a subcommand to a subcommand.

@a-fas
Copy link
Author

a-fas commented Aug 28, 2019

overload of .command

why "another" ? It doesn't have overloads of the first param at the moment, or I'm missing something ? I partially agree, but here I'm out of new ideas :) A straight forward option would be smth like:

command('journal', 'description', { useSubcommand: subcommand });
command('journal', { useSubcommand: subcommand });
command(null, { useSubcommand: subcommand });

where all 3 options are accepted + a non-empty parameters for name and description would have a higher priority than the one defined inside the subcommand (??? imho)

Though I still think that .command(subcommand) is not terrible ... OK, maybe .command({ useSubcommand: subcommand }) ... but not insisting really - .command(null, { useSubcommand: subcommand }) looks OK for me too.

What do you think ?

default behavior

Hmmm, problem is that I need to get a new instance of Commander for subcommands. And .action returns current instance already. So if we leave current approach this should be a separate method. Just a side-note: probably naming should be changed - forwardSubcommands actually creates a new instance so something like createSubcommand would be more appropriate.

@shadowspawn
Copy link
Collaborator

another overload of .command

why "another" ?

I put recent work into trying to make it clearer that there are two ways to declare a command depending on whether intend using an .action handler or separate executable file due to the ongoing confusion between the two styles of calling .command.

default behavior

What I am wondering about is whether this is feasible, simply:

journalCommand = program
   .command('journal');

journalCommand
   .command('list')
   .action(() => {});

And for the new encapsulation style, perhaps a new method like:

const featureX = require('./commands/featureX.cmd.js')
program.addCommand(featureX);

@a-fas
Copy link
Author

a-fas commented Sep 16, 2019

added some draft code along with an example, see 372b7be
the method is called useSubcommand
still needs some fine tuning and cleanup of previous version

@a-fas
Copy link
Author

a-fas commented Dec 21, 2019

updated the PR, the code is finalized from my view. Sorry for long silence :)

@shadowspawn shadowspawn added the pending release Merged into a branch for a future release, but not released yet label Feb 1, 2020
@shadowspawn shadowspawn removed the pending release Merged into a branch for a future release, but not released yet label Mar 14, 2020
@shadowspawn
Copy link
Collaborator

Commander v5.0.0 has been released.

https://github.com/tj/commander.js/releases/tag/v5.0.0

jaebradley pushed a commit to jaebradley/emoji-search-cli that referenced this issue Mar 15, 2020
***
☝️ **Important announcement:** Greenkeeper will be saying goodbye 👋 and passing the torch to Snyk on June 3rd, 2020! [Find out how to migrate to Snyk and more at greenkeeper.io](https://greenkeeper.io)
***
## The dependency [commander](https://github.com/tj/commander.js) was updated from `4.1.1` to `5.0.0`.
This version is **not covered** by your **current version range**.

If you don’t accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update.

---

**Publisher:** [abetomo](https://www.npmjs.com/~abetomo)
**License:** MIT

<details>
<summary>Release Notes for v5.0.0</summary>

<h3>Added</h3>
<ul>
<li>support for nested commands with action-handlers ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1404480" data-permission-text="Title is private" data-url="tj/commander.js#1" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/1/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/1">#1</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="294713045" data-permission-text="Title is private" data-url="tj/commander.js#764" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/764/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/764">#764</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
<li><code>.addCommand()</code> for adding a separately configured command ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="294713045" data-permission-text="Title is private" data-url="tj/commander.js#764" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/764/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/764">#764</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
<li>allow a non-executable to be set as the default command ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="286464874" data-permission-text="Title is private" data-url="tj/commander.js#742" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/742/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/742">#742</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
<li>implicit help command when there are subcommands (previously only if executables) ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
<li>customise implicit help command with <code>.addHelpCommand()</code> ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
<li>display error message for unknown subcommand, by default ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="105242369" data-permission-text="Title is private" data-url="tj/commander.js#432" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/432/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/432">#432</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="516507885" data-permission-text="Title is private" data-url="tj/commander.js#1088" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/1088/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/1088">#1088</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
<li>display help for missing subcommand, by default ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="516507885" data-permission-text="Title is private" data-url="tj/commander.js#1088" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/1088/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/1088">#1088</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
<li>combined short options as single argument may include boolean flags and value flag and value (e.g. <code>-a -b -p 80</code> can be written as <code>-abp80</code>) ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="547256656" data-permission-text="Title is private" data-url="tj/commander.js#1145" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1145/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1145">#1145</a>])</li>
<li><code>.parseOption()</code> includes short flag and long flag expansions ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="547256656" data-permission-text="Title is private" data-url="tj/commander.js#1145" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1145/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1145">#1145</a>])</li>
<li><code>.helpInformation()</code> returns help text as a string, previously a private routine ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="560700420" data-permission-text="Title is private" data-url="tj/commander.js#1169" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1169/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1169">#1169</a>])</li>
<li><code>.parse()</code> implicitly uses <code>process.argv</code> if arguments not specified ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="560848429" data-permission-text="Title is private" data-url="tj/commander.js#1172" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1172/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1172">#1172</a>])</li>
<li>optionally specify where <code>.parse()</code> arguments "from", if not following node conventions ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="143058334" data-permission-text="Title is private" data-url="tj/commander.js#512" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/512/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/512">#512</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="560848429" data-permission-text="Title is private" data-url="tj/commander.js#1172" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1172/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1172">#1172</a>])</li>
<li>suggest help option along with unknown command error ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="561944637" data-permission-text="Title is private" data-url="tj/commander.js#1179" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1179/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1179">#1179</a>])</li>
<li>TypeScript definition for <code>commands</code> property of <code>Command</code> ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="562675877" data-permission-text="Title is private" data-url="tj/commander.js#1184" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1184/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1184">#1184</a>])</li>
<li>export <code>program</code> property ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="565709359" data-permission-text="Title is private" data-url="tj/commander.js#1195" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1195/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1195">#1195</a>])</li>
<li><code>createCommand</code> factory method to simplify subclassing ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="565215409" data-permission-text="Title is private" data-url="tj/commander.js#1191" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1191/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1191">#1191</a>])</li>
</ul>
<h3>Fixed</h3>
<ul>
<li>preserve argument order in subcommands ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="140326981" data-permission-text="Title is private" data-url="tj/commander.js#508" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/508/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/508">#508</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="444530964" data-permission-text="Title is private" data-url="tj/commander.js#962" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/962/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/962">#962</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="545350198" data-permission-text="Title is private" data-url="tj/commander.js#1138" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1138/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1138">#1138</a>])</li>
<li>do not emit <code>command:*</code> for executable subcommands ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="328564529" data-permission-text="Title is private" data-url="tj/commander.js#809" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/809/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/809">#809</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
<li>action handler called whether or not there are non-option arguments ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="499848795" data-permission-text="Title is private" data-url="tj/commander.js#1062" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1062/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1062">#1062</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
<li>combining option short flag and value in single argument now works for subcommands ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="547256656" data-permission-text="Title is private" data-url="tj/commander.js#1145" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1145/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1145">#1145</a>])</li>
<li>only add implicit help command when it will not conflict with other uses of argument ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="551899040" data-permission-text="Title is private" data-url="tj/commander.js#1153" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/1153/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/1153">#1153</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
<li>implicit help command works with command aliases ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="429033898" data-permission-text="Title is private" data-url="tj/commander.js#948" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/948/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/948">#948</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
<li>options are validated whether or not there is an action handler ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
</ul>
<h3>Changed</h3>
<ul>
<li><em>Breaking</em> <code>.args</code> contains command arguments with just recognised options removed ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="486336653" data-permission-text="Title is private" data-url="tj/commander.js#1032" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/1032/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/1032">#1032</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="545350198" data-permission-text="Title is private" data-url="tj/commander.js#1138" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1138/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1138">#1138</a>])</li>
<li><em>Breaking</em> display error if required argument for command is missing ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="467912082" data-permission-text="Title is private" data-url="tj/commander.js#995" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/995/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/995">#995</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
<li>tighten TypeScript definition of custom option processing function passed to <code>.option()</code> ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="537071462" data-permission-text="Title is private" data-url="tj/commander.js#1119" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1119/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1119">#1119</a>])</li>
<li><em>Breaking</em> <code>.allowUnknownOption()</code> ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="322394861" data-permission-text="Title is private" data-url="tj/commander.js#802" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/802/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/802">#802</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="545350198" data-permission-text="Title is private" data-url="tj/commander.js#1138" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1138/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1138">#1138</a>])
<ul>
<li>unknown options included in arguments passed to command action handler</li>
<li>unknown options included in <code>.args</code></li>
</ul>
</li>
<li>only recognised option short flags and long flags are expanded (e.g. <code>-ab</code> or <code>--foo=bar</code>) ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="547256656" data-permission-text="Title is private" data-url="tj/commander.js#1145" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1145/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1145">#1145</a>])</li>
<li><em>Breaking</em> <code>.parseOptions()</code> ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="545350198" data-permission-text="Title is private" data-url="tj/commander.js#1138" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1138/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1138">#1138</a>])
<ul>
<li><code>args</code> in returned result renamed <code>operands</code> and does not include anything after first unknown option</li>
<li><code>unknown</code> in returned result has arguments after first unknown option including operands, not just options and values</li>
</ul>
</li>
<li><em>Breaking</em> <code>.on('command:*', callback)</code> and other command events passed (changed) results from <code>.parseOptions</code>, i.e. operands and unknown  ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="545350198" data-permission-text="Title is private" data-url="tj/commander.js#1138" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1138/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1138">#1138</a>])</li>
<li>refactor Option from prototype to class ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="544020268" data-permission-text="Title is private" data-url="tj/commander.js#1133" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1133/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1133">#1133</a>])</li>
<li>refactor Command from prototype to class ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="558019087" data-permission-text="Title is private" data-url="tj/commander.js#1159" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1159/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1159">#1159</a>])</li>
<li>changes to error handling ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="558600050" data-permission-text="Title is private" data-url="tj/commander.js#1165" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1165/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1165">#1165</a>])
<ul>
<li>throw for author error, not just display message</li>
<li>preflight for variadic error</li>
<li>add tips to missing subcommand executable</li>
</ul>
</li>
<li>TypeScript fluent return types changed to be more subclass friendly, return <code>this</code> rather than <code>Command</code> ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="561948792" data-permission-text="Title is private" data-url="tj/commander.js#1180" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1180/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1180">#1180</a>])</li>
<li><code>.parseAsync</code> returns <code>Promise&lt;this&gt;</code> to be consistent with <code>.parse()</code> ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="561948792" data-permission-text="Title is private" data-url="tj/commander.js#1180" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1180/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1180">#1180</a>])</li>
<li>update dependencies</li>
</ul>
<h3>Removed</h3>
<ul>
<li>removed EventEmitter from TypeScript definition for Command, eliminating implicit peer dependency on <code>@types/node</code> ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548333754" data-permission-text="Title is private" data-url="tj/commander.js#1146" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1146/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1146">#1146</a>])</li>
<li>removed private function <code>normalize</code> (the functionality has been integrated into <code>parseOptions</code>) ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="547256656" data-permission-text="Title is private" data-url="tj/commander.js#1145" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1145/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1145">#1145</a>])</li>
<li><code>parseExpectedArgs</code> is now private ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
</ul>
<h3>Migration Tips</h3>
<p>If you use <code>.on('command:*')</code> or more complicated tests to detect an unrecognised subcommand, you may be able to delete the code and rely on the default behaviour.</p>
<p>If you use <code>program.args</code> or more complicated tests to detect a missing subcommand, you may be able to delete the code and rely on the default behaviour.</p>
<p>If you use <code>.command('*')</code> to add a default command, you may be be able to switch to <code>isDefault:true</code> with a named command.</p>
</details>

<details>
<summary>Commits</summary>
<p>The new version differs by 53 commits.</p>
<ul>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/2aad525640d5885d9f51ae8dfe07a01c280cf4e3"><code>2aad525</code></a> <code>Update dependencies (#1214)</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/f86d8781655720eb1429d1b9c883e8c357f7c8c3"><code>f86d878</code></a> <code>Add cli keyword (#1213)</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/83af0fd0488dc6f4568435050e7d3d7e0ab11b5b"><code>83af0fd</code></a> <code>Prepare for 5.0.0 (#1211)</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/f14df0709173abf9ab4732064d77bce34f60fb05"><code>f14df07</code></a> <code>Add eslint settings for TypeScript (#1205)</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/95e0d193ec02859f1bdcb08785e21f86942fc5e5"><code>95e0d19</code></a> <code>5.0.0-4</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/bd5a49e9d5ca4f4cf1c8bf60e3567ab5d5e67039"><code>bd5a49e</code></a> <code>Add factory to CHANGELOG</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/8c3dd6ffe90b566c5cabb277f8d9c57a8bfb348b"><code>8c3dd6f</code></a> <code>createCommand factory routine (#1191)</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/3c9f33fd8440aab061cbb0484712ed77c54df03a"><code>3c9f33f</code></a> <code>Say we support LTS, so do not need to update when node changes (#1204)</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/3cf8cff2a91d1d38da2ea9e5ace40230f1d9a813"><code>3cf8cff</code></a> <code>Expand typescript checks (#1198)</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/a3f453f11cf3ad69d2b15ce82efdfd3af53efe22"><code>a3f453f</code></a> <code>5.0.0-3</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/87bfca690eda98a0573b20569f87675466c23dd8"><code>87bfca6</code></a> <code>Add CHANGELOG entries for 5.0.0-3</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/1757564a0f6034f803e1e638c6cf34ef64b77775"><code>1757564</code></a> <code>Use a tidier global command (#1200)</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/0a50bd6c7696b6c5217258d38613f58684d1585b"><code>0a50bd6</code></a> <code>Add program to exports (#1195)</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/77e511fc17cf5857520b0740737d0fc27acf736c"><code>77e511f</code></a> <code>Enable TypeScript checking of javascript, and resolve or suppress errors (#1194)</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/2491c763e1ba058a5a877d7aa4b30427de83e844"><code>2491c76</code></a> <code>URLEncode several chinese toc link</code></li>
</ul>
<p>There are 53 commits in total.</p>
<p>See the <a href="https://urls.greenkeeper.io/tj/commander.js/compare/d5186ba4b9b64a72cd685fccbb9ec5d0ec0c430d...2aad525640d5885d9f51ae8dfe07a01c280cf4e3">full diff</a></p>
</details>

---

<details>
  <summary>FAQ and help</summary>

  There is a collection of [frequently asked questions](https://greenkeeper.io/faq.html). If those don’t help, you can always [ask the humans behind Greenkeeper](https://github.com/greenkeeperio/greenkeeper/issues/new).
</details>

---


Your [Greenkeeper](https://greenkeeper.io) bot 🌴


Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
jaebradley pushed a commit to jaebradley/github-languages-cli that referenced this issue Mar 16, 2020
***
☝️ **Important announcement:** Greenkeeper will be saying goodbye 👋 and passing the torch to Snyk on June 3rd, 2020! [Find out how to migrate to Snyk and more at greenkeeper.io](https://greenkeeper.io)
***
## The dependency [commander](https://github.com/tj/commander.js) was updated from `4.1.1` to `5.0.0`.
This version is **not covered** by your **current version range**.

If you don’t accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update.

---

**Publisher:** [abetomo](https://www.npmjs.com/~abetomo)
**License:** MIT

<details>
<summary>Release Notes for v5.0.0</summary>

<h3>Added</h3>
<ul>
<li>support for nested commands with action-handlers ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1404480" data-permission-text="Title is private" data-url="tj/commander.js#1" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/1/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/1">#1</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="294713045" data-permission-text="Title is private" data-url="tj/commander.js#764" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/764/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/764">#764</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
<li><code>.addCommand()</code> for adding a separately configured command ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="294713045" data-permission-text="Title is private" data-url="tj/commander.js#764" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/764/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/764">#764</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
<li>allow a non-executable to be set as the default command ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="286464874" data-permission-text="Title is private" data-url="tj/commander.js#742" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/742/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/742">#742</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
<li>implicit help command when there are subcommands (previously only if executables) ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
<li>customise implicit help command with <code>.addHelpCommand()</code> ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
<li>display error message for unknown subcommand, by default ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="105242369" data-permission-text="Title is private" data-url="tj/commander.js#432" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/432/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/432">#432</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="516507885" data-permission-text="Title is private" data-url="tj/commander.js#1088" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/1088/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/1088">#1088</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
<li>display help for missing subcommand, by default ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="516507885" data-permission-text="Title is private" data-url="tj/commander.js#1088" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/1088/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/1088">#1088</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
<li>combined short options as single argument may include boolean flags and value flag and value (e.g. <code>-a -b -p 80</code> can be written as <code>-abp80</code>) ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="547256656" data-permission-text="Title is private" data-url="tj/commander.js#1145" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1145/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1145">#1145</a>])</li>
<li><code>.parseOption()</code> includes short flag and long flag expansions ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="547256656" data-permission-text="Title is private" data-url="tj/commander.js#1145" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1145/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1145">#1145</a>])</li>
<li><code>.helpInformation()</code> returns help text as a string, previously a private routine ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="560700420" data-permission-text="Title is private" data-url="tj/commander.js#1169" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1169/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1169">#1169</a>])</li>
<li><code>.parse()</code> implicitly uses <code>process.argv</code> if arguments not specified ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="560848429" data-permission-text="Title is private" data-url="tj/commander.js#1172" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1172/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1172">#1172</a>])</li>
<li>optionally specify where <code>.parse()</code> arguments "from", if not following node conventions ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="143058334" data-permission-text="Title is private" data-url="tj/commander.js#512" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/512/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/512">#512</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="560848429" data-permission-text="Title is private" data-url="tj/commander.js#1172" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1172/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1172">#1172</a>])</li>
<li>suggest help option along with unknown command error ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="561944637" data-permission-text="Title is private" data-url="tj/commander.js#1179" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1179/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1179">#1179</a>])</li>
<li>TypeScript definition for <code>commands</code> property of <code>Command</code> ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="562675877" data-permission-text="Title is private" data-url="tj/commander.js#1184" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1184/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1184">#1184</a>])</li>
<li>export <code>program</code> property ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="565709359" data-permission-text="Title is private" data-url="tj/commander.js#1195" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1195/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1195">#1195</a>])</li>
<li><code>createCommand</code> factory method to simplify subclassing ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="565215409" data-permission-text="Title is private" data-url="tj/commander.js#1191" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1191/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1191">#1191</a>])</li>
</ul>
<h3>Fixed</h3>
<ul>
<li>preserve argument order in subcommands ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="140326981" data-permission-text="Title is private" data-url="tj/commander.js#508" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/508/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/508">#508</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="444530964" data-permission-text="Title is private" data-url="tj/commander.js#962" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/962/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/962">#962</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="545350198" data-permission-text="Title is private" data-url="tj/commander.js#1138" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1138/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1138">#1138</a>])</li>
<li>do not emit <code>command:*</code> for executable subcommands ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="328564529" data-permission-text="Title is private" data-url="tj/commander.js#809" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/809/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/809">#809</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
<li>action handler called whether or not there are non-option arguments ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="499848795" data-permission-text="Title is private" data-url="tj/commander.js#1062" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1062/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1062">#1062</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
<li>combining option short flag and value in single argument now works for subcommands ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="547256656" data-permission-text="Title is private" data-url="tj/commander.js#1145" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1145/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1145">#1145</a>])</li>
<li>only add implicit help command when it will not conflict with other uses of argument ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="551899040" data-permission-text="Title is private" data-url="tj/commander.js#1153" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/1153/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/1153">#1153</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
<li>implicit help command works with command aliases ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="429033898" data-permission-text="Title is private" data-url="tj/commander.js#948" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/948/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/948">#948</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
<li>options are validated whether or not there is an action handler ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
</ul>
<h3>Changed</h3>
<ul>
<li><em>Breaking</em> <code>.args</code> contains command arguments with just recognised options removed ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="486336653" data-permission-text="Title is private" data-url="tj/commander.js#1032" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/1032/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/1032">#1032</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="545350198" data-permission-text="Title is private" data-url="tj/commander.js#1138" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1138/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1138">#1138</a>])</li>
<li><em>Breaking</em> display error if required argument for command is missing ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="467912082" data-permission-text="Title is private" data-url="tj/commander.js#995" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/995/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/995">#995</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
<li>tighten TypeScript definition of custom option processing function passed to <code>.option()</code> ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="537071462" data-permission-text="Title is private" data-url="tj/commander.js#1119" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1119/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1119">#1119</a>])</li>
<li><em>Breaking</em> <code>.allowUnknownOption()</code> ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="322394861" data-permission-text="Title is private" data-url="tj/commander.js#802" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/802/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/802">#802</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="545350198" data-permission-text="Title is private" data-url="tj/commander.js#1138" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1138/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1138">#1138</a>])
<ul>
<li>unknown options included in arguments passed to command action handler</li>
<li>unknown options included in <code>.args</code></li>
</ul>
</li>
<li>only recognised option short flags and long flags are expanded (e.g. <code>-ab</code> or <code>--foo=bar</code>) ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="547256656" data-permission-text="Title is private" data-url="tj/commander.js#1145" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1145/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1145">#1145</a>])</li>
<li><em>Breaking</em> <code>.parseOptions()</code> ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="545350198" data-permission-text="Title is private" data-url="tj/commander.js#1138" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1138/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1138">#1138</a>])
<ul>
<li><code>args</code> in returned result renamed <code>operands</code> and does not include anything after first unknown option</li>
<li><code>unknown</code> in returned result has arguments after first unknown option including operands, not just options and values</li>
</ul>
</li>
<li><em>Breaking</em> <code>.on('command:*', callback)</code> and other command events passed (changed) results from <code>.parseOptions</code>, i.e. operands and unknown  ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="545350198" data-permission-text="Title is private" data-url="tj/commander.js#1138" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1138/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1138">#1138</a>])</li>
<li>refactor Option from prototype to class ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="544020268" data-permission-text="Title is private" data-url="tj/commander.js#1133" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1133/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1133">#1133</a>])</li>
<li>refactor Command from prototype to class ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="558019087" data-permission-text="Title is private" data-url="tj/commander.js#1159" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1159/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1159">#1159</a>])</li>
<li>changes to error handling ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="558600050" data-permission-text="Title is private" data-url="tj/commander.js#1165" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1165/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1165">#1165</a>])
<ul>
<li>throw for author error, not just display message</li>
<li>preflight for variadic error</li>
<li>add tips to missing subcommand executable</li>
</ul>
</li>
<li>TypeScript fluent return types changed to be more subclass friendly, return <code>this</code> rather than <code>Command</code> ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="561948792" data-permission-text="Title is private" data-url="tj/commander.js#1180" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1180/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1180">#1180</a>])</li>
<li><code>.parseAsync</code> returns <code>Promise&lt;this&gt;</code> to be consistent with <code>.parse()</code> ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="561948792" data-permission-text="Title is private" data-url="tj/commander.js#1180" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1180/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1180">#1180</a>])</li>
<li>update dependencies</li>
</ul>
<h3>Removed</h3>
<ul>
<li>removed EventEmitter from TypeScript definition for Command, eliminating implicit peer dependency on <code>@types/node</code> ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548333754" data-permission-text="Title is private" data-url="tj/commander.js#1146" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1146/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1146">#1146</a>])</li>
<li>removed private function <code>normalize</code> (the functionality has been integrated into <code>parseOptions</code>) ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="547256656" data-permission-text="Title is private" data-url="tj/commander.js#1145" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1145/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1145">#1145</a>])</li>
<li><code>parseExpectedArgs</code> is now private ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
</ul>
<h3>Migration Tips</h3>
<p>If you use <code>.on('command:*')</code> or more complicated tests to detect an unrecognised subcommand, you may be able to delete the code and rely on the default behaviour.</p>
<p>If you use <code>program.args</code> or more complicated tests to detect a missing subcommand, you may be able to delete the code and rely on the default behaviour.</p>
<p>If you use <code>.command('*')</code> to add a default command, you may be be able to switch to <code>isDefault:true</code> with a named command.</p>
</details>

<details>
<summary>Commits</summary>
<p>The new version differs by 53 commits.</p>
<ul>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/2aad525640d5885d9f51ae8dfe07a01c280cf4e3"><code>2aad525</code></a> <code>Update dependencies (#1214)</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/f86d8781655720eb1429d1b9c883e8c357f7c8c3"><code>f86d878</code></a> <code>Add cli keyword (#1213)</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/83af0fd0488dc6f4568435050e7d3d7e0ab11b5b"><code>83af0fd</code></a> <code>Prepare for 5.0.0 (#1211)</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/f14df0709173abf9ab4732064d77bce34f60fb05"><code>f14df07</code></a> <code>Add eslint settings for TypeScript (#1205)</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/95e0d193ec02859f1bdcb08785e21f86942fc5e5"><code>95e0d19</code></a> <code>5.0.0-4</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/bd5a49e9d5ca4f4cf1c8bf60e3567ab5d5e67039"><code>bd5a49e</code></a> <code>Add factory to CHANGELOG</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/8c3dd6ffe90b566c5cabb277f8d9c57a8bfb348b"><code>8c3dd6f</code></a> <code>createCommand factory routine (#1191)</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/3c9f33fd8440aab061cbb0484712ed77c54df03a"><code>3c9f33f</code></a> <code>Say we support LTS, so do not need to update when node changes (#1204)</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/3cf8cff2a91d1d38da2ea9e5ace40230f1d9a813"><code>3cf8cff</code></a> <code>Expand typescript checks (#1198)</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/a3f453f11cf3ad69d2b15ce82efdfd3af53efe22"><code>a3f453f</code></a> <code>5.0.0-3</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/87bfca690eda98a0573b20569f87675466c23dd8"><code>87bfca6</code></a> <code>Add CHANGELOG entries for 5.0.0-3</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/1757564a0f6034f803e1e638c6cf34ef64b77775"><code>1757564</code></a> <code>Use a tidier global command (#1200)</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/0a50bd6c7696b6c5217258d38613f58684d1585b"><code>0a50bd6</code></a> <code>Add program to exports (#1195)</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/77e511fc17cf5857520b0740737d0fc27acf736c"><code>77e511f</code></a> <code>Enable TypeScript checking of javascript, and resolve or suppress errors (#1194)</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/2491c763e1ba058a5a877d7aa4b30427de83e844"><code>2491c76</code></a> <code>URLEncode several chinese toc link</code></li>
</ul>
<p>There are 53 commits in total.</p>
<p>See the <a href="https://urls.greenkeeper.io/tj/commander.js/compare/d5186ba4b9b64a72cd685fccbb9ec5d0ec0c430d...2aad525640d5885d9f51ae8dfe07a01c280cf4e3">full diff</a></p>
</details>

---

<details>
  <summary>FAQ and help</summary>

  There is a collection of [frequently asked questions](https://greenkeeper.io/faq.html). If those don’t help, you can always [ask the humans behind Greenkeeper](https://github.com/greenkeeperio/greenkeeper/issues/new).
</details>

---


Your [Greenkeeper](https://greenkeeper.io) bot 🌴


Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
jaebradley pushed a commit to jaebradley/npm-install-search-cli that referenced this issue Mar 16, 2020
* ***
☝️ **Important announcement:** Greenkeeper will be saying goodbye 👋 and passing the torch to Snyk on June 3rd, 2020! [Find out how to migrate to Snyk and more at greenkeeper.io](https://greenkeeper.io)
***
## The dependency [commander](https://github.com/tj/commander.js) was updated from `4.1.1` to `5.0.0`.
This version is **not covered** by your **current version range**.

If you don’t accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update.

---

**Publisher:** [abetomo](https://www.npmjs.com/~abetomo)
**License:** MIT

<details>
<summary>Release Notes for v5.0.0</summary>

<h3>Added</h3>
<ul>
<li>support for nested commands with action-handlers ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1404480" data-permission-text="Title is private" data-url="tj/commander.js#1" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/1/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/1">#1</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="294713045" data-permission-text="Title is private" data-url="tj/commander.js#764" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/764/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/764">#764</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
<li><code>.addCommand()</code> for adding a separately configured command ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="294713045" data-permission-text="Title is private" data-url="tj/commander.js#764" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/764/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/764">#764</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
<li>allow a non-executable to be set as the default command ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="286464874" data-permission-text="Title is private" data-url="tj/commander.js#742" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/742/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/742">#742</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
<li>implicit help command when there are subcommands (previously only if executables) ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
<li>customise implicit help command with <code>.addHelpCommand()</code> ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
<li>display error message for unknown subcommand, by default ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="105242369" data-permission-text="Title is private" data-url="tj/commander.js#432" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/432/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/432">#432</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="516507885" data-permission-text="Title is private" data-url="tj/commander.js#1088" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/1088/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/1088">#1088</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
<li>display help for missing subcommand, by default ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="516507885" data-permission-text="Title is private" data-url="tj/commander.js#1088" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/1088/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/1088">#1088</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
<li>combined short options as single argument may include boolean flags and value flag and value (e.g. <code>-a -b -p 80</code> can be written as <code>-abp80</code>) ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="547256656" data-permission-text="Title is private" data-url="tj/commander.js#1145" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1145/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1145">#1145</a>])</li>
<li><code>.parseOption()</code> includes short flag and long flag expansions ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="547256656" data-permission-text="Title is private" data-url="tj/commander.js#1145" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1145/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1145">#1145</a>])</li>
<li><code>.helpInformation()</code> returns help text as a string, previously a private routine ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="560700420" data-permission-text="Title is private" data-url="tj/commander.js#1169" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1169/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1169">#1169</a>])</li>
<li><code>.parse()</code> implicitly uses <code>process.argv</code> if arguments not specified ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="560848429" data-permission-text="Title is private" data-url="tj/commander.js#1172" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1172/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1172">#1172</a>])</li>
<li>optionally specify where <code>.parse()</code> arguments "from", if not following node conventions ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="143058334" data-permission-text="Title is private" data-url="tj/commander.js#512" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/512/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/512">#512</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="560848429" data-permission-text="Title is private" data-url="tj/commander.js#1172" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1172/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1172">#1172</a>])</li>
<li>suggest help option along with unknown command error ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="561944637" data-permission-text="Title is private" data-url="tj/commander.js#1179" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1179/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1179">#1179</a>])</li>
<li>TypeScript definition for <code>commands</code> property of <code>Command</code> ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="562675877" data-permission-text="Title is private" data-url="tj/commander.js#1184" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1184/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1184">#1184</a>])</li>
<li>export <code>program</code> property ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="565709359" data-permission-text="Title is private" data-url="tj/commander.js#1195" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1195/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1195">#1195</a>])</li>
<li><code>createCommand</code> factory method to simplify subclassing ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="565215409" data-permission-text="Title is private" data-url="tj/commander.js#1191" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1191/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1191">#1191</a>])</li>
</ul>
<h3>Fixed</h3>
<ul>
<li>preserve argument order in subcommands ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="140326981" data-permission-text="Title is private" data-url="tj/commander.js#508" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/508/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/508">#508</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="444530964" data-permission-text="Title is private" data-url="tj/commander.js#962" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/962/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/962">#962</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="545350198" data-permission-text="Title is private" data-url="tj/commander.js#1138" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1138/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1138">#1138</a>])</li>
<li>do not emit <code>command:*</code> for executable subcommands ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="328564529" data-permission-text="Title is private" data-url="tj/commander.js#809" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/809/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/809">#809</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
<li>action handler called whether or not there are non-option arguments ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="499848795" data-permission-text="Title is private" data-url="tj/commander.js#1062" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1062/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1062">#1062</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
<li>combining option short flag and value in single argument now works for subcommands ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="547256656" data-permission-text="Title is private" data-url="tj/commander.js#1145" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1145/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1145">#1145</a>])</li>
<li>only add implicit help command when it will not conflict with other uses of argument ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="551899040" data-permission-text="Title is private" data-url="tj/commander.js#1153" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/1153/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/1153">#1153</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
<li>implicit help command works with command aliases ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="429033898" data-permission-text="Title is private" data-url="tj/commander.js#948" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/948/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/948">#948</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
<li>options are validated whether or not there is an action handler ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
</ul>
<h3>Changed</h3>
<ul>
<li><em>Breaking</em> <code>.args</code> contains command arguments with just recognised options removed ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="486336653" data-permission-text="Title is private" data-url="tj/commander.js#1032" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/1032/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/1032">#1032</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="545350198" data-permission-text="Title is private" data-url="tj/commander.js#1138" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1138/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1138">#1138</a>])</li>
<li><em>Breaking</em> display error if required argument for command is missing ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="467912082" data-permission-text="Title is private" data-url="tj/commander.js#995" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/995/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/995">#995</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
<li>tighten TypeScript definition of custom option processing function passed to <code>.option()</code> ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="537071462" data-permission-text="Title is private" data-url="tj/commander.js#1119" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1119/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1119">#1119</a>])</li>
<li><em>Breaking</em> <code>.allowUnknownOption()</code> ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="322394861" data-permission-text="Title is private" data-url="tj/commander.js#802" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/802/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/802">#802</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="545350198" data-permission-text="Title is private" data-url="tj/commander.js#1138" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1138/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1138">#1138</a>])
<ul>
<li>unknown options included in arguments passed to command action handler</li>
<li>unknown options included in <code>.args</code></li>
</ul>
</li>
<li>only recognised option short flags and long flags are expanded (e.g. <code>-ab</code> or <code>--foo=bar</code>) ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="547256656" data-permission-text="Title is private" data-url="tj/commander.js#1145" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1145/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1145">#1145</a>])</li>
<li><em>Breaking</em> <code>.parseOptions()</code> ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="545350198" data-permission-text="Title is private" data-url="tj/commander.js#1138" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1138/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1138">#1138</a>])
<ul>
<li><code>args</code> in returned result renamed <code>operands</code> and does not include anything after first unknown option</li>
<li><code>unknown</code> in returned result has arguments after first unknown option including operands, not just options and values</li>
</ul>
</li>
<li><em>Breaking</em> <code>.on('command:*', callback)</code> and other command events passed (changed) results from <code>.parseOptions</code>, i.e. operands and unknown  ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="545350198" data-permission-text="Title is private" data-url="tj/commander.js#1138" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1138/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1138">#1138</a>])</li>
<li>refactor Option from prototype to class ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="544020268" data-permission-text="Title is private" data-url="tj/commander.js#1133" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1133/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1133">#1133</a>])</li>
<li>refactor Command from prototype to class ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="558019087" data-permission-text="Title is private" data-url="tj/commander.js#1159" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1159/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1159">#1159</a>])</li>
<li>changes to error handling ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="558600050" data-permission-text="Title is private" data-url="tj/commander.js#1165" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1165/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1165">#1165</a>])
<ul>
<li>throw for author error, not just display message</li>
<li>preflight for variadic error</li>
<li>add tips to missing subcommand executable</li>
</ul>
</li>
<li>TypeScript fluent return types changed to be more subclass friendly, return <code>this</code> rather than <code>Command</code> ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="561948792" data-permission-text="Title is private" data-url="tj/commander.js#1180" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1180/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1180">#1180</a>])</li>
<li><code>.parseAsync</code> returns <code>Promise&lt;this&gt;</code> to be consistent with <code>.parse()</code> ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="561948792" data-permission-text="Title is private" data-url="tj/commander.js#1180" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1180/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1180">#1180</a>])</li>
<li>update dependencies</li>
</ul>
<h3>Removed</h3>
<ul>
<li>removed EventEmitter from TypeScript definition for Command, eliminating implicit peer dependency on <code>@types/node</code> ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548333754" data-permission-text="Title is private" data-url="tj/commander.js#1146" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1146/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1146">#1146</a>])</li>
<li>removed private function <code>normalize</code> (the functionality has been integrated into <code>parseOptions</code>) ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="547256656" data-permission-text="Title is private" data-url="tj/commander.js#1145" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1145/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1145">#1145</a>])</li>
<li><code>parseExpectedArgs</code> is now private ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
</ul>
<h3>Migration Tips</h3>
<p>If you use <code>.on('command:*')</code> or more complicated tests to detect an unrecognised subcommand, you may be able to delete the code and rely on the default behaviour.</p>
<p>If you use <code>program.args</code> or more complicated tests to detect a missing subcommand, you may be able to delete the code and rely on the default behaviour.</p>
<p>If you use <code>.command('*')</code> to add a default command, you may be be able to switch to <code>isDefault:true</code> with a named command.</p>
</details>

<details>
<summary>Commits</summary>
<p>The new version differs by 53 commits.</p>
<ul>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/2aad525640d5885d9f51ae8dfe07a01c280cf4e3"><code>2aad525</code></a> <code>Update dependencies (#1214)</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/f86d8781655720eb1429d1b9c883e8c357f7c8c3"><code>f86d878</code></a> <code>Add cli keyword (#1213)</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/83af0fd0488dc6f4568435050e7d3d7e0ab11b5b"><code>83af0fd</code></a> <code>Prepare for 5.0.0 (#1211)</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/f14df0709173abf9ab4732064d77bce34f60fb05"><code>f14df07</code></a> <code>Add eslint settings for TypeScript (#1205)</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/95e0d193ec02859f1bdcb08785e21f86942fc5e5"><code>95e0d19</code></a> <code>5.0.0-4</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/bd5a49e9d5ca4f4cf1c8bf60e3567ab5d5e67039"><code>bd5a49e</code></a> <code>Add factory to CHANGELOG</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/8c3dd6ffe90b566c5cabb277f8d9c57a8bfb348b"><code>8c3dd6f</code></a> <code>createCommand factory routine (#1191)</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/3c9f33fd8440aab061cbb0484712ed77c54df03a"><code>3c9f33f</code></a> <code>Say we support LTS, so do not need to update when node changes (#1204)</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/3cf8cff2a91d1d38da2ea9e5ace40230f1d9a813"><code>3cf8cff</code></a> <code>Expand typescript checks (#1198)</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/a3f453f11cf3ad69d2b15ce82efdfd3af53efe22"><code>a3f453f</code></a> <code>5.0.0-3</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/87bfca690eda98a0573b20569f87675466c23dd8"><code>87bfca6</code></a> <code>Add CHANGELOG entries for 5.0.0-3</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/1757564a0f6034f803e1e638c6cf34ef64b77775"><code>1757564</code></a> <code>Use a tidier global command (#1200)</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/0a50bd6c7696b6c5217258d38613f58684d1585b"><code>0a50bd6</code></a> <code>Add program to exports (#1195)</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/77e511fc17cf5857520b0740737d0fc27acf736c"><code>77e511f</code></a> <code>Enable TypeScript checking of javascript, and resolve or suppress errors (#1194)</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/2491c763e1ba058a5a877d7aa4b30427de83e844"><code>2491c76</code></a> <code>URLEncode several chinese toc link</code></li>
</ul>
<p>There are 53 commits in total.</p>
<p>See the <a href="https://urls.greenkeeper.io/tj/commander.js/compare/d5186ba4b9b64a72cd685fccbb9ec5d0ec0c430d...2aad525640d5885d9f51ae8dfe07a01c280cf4e3">full diff</a></p>
</details>

---

<details>
  <summary>FAQ and help</summary>

  There is a collection of [frequently asked questions](https://greenkeeper.io/faq.html). If those don’t help, you can always [ask the humans behind Greenkeeper](https://github.com/greenkeeperio/greenkeeper/issues/new).
</details>

---


Your [Greenkeeper](https://greenkeeper.io) bot 🌴



* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
jaebradley pushed a commit to jaebradley/http-status-identifier-cli that referenced this issue Mar 16, 2020
***
☝️ **Important announcement:** Greenkeeper will be saying goodbye 👋 and passing the torch to Snyk on June 3rd, 2020! [Find out how to migrate to Snyk and more at greenkeeper.io](https://greenkeeper.io)
***
## The dependency [commander](https://github.com/tj/commander.js) was updated from `4.1.1` to `5.0.0`.
This version is **not covered** by your **current version range**.

If you don’t accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update.

---

**Publisher:** [abetomo](https://www.npmjs.com/~abetomo)
**License:** MIT

<details>
<summary>Release Notes for v5.0.0</summary>

<h3>Added</h3>
<ul>
<li>support for nested commands with action-handlers ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1404480" data-permission-text="Title is private" data-url="tj/commander.js#1" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/1/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/1">#1</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="294713045" data-permission-text="Title is private" data-url="tj/commander.js#764" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/764/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/764">#764</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
<li><code>.addCommand()</code> for adding a separately configured command ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="294713045" data-permission-text="Title is private" data-url="tj/commander.js#764" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/764/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/764">#764</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
<li>allow a non-executable to be set as the default command ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="286464874" data-permission-text="Title is private" data-url="tj/commander.js#742" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/742/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/742">#742</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
<li>implicit help command when there are subcommands (previously only if executables) ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
<li>customise implicit help command with <code>.addHelpCommand()</code> ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
<li>display error message for unknown subcommand, by default ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="105242369" data-permission-text="Title is private" data-url="tj/commander.js#432" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/432/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/432">#432</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="516507885" data-permission-text="Title is private" data-url="tj/commander.js#1088" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/1088/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/1088">#1088</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
<li>display help for missing subcommand, by default ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="516507885" data-permission-text="Title is private" data-url="tj/commander.js#1088" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/1088/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/1088">#1088</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
<li>combined short options as single argument may include boolean flags and value flag and value (e.g. <code>-a -b -p 80</code> can be written as <code>-abp80</code>) ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="547256656" data-permission-text="Title is private" data-url="tj/commander.js#1145" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1145/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1145">#1145</a>])</li>
<li><code>.parseOption()</code> includes short flag and long flag expansions ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="547256656" data-permission-text="Title is private" data-url="tj/commander.js#1145" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1145/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1145">#1145</a>])</li>
<li><code>.helpInformation()</code> returns help text as a string, previously a private routine ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="560700420" data-permission-text="Title is private" data-url="tj/commander.js#1169" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1169/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1169">#1169</a>])</li>
<li><code>.parse()</code> implicitly uses <code>process.argv</code> if arguments not specified ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="560848429" data-permission-text="Title is private" data-url="tj/commander.js#1172" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1172/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1172">#1172</a>])</li>
<li>optionally specify where <code>.parse()</code> arguments "from", if not following node conventions ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="143058334" data-permission-text="Title is private" data-url="tj/commander.js#512" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/512/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/512">#512</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="560848429" data-permission-text="Title is private" data-url="tj/commander.js#1172" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1172/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1172">#1172</a>])</li>
<li>suggest help option along with unknown command error ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="561944637" data-permission-text="Title is private" data-url="tj/commander.js#1179" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1179/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1179">#1179</a>])</li>
<li>TypeScript definition for <code>commands</code> property of <code>Command</code> ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="562675877" data-permission-text="Title is private" data-url="tj/commander.js#1184" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1184/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1184">#1184</a>])</li>
<li>export <code>program</code> property ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="565709359" data-permission-text="Title is private" data-url="tj/commander.js#1195" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1195/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1195">#1195</a>])</li>
<li><code>createCommand</code> factory method to simplify subclassing ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="565215409" data-permission-text="Title is private" data-url="tj/commander.js#1191" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1191/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1191">#1191</a>])</li>
</ul>
<h3>Fixed</h3>
<ul>
<li>preserve argument order in subcommands ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="140326981" data-permission-text="Title is private" data-url="tj/commander.js#508" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/508/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/508">#508</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="444530964" data-permission-text="Title is private" data-url="tj/commander.js#962" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/962/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/962">#962</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="545350198" data-permission-text="Title is private" data-url="tj/commander.js#1138" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1138/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1138">#1138</a>])</li>
<li>do not emit <code>command:*</code> for executable subcommands ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="328564529" data-permission-text="Title is private" data-url="tj/commander.js#809" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/809/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/809">#809</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
<li>action handler called whether or not there are non-option arguments ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="499848795" data-permission-text="Title is private" data-url="tj/commander.js#1062" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1062/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1062">#1062</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
<li>combining option short flag and value in single argument now works for subcommands ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="547256656" data-permission-text="Title is private" data-url="tj/commander.js#1145" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1145/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1145">#1145</a>])</li>
<li>only add implicit help command when it will not conflict with other uses of argument ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="551899040" data-permission-text="Title is private" data-url="tj/commander.js#1153" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/1153/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/1153">#1153</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
<li>implicit help command works with command aliases ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="429033898" data-permission-text="Title is private" data-url="tj/commander.js#948" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/948/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/948">#948</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
<li>options are validated whether or not there is an action handler ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
</ul>
<h3>Changed</h3>
<ul>
<li><em>Breaking</em> <code>.args</code> contains command arguments with just recognised options removed ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="486336653" data-permission-text="Title is private" data-url="tj/commander.js#1032" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/1032/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/1032">#1032</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="545350198" data-permission-text="Title is private" data-url="tj/commander.js#1138" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1138/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1138">#1138</a>])</li>
<li><em>Breaking</em> display error if required argument for command is missing ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="467912082" data-permission-text="Title is private" data-url="tj/commander.js#995" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/995/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/995">#995</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
<li>tighten TypeScript definition of custom option processing function passed to <code>.option()</code> ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="537071462" data-permission-text="Title is private" data-url="tj/commander.js#1119" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1119/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1119">#1119</a>])</li>
<li><em>Breaking</em> <code>.allowUnknownOption()</code> ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="322394861" data-permission-text="Title is private" data-url="tj/commander.js#802" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/802/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/802">#802</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="545350198" data-permission-text="Title is private" data-url="tj/commander.js#1138" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1138/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1138">#1138</a>])
<ul>
<li>unknown options included in arguments passed to command action handler</li>
<li>unknown options included in <code>.args</code></li>
</ul>
</li>
<li>only recognised option short flags and long flags are expanded (e.g. <code>-ab</code> or <code>--foo=bar</code>) ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="547256656" data-permission-text="Title is private" data-url="tj/commander.js#1145" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1145/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1145">#1145</a>])</li>
<li><em>Breaking</em> <code>.parseOptions()</code> ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="545350198" data-permission-text="Title is private" data-url="tj/commander.js#1138" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1138/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1138">#1138</a>])
<ul>
<li><code>args</code> in returned result renamed <code>operands</code> and does not include anything after first unknown option</li>
<li><code>unknown</code> in returned result has arguments after first unknown option including operands, not just options and values</li>
</ul>
</li>
<li><em>Breaking</em> <code>.on('command:*', callback)</code> and other command events passed (changed) results from <code>.parseOptions</code>, i.e. operands and unknown  ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="545350198" data-permission-text="Title is private" data-url="tj/commander.js#1138" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1138/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1138">#1138</a>])</li>
<li>refactor Option from prototype to class ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="544020268" data-permission-text="Title is private" data-url="tj/commander.js#1133" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1133/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1133">#1133</a>])</li>
<li>refactor Command from prototype to class ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="558019087" data-permission-text="Title is private" data-url="tj/commander.js#1159" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1159/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1159">#1159</a>])</li>
<li>changes to error handling ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="558600050" data-permission-text="Title is private" data-url="tj/commander.js#1165" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1165/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1165">#1165</a>])
<ul>
<li>throw for author error, not just display message</li>
<li>preflight for variadic error</li>
<li>add tips to missing subcommand executable</li>
</ul>
</li>
<li>TypeScript fluent return types changed to be more subclass friendly, return <code>this</code> rather than <code>Command</code> ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="561948792" data-permission-text="Title is private" data-url="tj/commander.js#1180" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1180/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1180">#1180</a>])</li>
<li><code>.parseAsync</code> returns <code>Promise&lt;this&gt;</code> to be consistent with <code>.parse()</code> ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="561948792" data-permission-text="Title is private" data-url="tj/commander.js#1180" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1180/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1180">#1180</a>])</li>
<li>update dependencies</li>
</ul>
<h3>Removed</h3>
<ul>
<li>removed EventEmitter from TypeScript definition for Command, eliminating implicit peer dependency on <code>@types/node</code> ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548333754" data-permission-text="Title is private" data-url="tj/commander.js#1146" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1146/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1146">#1146</a>])</li>
<li>removed private function <code>normalize</code> (the functionality has been integrated into <code>parseOptions</code>) ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="547256656" data-permission-text="Title is private" data-url="tj/commander.js#1145" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1145/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1145">#1145</a>])</li>
<li><code>parseExpectedArgs</code> is now private ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
</ul>
<h3>Migration Tips</h3>
<p>If you use <code>.on('command:*')</code> or more complicated tests to detect an unrecognised subcommand, you may be able to delete the code and rely on the default behaviour.</p>
<p>If you use <code>program.args</code> or more complicated tests to detect a missing subcommand, you may be able to delete the code and rely on the default behaviour.</p>
<p>If you use <code>.command('*')</code> to add a default command, you may be be able to switch to <code>isDefault:true</code> with a named command.</p>
</details>

<details>
<summary>Commits</summary>
<p>The new version differs by 53 commits.</p>
<ul>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/2aad525640d5885d9f51ae8dfe07a01c280cf4e3"><code>2aad525</code></a> <code>Update dependencies (#1214)</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/f86d8781655720eb1429d1b9c883e8c357f7c8c3"><code>f86d878</code></a> <code>Add cli keyword (#1213)</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/83af0fd0488dc6f4568435050e7d3d7e0ab11b5b"><code>83af0fd</code></a> <code>Prepare for 5.0.0 (#1211)</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/f14df0709173abf9ab4732064d77bce34f60fb05"><code>f14df07</code></a> <code>Add eslint settings for TypeScript (#1205)</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/95e0d193ec02859f1bdcb08785e21f86942fc5e5"><code>95e0d19</code></a> <code>5.0.0-4</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/bd5a49e9d5ca4f4cf1c8bf60e3567ab5d5e67039"><code>bd5a49e</code></a> <code>Add factory to CHANGELOG</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/8c3dd6ffe90b566c5cabb277f8d9c57a8bfb348b"><code>8c3dd6f</code></a> <code>createCommand factory routine (#1191)</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/3c9f33fd8440aab061cbb0484712ed77c54df03a"><code>3c9f33f</code></a> <code>Say we support LTS, so do not need to update when node changes (#1204)</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/3cf8cff2a91d1d38da2ea9e5ace40230f1d9a813"><code>3cf8cff</code></a> <code>Expand typescript checks (#1198)</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/a3f453f11cf3ad69d2b15ce82efdfd3af53efe22"><code>a3f453f</code></a> <code>5.0.0-3</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/87bfca690eda98a0573b20569f87675466c23dd8"><code>87bfca6</code></a> <code>Add CHANGELOG entries for 5.0.0-3</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/1757564a0f6034f803e1e638c6cf34ef64b77775"><code>1757564</code></a> <code>Use a tidier global command (#1200)</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/0a50bd6c7696b6c5217258d38613f58684d1585b"><code>0a50bd6</code></a> <code>Add program to exports (#1195)</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/77e511fc17cf5857520b0740737d0fc27acf736c"><code>77e511f</code></a> <code>Enable TypeScript checking of javascript, and resolve or suppress errors (#1194)</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/2491c763e1ba058a5a877d7aa4b30427de83e844"><code>2491c76</code></a> <code>URLEncode several chinese toc link</code></li>
</ul>
<p>There are 53 commits in total.</p>
<p>See the <a href="https://urls.greenkeeper.io/tj/commander.js/compare/d5186ba4b9b64a72cd685fccbb9ec5d0ec0c430d...2aad525640d5885d9f51ae8dfe07a01c280cf4e3">full diff</a></p>
</details>

---

<details>
  <summary>FAQ and help</summary>

  There is a collection of [frequently asked questions](https://greenkeeper.io/faq.html). If those don’t help, you can always [ask the humans behind Greenkeeper](https://github.com/greenkeeperio/greenkeeper/issues/new).
</details>

---


Your [Greenkeeper](https://greenkeeper.io) bot 🌴

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
jaebradley pushed a commit to jaebradley/urban-dictionary-cli that referenced this issue Mar 16, 2020
***
☝️ **Important announcement:** Greenkeeper will be saying goodbye 👋 and passing the torch to Snyk on June 3rd, 2020! [Find out how to migrate to Snyk and more at greenkeeper.io](https://greenkeeper.io)
***
## The dependency [commander](https://github.com/tj/commander.js) was updated from `4.1.1` to `5.0.0`.
This version is **not covered** by your **current version range**.

If you don’t accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update.

---

**Publisher:** [abetomo](https://www.npmjs.com/~abetomo)
**License:** MIT

<details>
<summary>Release Notes for v5.0.0</summary>

<h3>Added</h3>
<ul>
<li>support for nested commands with action-handlers ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1404480" data-permission-text="Title is private" data-url="tj/commander.js#1" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/1/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/1">#1</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="294713045" data-permission-text="Title is private" data-url="tj/commander.js#764" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/764/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/764">#764</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
<li><code>.addCommand()</code> for adding a separately configured command ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="294713045" data-permission-text="Title is private" data-url="tj/commander.js#764" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/764/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/764">#764</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
<li>allow a non-executable to be set as the default command ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="286464874" data-permission-text="Title is private" data-url="tj/commander.js#742" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/742/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/742">#742</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
<li>implicit help command when there are subcommands (previously only if executables) ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
<li>customise implicit help command with <code>.addHelpCommand()</code> ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
<li>display error message for unknown subcommand, by default ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="105242369" data-permission-text="Title is private" data-url="tj/commander.js#432" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/432/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/432">#432</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="516507885" data-permission-text="Title is private" data-url="tj/commander.js#1088" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/1088/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/1088">#1088</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
<li>display help for missing subcommand, by default ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="516507885" data-permission-text="Title is private" data-url="tj/commander.js#1088" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/1088/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/1088">#1088</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
<li>combined short options as single argument may include boolean flags and value flag and value (e.g. <code>-a -b -p 80</code> can be written as <code>-abp80</code>) ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="547256656" data-permission-text="Title is private" data-url="tj/commander.js#1145" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1145/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1145">#1145</a>])</li>
<li><code>.parseOption()</code> includes short flag and long flag expansions ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="547256656" data-permission-text="Title is private" data-url="tj/commander.js#1145" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1145/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1145">#1145</a>])</li>
<li><code>.helpInformation()</code> returns help text as a string, previously a private routine ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="560700420" data-permission-text="Title is private" data-url="tj/commander.js#1169" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1169/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1169">#1169</a>])</li>
<li><code>.parse()</code> implicitly uses <code>process.argv</code> if arguments not specified ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="560848429" data-permission-text="Title is private" data-url="tj/commander.js#1172" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1172/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1172">#1172</a>])</li>
<li>optionally specify where <code>.parse()</code> arguments "from", if not following node conventions ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="143058334" data-permission-text="Title is private" data-url="tj/commander.js#512" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/512/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/512">#512</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="560848429" data-permission-text="Title is private" data-url="tj/commander.js#1172" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1172/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1172">#1172</a>])</li>
<li>suggest help option along with unknown command error ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="561944637" data-permission-text="Title is private" data-url="tj/commander.js#1179" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1179/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1179">#1179</a>])</li>
<li>TypeScript definition for <code>commands</code> property of <code>Command</code> ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="562675877" data-permission-text="Title is private" data-url="tj/commander.js#1184" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1184/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1184">#1184</a>])</li>
<li>export <code>program</code> property ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="565709359" data-permission-text="Title is private" data-url="tj/commander.js#1195" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1195/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1195">#1195</a>])</li>
<li><code>createCommand</code> factory method to simplify subclassing ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="565215409" data-permission-text="Title is private" data-url="tj/commander.js#1191" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1191/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1191">#1191</a>])</li>
</ul>
<h3>Fixed</h3>
<ul>
<li>preserve argument order in subcommands ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="140326981" data-permission-text="Title is private" data-url="tj/commander.js#508" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/508/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/508">#508</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="444530964" data-permission-text="Title is private" data-url="tj/commander.js#962" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/962/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/962">#962</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="545350198" data-permission-text="Title is private" data-url="tj/commander.js#1138" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1138/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1138">#1138</a>])</li>
<li>do not emit <code>command:*</code> for executable subcommands ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="328564529" data-permission-text="Title is private" data-url="tj/commander.js#809" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/809/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/809">#809</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
<li>action handler called whether or not there are non-option arguments ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="499848795" data-permission-text="Title is private" data-url="tj/commander.js#1062" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1062/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1062">#1062</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
<li>combining option short flag and value in single argument now works for subcommands ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="547256656" data-permission-text="Title is private" data-url="tj/commander.js#1145" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1145/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1145">#1145</a>])</li>
<li>only add implicit help command when it will not conflict with other uses of argument ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="551899040" data-permission-text="Title is private" data-url="tj/commander.js#1153" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/1153/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/1153">#1153</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
<li>implicit help command works with command aliases ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="429033898" data-permission-text="Title is private" data-url="tj/commander.js#948" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/948/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/948">#948</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
<li>options are validated whether or not there is an action handler ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
</ul>
<h3>Changed</h3>
<ul>
<li><em>Breaking</em> <code>.args</code> contains command arguments with just recognised options removed ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="486336653" data-permission-text="Title is private" data-url="tj/commander.js#1032" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/1032/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/1032">#1032</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="545350198" data-permission-text="Title is private" data-url="tj/commander.js#1138" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1138/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1138">#1138</a>])</li>
<li><em>Breaking</em> display error if required argument for command is missing ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="467912082" data-permission-text="Title is private" data-url="tj/commander.js#995" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/995/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/995">#995</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
<li>tighten TypeScript definition of custom option processing function passed to <code>.option()</code> ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="537071462" data-permission-text="Title is private" data-url="tj/commander.js#1119" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1119/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1119">#1119</a>])</li>
<li><em>Breaking</em> <code>.allowUnknownOption()</code> ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="322394861" data-permission-text="Title is private" data-url="tj/commander.js#802" data-hovercard-type="issue" data-hovercard-url="/tj/commander.js/issues/802/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/issues/802">#802</a>] [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="545350198" data-permission-text="Title is private" data-url="tj/commander.js#1138" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1138/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1138">#1138</a>])
<ul>
<li>unknown options included in arguments passed to command action handler</li>
<li>unknown options included in <code>.args</code></li>
</ul>
</li>
<li>only recognised option short flags and long flags are expanded (e.g. <code>-ab</code> or <code>--foo=bar</code>) ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="547256656" data-permission-text="Title is private" data-url="tj/commander.js#1145" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1145/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1145">#1145</a>])</li>
<li><em>Breaking</em> <code>.parseOptions()</code> ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="545350198" data-permission-text="Title is private" data-url="tj/commander.js#1138" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1138/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1138">#1138</a>])
<ul>
<li><code>args</code> in returned result renamed <code>operands</code> and does not include anything after first unknown option</li>
<li><code>unknown</code> in returned result has arguments after first unknown option including operands, not just options and values</li>
</ul>
</li>
<li><em>Breaking</em> <code>.on('command:*', callback)</code> and other command events passed (changed) results from <code>.parseOptions</code>, i.e. operands and unknown  ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="545350198" data-permission-text="Title is private" data-url="tj/commander.js#1138" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1138/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1138">#1138</a>])</li>
<li>refactor Option from prototype to class ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="544020268" data-permission-text="Title is private" data-url="tj/commander.js#1133" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1133/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1133">#1133</a>])</li>
<li>refactor Command from prototype to class ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="558019087" data-permission-text="Title is private" data-url="tj/commander.js#1159" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1159/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1159">#1159</a>])</li>
<li>changes to error handling ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="558600050" data-permission-text="Title is private" data-url="tj/commander.js#1165" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1165/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1165">#1165</a>])
<ul>
<li>throw for author error, not just display message</li>
<li>preflight for variadic error</li>
<li>add tips to missing subcommand executable</li>
</ul>
</li>
<li>TypeScript fluent return types changed to be more subclass friendly, return <code>this</code> rather than <code>Command</code> ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="561948792" data-permission-text="Title is private" data-url="tj/commander.js#1180" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1180/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1180">#1180</a>])</li>
<li><code>.parseAsync</code> returns <code>Promise&lt;this&gt;</code> to be consistent with <code>.parse()</code> ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="561948792" data-permission-text="Title is private" data-url="tj/commander.js#1180" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1180/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1180">#1180</a>])</li>
<li>update dependencies</li>
</ul>
<h3>Removed</h3>
<ul>
<li>removed EventEmitter from TypeScript definition for Command, eliminating implicit peer dependency on <code>@types/node</code> ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548333754" data-permission-text="Title is private" data-url="tj/commander.js#1146" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1146/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1146">#1146</a>])</li>
<li>removed private function <code>normalize</code> (the functionality has been integrated into <code>parseOptions</code>) ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="547256656" data-permission-text="Title is private" data-url="tj/commander.js#1145" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1145/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1145">#1145</a>])</li>
<li><code>parseExpectedArgs</code> is now private ([<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="548552171" data-permission-text="Title is private" data-url="tj/commander.js#1149" data-hovercard-type="pull_request" data-hovercard-url="/tj/commander.js/pull/1149/hovercard" href="https://urls.greenkeeper.io/tj/commander.js/pull/1149">#1149</a>])</li>
</ul>
<h3>Migration Tips</h3>
<p>If you use <code>.on('command:*')</code> or more complicated tests to detect an unrecognised subcommand, you may be able to delete the code and rely on the default behaviour.</p>
<p>If you use <code>program.args</code> or more complicated tests to detect a missing subcommand, you may be able to delete the code and rely on the default behaviour.</p>
<p>If you use <code>.command('*')</code> to add a default command, you may be be able to switch to <code>isDefault:true</code> with a named command.</p>
</details>

<details>
<summary>Commits</summary>
<p>The new version differs by 53 commits.</p>
<ul>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/2aad525640d5885d9f51ae8dfe07a01c280cf4e3"><code>2aad525</code></a> <code>Update dependencies (#1214)</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/f86d8781655720eb1429d1b9c883e8c357f7c8c3"><code>f86d878</code></a> <code>Add cli keyword (#1213)</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/83af0fd0488dc6f4568435050e7d3d7e0ab11b5b"><code>83af0fd</code></a> <code>Prepare for 5.0.0 (#1211)</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/f14df0709173abf9ab4732064d77bce34f60fb05"><code>f14df07</code></a> <code>Add eslint settings for TypeScript (#1205)</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/95e0d193ec02859f1bdcb08785e21f86942fc5e5"><code>95e0d19</code></a> <code>5.0.0-4</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/bd5a49e9d5ca4f4cf1c8bf60e3567ab5d5e67039"><code>bd5a49e</code></a> <code>Add factory to CHANGELOG</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/8c3dd6ffe90b566c5cabb277f8d9c57a8bfb348b"><code>8c3dd6f</code></a> <code>createCommand factory routine (#1191)</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/3c9f33fd8440aab061cbb0484712ed77c54df03a"><code>3c9f33f</code></a> <code>Say we support LTS, so do not need to update when node changes (#1204)</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/3cf8cff2a91d1d38da2ea9e5ace40230f1d9a813"><code>3cf8cff</code></a> <code>Expand typescript checks (#1198)</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/a3f453f11cf3ad69d2b15ce82efdfd3af53efe22"><code>a3f453f</code></a> <code>5.0.0-3</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/87bfca690eda98a0573b20569f87675466c23dd8"><code>87bfca6</code></a> <code>Add CHANGELOG entries for 5.0.0-3</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/1757564a0f6034f803e1e638c6cf34ef64b77775"><code>1757564</code></a> <code>Use a tidier global command (#1200)</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/0a50bd6c7696b6c5217258d38613f58684d1585b"><code>0a50bd6</code></a> <code>Add program to exports (#1195)</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/77e511fc17cf5857520b0740737d0fc27acf736c"><code>77e511f</code></a> <code>Enable TypeScript checking of javascript, and resolve or suppress errors (#1194)</code></li>
<li><a href="https://urls.greenkeeper.io/tj/commander.js/commit/2491c763e1ba058a5a877d7aa4b30427de83e844"><code>2491c76</code></a> <code>URLEncode several chinese toc link</code></li>
</ul>
<p>There are 53 commits in total.</p>
<p>See the <a href="https://urls.greenkeeper.io/tj/commander.js/compare/d5186ba4b9b64a72cd685fccbb9ec5d0ec0c430d...2aad525640d5885d9f51ae8dfe07a01c280cf4e3">full diff</a></p>
</details>

---

<details>
  <summary>FAQ and help</summary>

  There is a collection of [frequently asked questions](https://greenkeeper.io/faq.html). If those don’t help, you can always [ask the humans behind Greenkeeper](https://github.com/greenkeeperio/greenkeeper/issues/new).
</details>

---


Your [Greenkeeper](https://greenkeeper.io) bot 🌴

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
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

No branches or pull requests

9 participants