Snyk has created this PR to upgrade commander from 6.2.1 to 8.3.0.
:information_source: Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.
Warning: This is a major version upgrade, and may be a breaking change.
The recommended version is 13 versions ahead of your current version.
The recommended version was released 3 months ago, on 2021-10-22.
Snyk has created this PR to upgrade commander from 6.2.1 to 8.3.0.
:information_source: Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.
Warning: This is a major version upgrade, and may be a breaking change.
Release notes
Package name: commander
Added
.getOptionValueSource()
and.setOptionValueWithSource()
, where expected values for source are one of 'default', 'env', 'config', 'cli' (#1613)Deprecated
.command('*')
, use default command instead (#1612)on('command:*')
, use.showSuggestionAfterError()
instead (#1612)Added
.showSuggestionAfterError()
to show suggestions after unknown command or unknown option (#1590)Option
support for values from environment variables using.env()
(#1587)Changed
Removed
Option
methodargumentRejected
Added
.copyInheritedSettings()
(#1557)Argument
methods for.argRequired()
and.argOptional()
(#1567)Added
.argument(name, description)
for adding command-arguments (#1490).createArgument()
factory method (#1497).addArgument()
(#1490)Argument
supports.choices()
(#1525).showHelpAfterError()
to display full help or a custom message after an error (#1534).hook()
with support for'preAction'
and'postAction'
callbacks (#1514).opts()
return type using TypeScript generics (#1539).getOptionValue()
and.setOptionValue()
(#1521)Changed
.parseAsync()
is now declared asasync
(#1513)Help
method.visibleArguments()
returns array ofArgument
(#1490)CommanderError
codecommander.invalidOptionArgument
renamedcommander.invalidArgument
(#1508).addTextHelp()
callback no longer allows result ofundefined
, now juststring
(#1516)index.tab
into a file per class (#1522).showHelpAfteError()
) (#1534)Command
property.arg
initialised to empty array (was previously undefined) (#1529)Deprecated
cmd.description(desc, argDescriptions)
for adding argument descriptions (#1490).argument(name, description)
instead)InvalidOptionArgumentError
(replaced byInvalidArgumentError
) (#1508)Removed
Command
object (#1520)program
export)Migration Tips
If you have a simple program without an action handler, you will now get an error if
there are missing command-arguments.
$ node trivial.js error: missing required argument 'file'
If you want to show the help in this situation, you could check the arguments before parsing:
Or, you might choose to show the help after any user error:
Added
.showHelpAfterError()
to display full help or a custom message after an error (#1534)Changed
.showHelpAfteError()
) (#1534)Command
property.arg
initialised to empty array (was previously undefined) (#1529)Added
.addArgument()
(#1490)Argument
supports.choices()
(#1525).opts()
return type using TypeScript generics (#1539)Changed
index.tab
into a file per class (#1522)Added
parent
property onCommand
(#1475).attributeName()
onOption
(#1483)Changed
Commit messages
Package name: commander
Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.
For more information:
🧐 View latest project report
🛠 Adjust upgrade PR settings
🔕 Ignore this dependency or unsubscribe from future upgrade PRs