Packages

commander

15.1.0 · 7 Nov 2026MIT785.6M / weekRepositoryHomepagenpmAtom feed

Your version

11.1.0

13 Oct 2023Where it was published

In short

1 deprecated6 new2 fixed1 changed

  • Deprecated

    Command._args was private anyway, but now available as registeredArguments

Release note

Fixed

  • TypeScript: Update OptionValueSource to allow any string, to match supported use of custom sources

  • TypeScript: Add that Command.version() can also be used as getter

  • TypeScript: Add null return type to Commands.executableDir(), for when not configured

  • Subcommands with an executable handler and only a short help flag are now handled correctly by the parent's help command

Added

  • registeredArguments property on Command with the array of defined Argument (like Command.options for Option)

  • TypeScript declarations for Option properties: envVar, presetArg

  • TypeScript declarations for Argument properties: argChoices, defaultValue, defaultValueDescription

  • Example file which shows how to configure help to display any custom usage in the list of subcommands

Changed

  • (developer) refactor TypeScript configs for multiple use-cases, and enable checks in JavaScript files in supporting editors

Deprecated

  • Deprecated

    Command._args was private anyway, but now available as registeredArguments

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.