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

[Snyk] Upgrade commander from 8.0.0 to 8.1.0 #105

Merged
merged 1 commit into from
Aug 3, 2021

Conversation

snyk-bot
Copy link
Contributor

Snyk has created this PR to upgrade commander from 8.0.0 to 8.1.0.

merge advice
ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.


  • The recommended version is 1 version ahead of your current version.
  • The recommended version was released a day ago, on 2021-07-27.
Release notes
Package name: commander
  • 8.1.0 - 2021-07-27

    Added

    • .copyInheritedSettings() (#1557)
    • update Chinese translations for Commander v8 (#1570)
    • Argument methods for .argRequired() and .argOptional() (#1567)
  • 8.0.0 - 2021-06-25

    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();
from commander GitHub release notes
Commit messages
Package name: commander
  • a9c9f17 Add link for version diff
  • 411ca95 Clarify that more than just README
  • a036bde Prepare for 8.1
  • e6943c4 Update Chinese docs
  • 6f51e4a Feature/argument arg explicit (#1567)
  • 4be69f1 Use getCommandAndParents for array of parents (#1566)
  • 56c4108 Follow jsdoc and tsdoc more closely, especially @ example (#1562)
  • 5517d25 Add copyInheritedSettings (#1557)

Compare


Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.

For more information:

🧐 View latest project report

🛠 Adjust upgrade PR settings

🔕 Ignore this dependency or unsubscribe from future upgrade PRs

@coveralls
Copy link

coveralls commented Jul 28, 2021

Pull Request Test Coverage Report for Build 1073888700

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 1048037726: 0.0%
Covered Lines: 90
Relevant Lines: 90

💛 - Coveralls

@ovhemert ovhemert merged commit 335474d into master Aug 3, 2021
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