Commander.js 11.1.0

11.1.0
Added 4
  • Add registeredArguments property on Command with the array of defined Argument, like Command.options for Option
  • Add TypeScript declarations for Option properties: envVar, presetArg
  • Add TypeScript declarations for Argument properties: argChoices, defaultValue, defaultValueDescription
  • Add example file showing how to configure help to display any custom usage in the list of subcommands
Changed 1
  • Refactor TypeScript configs for multiple use-cases, and enable checks in JavaScript files in supporting editors
Fixed 4
  • Update TypeScript OptionValueSource to allow any string, to match supported use of custom sources
  • Add TypeScript type that Command.version() can also be used as getter
  • Add null return type to Commands.executableDir() TypeScript declaration, for when not configured
  • Fix subcommands with an executable handler and only a short help flag to be handled correctly by the parent's help command
Deprecated 1
  • Command._args is now available as registeredArguments

From Commander.js

Fixed
  • TypeScript: update OptionValueSource to allow any string, to match supported use of custom sources ([#1983])
  • TypeScript: add that Command.version() can also be used as getter ([#1982])
  • TypeScript: add null return type to Commands.executableDir(), for when not configured ([#1965])
  • subcommands with an executable handler and only a short help flag are now handled correctly by the parent's help command ([#1930])
Added
  • registeredArguments property on Command with the array of defined Argument (like Command.options for Option) ([#2010])
  • TypeScript declarations for Option properties: envVar, presetArg ([#2019])
  • TypeScript declarations for Argument properties: argChoices, defaultValue, defaultValueDescription ([#2019])
  • example file which shows how to configure help to display any custom usage in the list of subcommands ([#1896])
Changed
  • (developer) refactor TypeScript configs for multiple use-cases, and enable checks in JavaScript files in supporting editors ([#1969])
Deprecated
  • Command._args was private anyway, but now available as registeredArguments ([#2010])
View original

Upgraded? How did it go?

Discussion