Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update dependency commander to v8 #587

Merged
merged 2 commits into from Nov 11, 2021
Merged

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jun 25, 2021

WhiteSource Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
commander ^7.0.0 -> ^8.0.0 age adoption passing confidence

Release Notes

tj/commander.js

v8.3.0

Compare Source

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])

v8.2.0

Compare Source

Added
  • .showSuggestionAfterError() to show suggestions after unknown command or unknown option ([#​1590])
  • add Option support for values from environment variables using .env() ([#​1587])
Changed
  • show error for unknown global option before subcommand (rather than just help) ([#​1590])
Removed
  • TypeScript declaration of unimplemented Option method argumentRejected

v8.1.0

Compare Source

Added
  • .copyInheritedSettings() ([#​1557])
  • update Chinese translations of documentation for Commander v8 ([#​1570])
  • Argument methods for .argRequired() and .argOptional() ([#​1567])

v8.0.0

Compare Source

Added
  • .argument(name, description) for adding command-arguments ([#​1490])
    • supports default value for optional command-arguments ([#​1508])
    • supports custom processing function ([#​1508])
  • .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])
  • client typing of .opts() return type using TypeScript generics ([#​1539])
  • the number of command-arguments is checked for programs without an action handler ([#​1502])
  • .getOptionValue() and .setOptionValue() ([#​1521])
Changed
  • refactor and simplify TypeScript declarations (with no default export) ([#​1520])
  • .parseAsync() is now declared as async ([#​1513])
  • Breaking: Help method .visibleArguments() returns array of Argument ([#​1490])
  • Breaking: Commander 8 requires Node.js 12 or higher ([#​1500])
  • Breaking: CommanderError code commander.invalidOptionArgument renamed commander.invalidArgument ([#​1508])
  • Breaking: TypeScript declaration for .addTextHelp() callback no longer allows result of undefined, now just string ([#​1516])
  • refactor index.tab into a file per class ([#​1522])
  • remove help suggestion from "unknown command" error message (see .showHelpAfteError()) ([#​1534])
  • Command property .arg initialised to empty array (was previously undefined) ([#​1529])
  • update dependencies
Deprecated
  • second parameter of cmd.description(desc, argDescriptions) for adding argument descriptions ([#​1490])
    • (use new .argument(name, description) instead)
  • InvalidOptionArgumentError (replaced by InvalidArgumentError) ([#​1508])
Removed
  • Breaking: TypeScript declaration for default export of global Command object ([#​1520])
    • (still available as named 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.

program
  .option('-d, --debug')
  .arguments('<file>');
program.parse();
$ 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:

if (process.argv.length === 2)
  program.help();
program.parse();

Or, you might choose to show the help after any user error:

program.showHelpAfterError();

Configuration

📅 Schedule: "every weekend" (UTC).

🚦 Automerge: Disabled due to failing status checks.

Rebasing: Renovate will not automatically rebase this PR, because other commits have been found.

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


  • If you want to rebase/retry this PR, click this checkbox.

This PR has been generated by WhiteSource Renovate. View repository job log here.

@renovate renovate bot added the maintenance label Jun 25, 2021
@renovate renovate bot force-pushed the renovate/commander-8.x branch from 3a90698 to 049bc23 Compare July 4, 2021 21:39
@renovate renovate bot force-pushed the renovate/commander-8.x branch 4 times, most recently from 860c117 to ca29b9a Compare October 2, 2021 04:16
@renovate renovate bot force-pushed the renovate/commander-8.x branch 2 times, most recently from a3e08d4 to ba80224 Compare October 10, 2021 04:54
@renovate renovate bot force-pushed the renovate/commander-8.x branch 2 times, most recently from a1f4e2f to a4e0f8b Compare October 23, 2021 04:27
@renovate renovate bot force-pushed the renovate/commander-8.x branch 5 times, most recently from f83a137 to 6ec1c30 Compare October 31, 2021 05:16
@renovate renovate bot force-pushed the renovate/commander-8.x branch 4 times, most recently from 6a727c1 to 08c0272 Compare November 8, 2021 12:30
@codecov
Copy link

codecov bot commented Nov 11, 2021

Codecov Report

Merging #587 (232730f) into next (88264db) will increase coverage by 14.20%.
The diff coverage is 79.13%.

@@             Coverage Diff             @@
##             next     #587       +/-   ##
===========================================
+ Coverage   67.58%   81.78%   +14.20%     
===========================================
  Files          62       85       +23     
  Lines        1530     2652     +1122     
  Branches      247      507      +260     
===========================================
+ Hits         1034     2169     +1135     
- Misses        400      481       +81     
+ Partials       96        2       -94     

@mirceanis mirceanis merged commit 9fc5c50 into next Nov 11, 2021
@mirceanis mirceanis deleted the renovate/commander-8.x branch November 11, 2021 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants