Skip to content

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Feb 3, 2025

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
commander 12.1.0 -> 13.1.0 age adoption passing confidence

Release Notes

tj/commander.js (commander)

v13.1.0

Compare Source

Added
  • support a pair of long option flags to allow a memorable shortened flag, like .option('--ws, --workspace') ([#​2312])

v13.0.0

Compare Source

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() for getOutHasColors(), getErrHasColors(), and stripColor() ([#​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() if storeOptionsAsProperties: true ([#​2299])
  • TypeScript: include implicit this in parameters for action handler callback ([#​2197])
Deleted
  • Breaking: Help.wrap() refactored into formatItem() and boxWrap() ([#​2251])
Migration Tips

Excess command-arguments

It is now an error for the user to specify more command-arguments than are expected. (allowExcessArguments is 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) => {
  console.log(args);
});

Or you could suppress the error, useful for minimising changes in legacy code.

program.option('-p, --port', 'port number');
program.allowExcessArguments();
program.action((options) => {
  console.log(program.args);
});

Configuration

📅 Schedule: Branch creation - "on Monday every 9 weeks of the year starting on the 6th week" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@coveralls
Copy link

coveralls commented Feb 5, 2025

Coverage Status

coverage: 95.511%. remained the same
when pulling a7f57e7 on renovate/commander-13.x
into 5ae8aba on main.

@renovate renovate bot force-pushed the renovate/commander-13.x branch from 1d74439 to e2d126b Compare February 6, 2025 19:40
@renovate renovate bot force-pushed the renovate/commander-13.x branch from e2d126b to cb8a1f3 Compare March 20, 2025 18:17
@renovate renovate bot force-pushed the renovate/commander-13.x branch from cb8a1f3 to c9d7003 Compare March 21, 2025 18:01
@renovate renovate bot force-pushed the renovate/commander-13.x branch from c9d7003 to f74cc75 Compare April 9, 2025 21:00
@renovate renovate bot force-pushed the renovate/commander-13.x branch from f74cc75 to fa912eb Compare April 10, 2025 16:14
@renovate renovate bot force-pushed the renovate/commander-13.x branch from fa912eb to 0336fd1 Compare April 28, 2025 17:34
@renovate renovate bot force-pushed the renovate/commander-13.x branch from 0336fd1 to 7217383 Compare May 1, 2025 20:38
@renovate renovate bot force-pushed the renovate/commander-13.x branch from 7217383 to 2284622 Compare May 12, 2025 14:37
@renovate renovate bot force-pushed the renovate/commander-13.x branch from 2284622 to a749846 Compare May 14, 2025 00:27
@renovate renovate bot force-pushed the renovate/commander-13.x branch from a749846 to a7f57e7 Compare May 15, 2025 14:56
@renovate renovate bot force-pushed the renovate/commander-13.x branch from a7f57e7 to 65c18cf Compare May 15, 2025 17:37
@renovate renovate bot changed the title chore(deps): update dependency commander to v13 chore(deps): update dependency commander to v13 - autoclosed May 18, 2025
@renovate renovate bot closed this May 18, 2025
@renovate renovate bot deleted the renovate/commander-13.x branch May 18, 2025 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants