commander
Advanced tools
Comparing version 2.12.2 to 2.13.0
2.13.0 / 2018-01-09 | ||
================== | ||
* Do not print default for --no- | ||
* remove trailing spaces in command help | ||
* Update CI's Node.js to LTS and latest version | ||
* typedefs: Command and Option types added to commander namespace | ||
2.12.2 / 2017-11-28 | ||
@@ -3,0 +11,0 @@ ================== |
@@ -967,3 +967,3 @@ /** | ||
return pad(option.flags, width) + ' ' + option.description | ||
+ (option.defaultValue !== undefined ? ' (default: ' + option.defaultValue + ')' : ''); | ||
+ ((option.bool != false && option.defaultValue !== undefined) ? ' (default: ' + option.defaultValue + ')' : ''); | ||
}).concat([pad('-h, --help', width) + ' ' + 'output usage information']) | ||
@@ -994,3 +994,3 @@ .join('\n'); | ||
+ (cmd.options.length ? ' [options]' : '') | ||
+ ' ' + args | ||
+ (args ? ' ' + args : '') | ||
, cmd._description | ||
@@ -1010,3 +1010,3 @@ ]; | ||
var desc = cmd[1] ? ' ' + cmd[1] : ''; | ||
return pad(cmd[0], width) + desc; | ||
return (desc ? pad(cmd[0], width) : cmd[0]) + desc; | ||
}).join('\n').replace(/^/gm, ' ') | ||
@@ -1013,0 +1013,0 @@ , '' |
{ | ||
"name": "commander", | ||
"version": "2.12.2", | ||
"version": "2.13.0", | ||
"description": "the complete solution for node.js command-line programs", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -0,5 +1,9 @@ | ||
// Type definitions for commander 2.11 | ||
// Project: https://github.com/visionmedia/commander.js | ||
// Definitions by: Alan Agius <https://github.com/alan-agius4>, Marcelo Dezem <https://github.com/mdezem>, vvakame <https://github.com/vvakame> | ||
// Definitions by: Alan Agius <https://github.com/alan-agius4>, Marcelo Dezem <https://github.com/mdezem>, vvakame <https://github.com/vvakame>, Jules Randolph <https://github.com/sveinburne> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
declare class Option { | ||
declare namespace local { | ||
class Option { | ||
flags: string; | ||
@@ -20,5 +24,5 @@ required: boolean; | ||
constructor(flags: string, description?: string); | ||
} | ||
} | ||
declare class Command extends NodeJS.EventEmitter { | ||
class Command extends NodeJS.EventEmitter { | ||
[key: string]: any; | ||
@@ -125,2 +129,3 @@ | ||
parseExpectedArgs(args: string[]): Command; | ||
/** | ||
@@ -267,3 +272,3 @@ * Register callback `fn` for the command. | ||
* | ||
* @param {(str: string) => string} [cb] | ||
* @param {(str: string) => string} [cb] | ||
*/ | ||
@@ -274,2 +279,4 @@ outputHelp(cb?: (str: string) => string): void; | ||
help(): void; | ||
} | ||
} | ||
@@ -279,2 +286,6 @@ | ||
type Command = local.Command | ||
type Option = local.Option | ||
interface CommandOptions { | ||
@@ -291,4 +302,4 @@ noHelp?: boolean; | ||
interface CommanderStatic extends Command { | ||
Command: typeof Command; | ||
Option: typeof Option; | ||
Command: typeof local.Command; | ||
Option: typeof local.Option; | ||
CommandOptions: CommandOptions; | ||
@@ -301,2 +312,2 @@ ParseOptionsResult: ParseOptionsResult; | ||
declare const commander: commander.CommanderStatic; | ||
export = commander; | ||
export = commander; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
56125
1274