Bump commander from 12.1.0 to 13.0.0 #33

Merged
dependabot[bot] merged 1 commits from dependabot/npm_and_yarn/commander-13.0.0 into main 2024-12-30 21:48:23 +00:00
dependabot[bot] commented 2024-12-30 19:47:05 +00:00 (Migrated from github.com)

Bumps commander from 12.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() 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) => {
</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() 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
</tr></table> 

... (truncated)

Commits

Dependabot compatibility score

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 rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will 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 version will 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 dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps [commander](https://github.com/tj/commander.js) from 12.1.0 to 13.0.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/tj/commander.js/releases">commander's releases</a>.</em></p> <blockquote> <h2>v13.0.0</h2> <h3>Added</h3> <ul> <li>support multiple calls to <code>.parse()</code> with default settings (<a href="https://redirect.github.com/tj/commander.js/issues/2299">#2299</a>)</li> <li>add <code>.saveStateBeforeParse()</code> and <code>.restoreStateBeforeParse()</code> for use by subclasses (<a href="https://redirect.github.com/tj/commander.js/issues/2299">#2299</a>)</li> <li>style routines like <code>styleTitle()</code> to add color to help using <code>.configureHelp()</code> or Help subclass (<a href="https://redirect.github.com/tj/commander.js/issues/2251">#2251</a>)</li> <li>color related support in <code>.configureOutput()</code> for <code>getOutHasColors()</code>, <code>getErrHasColors()</code>, and <code>stripColor()</code> (<a href="https://redirect.github.com/tj/commander.js/issues/2251">#2251</a>)</li> <li>Help property for <code>minWidthToWrap</code> (<a href="https://redirect.github.com/tj/commander.js/issues/2251">#2251</a>)</li> <li>Help methods for <code>displayWidth()</code>, <code>boxWrap()</code>, <code>preformatted()</code> et al (<a href="https://redirect.github.com/tj/commander.js/issues/2251">#2251</a>)</li> </ul> <h3>Changed</h3> <ul> <li><em>Breaking</em>: excess command-arguments cause an error by default, see migration tips (<a href="https://redirect.github.com/tj/commander.js/issues/2223">#2223</a>)</li> <li><em>Breaking</em>: throw during Option construction for unsupported option flags, like multiple characters after single <code>-</code> (<a href="https://redirect.github.com/tj/commander.js/issues/2270">#2270</a>)</li> <li><em>Breaking</em>: throw on multiple calls to <code>.parse()</code> if <code>storeOptionsAsProperties: true</code> (<a href="https://redirect.github.com/tj/commander.js/issues/2299">#2299</a>)</li> <li>TypeScript: include implicit <code>this</code> in parameters for action handler callback (<a href="https://redirect.github.com/tj/commander.js/issues/2197">#2197</a>)</li> </ul> <h3>Deleted</h3> <ul> <li><em>Breaking</em>: <code>Help.wrap()</code> refactored into <code>formatItem()</code> and <code>boxWrap()</code> (<a href="https://redirect.github.com/tj/commander.js/issues/2251">#2251</a>)</li> </ul> <h3>Migration Tips</h3> <p><strong>Excess command-arguments</strong></p> <p>It is now an error for the user to specify more command-arguments than are expected. (<code>allowExcessArguments</code> is now false by default.)</p> <p>Old code:</p> <pre lang="js"><code>program.option('-p, --port &lt;number&gt;', 'port number'); program.action((options) =&gt; { console.log(program.args); }); </code></pre> <p>Now shows an error:</p> <pre lang="console"><code>$ node example.js a b c error: too many arguments. Expected 0 arguments but got 3. </code></pre> <p>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.</p> <pre lang="js"><code>program.option('-p, --port &lt;number&gt;', 'port number'); program.argument('[args...]', 'remote command and arguments'); // expecting zero or more arguments program.action((args, options) =&gt; { &lt;/tr&gt;&lt;/table&gt; </code></pre> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/tj/commander.js/blob/master/CHANGELOG.md">commander's changelog</a>.</em></p> <blockquote> <h2>[13.0.0] (2024-12-30)</h2> <h3>Added</h3> <ul> <li>support multiple calls to <code>.parse()</code> with default settings (<a href="https://redirect.github.com/tj/commander.js/issues/2299">#2299</a>)</li> <li>add <code>.saveStateBeforeParse()</code> and <code>.restoreStateBeforeParse()</code> for use by subclasses (<a href="https://redirect.github.com/tj/commander.js/issues/2299">#2299</a>)</li> <li>style routines like <code>styleTitle()</code> to add color to help using <code>.configureHelp()</code> or Help subclass (<a href="https://redirect.github.com/tj/commander.js/issues/2251">#2251</a>)</li> <li>color related support in <code>.configureOutput()</code> for <code>getOutHasColors()</code>, <code>getErrHasColors()</code>, and <code>stripColor()</code> (<a href="https://redirect.github.com/tj/commander.js/issues/2251">#2251</a>)</li> <li>Help property for <code>minWidthToWrap</code> (<a href="https://redirect.github.com/tj/commander.js/issues/2251">#2251</a>)</li> <li>Help methods for <code>displayWidth()</code>, <code>boxWrap()</code>, <code>preformatted()</code> et al (<a href="https://redirect.github.com/tj/commander.js/issues/2251">#2251</a>)</li> </ul> <h3>Changed</h3> <ul> <li><em>Breaking</em>: excess command-arguments cause an error by default, see migration tips (<a href="https://redirect.github.com/tj/commander.js/issues/2223">#2223</a>)</li> <li><em>Breaking</em>: throw during Option construction for unsupported option flags, like multiple characters after single <code>-</code> (<a href="https://redirect.github.com/tj/commander.js/issues/2270">#2270</a>)</li> <li><em>Breaking</em>: throw on multiple calls to <code>.parse()</code> if <code>storeOptionsAsProperties: true</code> (<a href="https://redirect.github.com/tj/commander.js/issues/2299">#2299</a>)</li> <li>TypeScript: include implicit <code>this</code> in parameters for action handler callback (<a href="https://redirect.github.com/tj/commander.js/issues/2197">#2197</a>)</li> </ul> <h3>Deleted</h3> <ul> <li><em>Breaking</em>: <code>Help.wrap()</code> refactored into <code>formatItem()</code> and <code>boxWrap()</code> (<a href="https://redirect.github.com/tj/commander.js/issues/2251">#2251</a>)</li> </ul> <h3>Migration Tips</h3> <p><strong>Excess command-arguments</strong></p> <p>It is now an error for the user to specify more command-arguments than are expected. (<code>allowExcessArguments</code> is now false by default.)</p> <p>Old code:</p> <pre lang="js"><code>program.option('-p, --port &lt;number&gt;', 'port number'); program.action((options) =&gt; { console.log(program.args); }); </code></pre> <p>Now shows an error:</p> <pre lang="console"><code>$ node example.js a b c error: too many arguments. Expected 0 arguments but got 3. </code></pre> <p>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.</p> <pre lang="js"><code>program.option('-p, --port &lt;number&gt;', 'port number'); program.argument('[args...]', 'remote command and arguments'); // expecting zero or more arguments &lt;/tr&gt;&lt;/table&gt; </code></pre> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/tj/commander.js/commit/d6bcb0b6e144d8854360a5c3c2759fadf0e4edb3"><code>d6bcb0b</code></a> 13.0.0</li> <li><a href="https://github.com/tj/commander.js/commit/fa9e5eddb8b91b242a0aba5e2e5272547772e436"><code>fa9e5ed</code></a> Update release date</li> <li><a href="https://github.com/tj/commander.js/commit/fb2c46a005e9f7796a32fcd0652d847ea39940dc"><code>fb2c46a</code></a> Update CHANGELOG for 13.0.0 (<a href="https://redirect.github.com/tj/commander.js/issues/2301">#2301</a>)</li> <li><a href="https://github.com/tj/commander.js/commit/49423a288b6561190461bf91231a18085e60dad4"><code>49423a2</code></a> Add save/restore state to allow multiple calls to parse (<a href="https://redirect.github.com/tj/commander.js/issues/2299">#2299</a>)</li> <li><a href="https://github.com/tj/commander.js/commit/497c11d83065567a3b2840bc0800d30e6ab4ed33"><code>497c11d</code></a> Update dependencies (<a href="https://redirect.github.com/tj/commander.js/issues/2295">#2295</a>)</li> <li><a href="https://github.com/tj/commander.js/commit/a8ef5cf3e1975380974ab5c4f92c26fb2c5e3209"><code>a8ef5cf</code></a> Add informative message for missing executable on Windows (<a href="https://redirect.github.com/tj/commander.js/issues/2291">#2291</a>)</li> <li><a href="https://github.com/tj/commander.js/commit/02c603ebedaec334ba9edc7c3c2e48484e2aeaf8"><code>02c603e</code></a> Add clues about what help configuration is available to help with searches an...</li> <li><a href="https://github.com/tj/commander.js/commit/37e86af4c14b22db04adfce4b05597567f207167"><code>37e86af</code></a> Add links to CHANGELOG</li> <li><a href="https://github.com/tj/commander.js/commit/53fc8a4b287e063af0bd3a026cad06bf1cf07bcf"><code>53fc8a4</code></a> Prepare for 13.0.0-0 (<a href="https://redirect.github.com/tj/commander.js/issues/2292">#2292</a>)</li> <li><a href="https://github.com/tj/commander.js/commit/d355b52d2013def008e7874c14f97d4fd96ed26f"><code>d355b52</code></a> More Help documentation (<a href="https://redirect.github.com/tj/commander.js/issues/2282">#2282</a>)</li> <li>Additional commits viewable in <a href="https://github.com/tj/commander.js/compare/v12.1.0...v13.0.0">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=commander&package-manager=npm_and_yarn&previous-version=12.1.0&new-version=13.0.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) 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-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will 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 version` will 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 dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details>
Sign in to join this conversation.
No description provided.