commander
15.1.0 · 7 Nov 2026MIT785.6M / weekRepositoryHomepagenpmAtom feed
4.1.1 is the newest release of 4.x.
In short
2 breaking1 removed5 new2 fixed1 changed1 internal
- Breaking
Breaking Commander is only officially supported on Node 8 and above, and requires Node 6
- Breaking
Breaking keep command object out of program.args when action handler called
- Removed
Removed deprecated
customFdsoption from call tochild_process.spawn
Release note
Added
Automatically wrap and indent help descriptions for options and commands
.exitOverride()allows override of calls toprocess.exitfor additional error handling and to keep program runningSupport for declaring required options with
.requiredOptions()GitHub Actions support
Translation links in README
Changed
Call default subcommand even when there are unknown options
- Breaking
Breaking Commander is only officially supported on Node 8 and above, and requires Node 6
Fixed
- Breaking
Breaking keep command object out of program.args when action handler called
also, action handler now passed array of unknown arguments
Complain about unknown options when program argument supplied and action handler
this changes parameters to
command:*event to include unknown arguments
- Removed
Removed deprecated
customFdsoption from call tochild_process.spawn Rework TypeScript declarations to bring all types into imported namespace
Migration Tips
Testing for no arguments
If you were previously using code like:
if (!program.args.length) ...
a partial replacement is:
if (program.rawArgs.length < 3) ...
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.