chore(deps): bump commander from 12.1.0 to 13.1.0
Bumps commander from 12.1.0 to 13.1.0.
Release notes
Sourced from commander's releases.
v13.1.0
Added
- support a pair of long option flags to allow a memorable shortened flag, like
.option('--ws, --workspace')(#2312)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.
... (truncated)
Changelog
Sourced from commander's changelog.
[13.1.0] (2025-01-21)
Added
- support a pair of long option flags to allow a memorable shortened flag, like
.option('--ws, --workspace')(#2312)[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)
- note: support for dual long option flags added in Commander 13.1
- 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.
... (truncated)
Commits
e6f56c813.1.0ad3ecf0Add 13.1 to CHANGELOG (#2315)2619c99Fix example code in Readme_zh-CN.md (#2313)8263b7fAdd support for dual long options when no short option (#2312)bb733f4Reorder funding with active maintainers first (#2310)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)- Additional commits viewable in compare view
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually 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)