Bump commander from 6.1.0 to 13.0.0
Bumps commander from 6.1.0 to 13.0.0.
Release notes
Sourced from commander's releases.
v13.0.0
Added
- support multiple calls to
.parse()with default settings (#2299)- add
.saveStateBeforeParse()and.restoreStateBeforeParse()for use by subclasses (#2299)- style routines like
styleTitle()to add color to help using.configureHelp()or Help subclass (#2251)- color related support in
.configureOutput()forgetOutHasColors(),getErrHasColors(), andstripColor()(#2251)- Help property for
minWidthToWrap(#2251)- Help methods for
displayWidth(),boxWrap(),preformatted()et al (#2251)Changed
- Breaking: excess command-arguments cause an error by default, see migration tips (#2223)
- Breaking: throw during Option construction for unsupported option flags, like multiple characters after single
-(#2270)- Breaking: throw on multiple calls to
.parse()ifstoreOptionsAsProperties: true(#2299)- TypeScript: include implicit
thisin parameters for action handler callback (#2197)Deleted
- Breaking:
Help.wrap()refactored intoformatItem()andboxWrap()(#2251)Migration Tips
Excess command-arguments
It is now an error for the user to specify more command-arguments than are expected. (
allowExcessArgumentsis now false by default.)Old code:
program.option('-p, --port <number>', 'port number'); program.action((options) => { console.log(program.args); });Now shows an error:
$ node example.js a b c error: too many arguments. Expected 0 arguments but got 3.You can declare the expected arguments. The help will then be more accurate too. Note that declaring new arguments will change what is passed to the action handler.
program.option('-p, --port <number>', 'port number'); program.argument('[args...]', 'remote command and arguments'); // expecting zero or more arguments program.action((args, options) => { </tr></table>
... (truncated)
Changelog
Sourced from commander's changelog.
[13.0.0] (2024-12-30)
Added
- support multiple calls to
.parse()with default settings (#2299)- add
.saveStateBeforeParse()and.restoreStateBeforeParse()for use by subclasses (#2299)- style routines like
styleTitle()to add color to help using.configureHelp()or Help subclass (#2251)- color related support in
.configureOutput()forgetOutHasColors(),getErrHasColors(), andstripColor()(#2251)- Help property for
minWidthToWrap(#2251)- Help methods for
displayWidth(),boxWrap(),preformatted()et al (#2251)Changed
- Breaking: excess command-arguments cause an error by default, see migration tips (#2223)
- Breaking: throw during Option construction for unsupported option flags, like multiple characters after single
-(#2270)- Breaking: throw on multiple calls to
.parse()ifstoreOptionsAsProperties: true(#2299)- TypeScript: include implicit
thisin parameters for action handler callback (#2197)Deleted
- Breaking:
Help.wrap()refactored intoformatItem()andboxWrap()(#2251)Migration Tips
Excess command-arguments
It is now an error for the user to specify more command-arguments than are expected. (
allowExcessArgumentsis now false by default.)Old code:
program.option('-p, --port <number>', 'port number'); program.action((options) => { console.log(program.args); });Now shows an error:
$ node example.js a b c error: too many arguments. Expected 0 arguments but got 3.You can declare the expected arguments. The help will then be more accurate too. Note that declaring new arguments will change what is passed to the action handler.
program.option('-p, --port <number>', 'port number'); program.argument('[args...]', 'remote command and arguments'); // expecting zero or more arguments </tr></table>
... (truncated)
Commits
d6bcb0b13.0.0fa9e5edUpdate release datefb2c46aUpdate CHANGELOG for 13.0.0 (#2301)49423a2Add save/restore state to allow multiple calls to parse (#2299)497c11dUpdate dependencies (#2295)a8ef5cfAdd informative message for missing executable on Windows (#2291)02c603eAdd clues about what help configuration is available to help with searches an...37e86afAdd links to CHANGELOG53fc8a4Prepare for 13.0.0-0 (#2292)d355b52More Help documentation (#2282)- Additional commits viewable in compare view
You can trigger a rebase of this PR by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Note Automatic rebases have been disabled on this pull request as it has been open for over 30 days.
A newer version of commander exists, but since this PR has been edited by someone other than Dependabot I haven't updated it. You'll get a PR for the updated version as normal once this PR is merged.
@dependabot rebase
Looks like this PR has been edited by someone other than Dependabot. That means Dependabot can't rebase it - sorry!
If you're happy for Dependabot to recreate it from scratch, overwriting any edits, you can request @dependabot recreate.
@dependabot recreate
@dependabot recreate
Looks like this PR has been edited by someone other than Dependabot. That means Dependabot can't rebase it - sorry!
If you're happy for Dependabot to recreate it from scratch, overwriting any edits, you can request @dependabot recreate.
@dependabot recreate