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

chore(deps): update dependency commander to v8 #762

Closed
wants to merge 1 commit into from

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.2.0 -> ^8.0.0 age adoption passing confidence
commander ^7.1.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: 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 these updates 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.

@coveralls
Copy link

coveralls commented Jun 25, 2021

Coverage Status

Coverage remained the same at 87.611% when pulling 19fb038 on renovate/commander-8.x into 70dfedd on master.

@renovate renovate bot force-pushed the renovate/commander-8.x branch 7 times, most recently from e6915d5 to 88d44ba Compare July 1, 2021 19:46
@renovate renovate bot force-pushed the renovate/commander-8.x branch 7 times, most recently from 4fae37c to d67d699 Compare July 9, 2021 17:14
@renovate renovate bot force-pushed the renovate/commander-8.x branch 6 times, most recently from 1eafae5 to f8f6623 Compare July 20, 2021 18:42
@renovate renovate bot force-pushed the renovate/commander-8.x branch 4 times, most recently from 6532578 to 6980f99 Compare July 26, 2021 12:38
@renovate renovate bot force-pushed the renovate/commander-8.x branch 4 times, most recently from 9fc1589 to 2b6a895 Compare August 3, 2021 08:10
@renovate renovate bot force-pushed the renovate/commander-8.x branch 7 times, most recently from 584d33e to 18a2116 Compare December 30, 2021 16:29
@renovate renovate bot force-pushed the renovate/commander-8.x branch 10 times, most recently from cf2530f to 66b64f5 Compare January 6, 2022 20:10
@renovate renovate bot force-pushed the renovate/commander-8.x branch 6 times, most recently from 6b316f6 to d7ba636 Compare January 11, 2022 15:53
@renovate renovate bot changed the title fix(deps): update dependency commander to v8 chore(deps): update dependency commander to v8 Jan 11, 2022
@codecov
Copy link

codecov bot commented Jan 11, 2022

Codecov Report

Merging #762 (9d9efab) into master (f58f8d2) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #762   +/-   ##
=======================================
  Coverage   90.70%   90.70%           
=======================================
  Files         174      174           
  Lines        2700     2700           
  Branches      552      552           
=======================================
  Hits         2449     2449           
  Misses        238      238           
  Partials       13       13           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f58f8d2...9d9efab. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants