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

Bump commander from 6.2.0 to 7.0.0 #1791

Merged
merged 5 commits into from
Feb 8, 2021

Conversation

dependabot-preview[bot]
Copy link

@dependabot-preview dependabot-preview bot commented Jan 20, 2021

Bumps commander from 6.2.0 to 7.0.0.

Release notes

Sourced from commander's releases.

v7.0.0

Added

  • .enablePositionalOptions() to let program and subcommand reuse same option (#1427)
  • .passThroughOptions() to pass options through to other programs without needing -- (#1427)
  • .allowExcessArguments(false) to show an error message if there are too many command-arguments on command line for the action handler (#1409)
  • .configureOutput() to modify use of stdout and stderr or customise display of errors (#1387)
  • use .addHelpText() to add text before or after the built-in help, for just current command or also for all subcommands (#1296)
  • enhance Option class (#1331)
    • allow hiding options from help
    • allow restricting option arguments to a list of choices
    • allow setting how default value is shown in help
  • .createOption() to support subclassing of automatically created options (like .createCommand()) (#1380)
  • refactor the code generating the help into a separate public Help class (#1365)
    • support sorting subcommands and options in help
    • support specifying wrap width (columns)
    • allow subclassing Help class
    • allow configuring Help class without subclassing

Changed

  • Breaking: options are stored safely by default, not as properties on the command (#1409)
    • this especially affects accessing options on program, use program.opts()
    • revert behaviour with .storeOptionsAsProperties()
  • Breaking: action handlers are passed options and command separately (#1409)
  • deprecated callback parameter to .help() and .outputHelp() (removed from README) (#1296)
  • Breaking: errors now displayed using process.stderr.write() instead of console.error()
  • deprecate .on('--help') (removed from README) (#1296)
  • initialise the command description to empty string (previously undefined) (#1365)
  • document and annotate deprecated routines (#1349)

Fixed

  • wrapping bugs in help (#1365)
    • first line of command description was wrapping two characters early
    • pad width calculation was not including help option and help command
    • pad width calculation was including hidden options and commands
  • improve backwards compatibility for custom command event listeners (#1403)

Deleted

  • Breaking: .passCommandToAction() (#1409)
    • no longer needed as action handler is passed options and command
  • Breaking: "extra arguments" parameter to action handler (#1409)
    • if being used to detect excess arguments, there is now an error available by setting .allowExcessArguments(false)

Migration Tips

The biggest change is the parsed option values. Previously the options were stored by default as properties on the command object, and now the options are stored separately.

... (truncated)

Changelog

Sourced from commander's changelog.

[7.0.0] (2021-01-15)

Added

  • .enablePositionalOptions() to let program and subcommand reuse same option (#1427)
  • .passThroughOptions() to pass options through to other programs without needing -- (#1427)
  • .allowExcessArguments(false) to show an error message if there are too many command-arguments on command line for the action handler (#1409)
  • .configureOutput() to modify use of stdout and stderr or customise display of errors (#1387)
  • use .addHelpText() to add text before or after the built-in help, for just current command or also for all subcommands (#1296)
  • enhance Option class (#1331)
    • allow hiding options from help
    • allow restricting option arguments to a list of choices
    • allow setting how default value is shown in help
  • .createOption() to support subclassing of automatically created options (like .createCommand()) (#1380)
  • refactor the code generating the help into a separate public Help class (#1365)
    • support sorting subcommands and options in help
    • support specifying wrap width (columns)
    • allow subclassing Help class
    • allow configuring Help class without subclassing

Changed

  • Breaking: options are stored safely by default, not as properties on the command (#1409)
    • this especially affects accessing options on program, use program.opts()
    • revert behaviour with .storeOptionsAsProperties()
  • Breaking: action handlers are passed options and command separately (#1409)
  • deprecated callback parameter to .help() and .outputHelp() (removed from README) (#1296)
  • Breaking: errors now displayed using process.stderr.write() instead of console.error()
  • deprecate .on('--help') (removed from README) (#1296)
  • initialise the command description to empty string (previously undefined) (#1365)
  • document and annotate deprecated routines (#1349)

Fixed

  • wrapping bugs in help (#1365)
    • first line of command description was wrapping two characters early
    • pad width calculation was not including help option and help command
    • pad width calculation was including hidden options and commands
  • improve backwards compatibility for custom command event listeners (#1403)

Deleted

  • Breaking: .passCommandToAction() (#1409)
    • no longer needed as action handler is passed options and command
  • Breaking: "extra arguments" parameter to action handler (#1409)
    • if being used to detect excess arguments, there is now an error displayed by default

Migration Tips

The biggest change is the parsed option values. Previously the options were stored by default as properties on the command object, and now the options are stored separately.

... (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 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)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
  • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot dashboard:

  • Update frequency (including time of day and day of week)
  • Pull request limits (per update run and/or open at any time)
  • Automerge options (never/patch/minor, and dev/runtime dependencies)
  • Out-of-range updates (receive only lockfile updates, if desired)
  • Security updates (receive only security updates, if desired)

@dependabot-preview dependabot-preview bot requested a review from a team as a code owner January 20, 2021 06:04
@dependabot-preview dependabot-preview bot added the dependencies Pull requests that update a dependency file label Jan 20, 2021
@gitpod-io
Copy link

gitpod-io bot commented Jan 20, 2021

@dependabot-preview dependabot-preview bot force-pushed the dependabot/npm_and_yarn/commander-7.0.0 branch 3 times, most recently from dd72d50 to 431d84e Compare January 20, 2021 13:24
@daemon1024
Copy link
Member

We should prolly have proper error message instead of straight up failing. That will make a bit more sense ig.

@jywarren
Copy link
Member

Oh, like reported as a status text on the check line? Or how? Interesting!

@jywarren
Copy link
Member

Or do you mean on the commandline?

@daemon1024
Copy link
Member

Or do you mean on the commandline?

Yes. For instance, if i dont provide any steps to savesequence it fails, but instead it should report please add steps in args.

@dependabot-preview dependabot-preview bot force-pushed the dependabot/npm_and_yarn/commander-7.0.0 branch 2 times, most recently from aa96050 to 41039b3 Compare January 21, 2021 12:21
@jywarren
Copy link
Member

this is a major version bump so not too unexpected though...


    ✖ creation success
    -------------------
      operator: ok
      expected: true
      actual:   0
      at: Test.<anonymous> (/home/runner/work/image-sequencer/image-sequencer/test/cli/saveSequence.js:32:11)
      stack: |-
  Error: creation success

I also see:


npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! image-sequencer@3.6.0 test-cli: `node test/cli/*.js | tap-spec`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the image-sequencer@3.6.0 test-cli script.

i wonder if checking the release notes for breaking changes will help us resolve this.

@daemon1024
Copy link
Member

https://github.com/tj/commander.js/releases/tag/v7.0.0

Quite a few breaking changes. Will need to do some migration stuff.

@daemon1024
Copy link
Member

daemon1024 commented Jan 21, 2021

so cli is broken right now, do you want me to .storeOptionsAsProperties() add this or migrate them properly? @jywarren

@jywarren
Copy link
Member

jywarren commented Jan 22, 2021 via email

@daemon1024
Copy link
Member

Right now in this PR or in main? Hmm, whichever you prefer would be great! Thanks!!

Nah, not in this PR. Will merge this PR after breaking it I guess. Would you mind looking at #1785, will ease up writing tests in future cause it will be kinda centralised.

@dependabot-preview dependabot-preview bot force-pushed the dependabot/npm_and_yarn/commander-7.0.0 branch 2 times, most recently from d8464ae to 9249c19 Compare January 25, 2021 19:01
@dependabot-preview dependabot-preview bot force-pushed the dependabot/npm_and_yarn/commander-7.0.0 branch 2 times, most recently from c5bf956 to 2f23bc6 Compare February 4, 2021 00:37
Bumps [commander](https://github.com/tj/commander.js) from 6.2.0 to 7.0.0.
- [Release notes](https://github.com/tj/commander.js/releases)
- [Changelog](https://github.com/tj/commander.js/blob/master/CHANGELOG.md)
- [Commits](tj/commander.js@v6.2.0...v7.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
@dependabot-preview dependabot-preview bot force-pushed the dependabot/npm_and_yarn/commander-7.0.0 branch from 2f23bc6 to 8e0d91f Compare February 4, 2021 06:25
@dependabot-preview dependabot-preview bot requested a review from a team as a code owner February 4, 2021 21:08
@daemon1024
Copy link
Member

Just noticed, why do we have package-lock.json and yarn.lock both. It is recommended to usually have one 😅

@daemon1024

This comment has been minimized.

@dependabot-preview

This comment has been minimized.

@daemon1024
Copy link
Member

So everything passes.
cc @jywarren

@dependabot-preview
Copy link
Author

Dependabot tried to merge this PR, but received the following error from GitHub:

At least 2 approving reviews are required by reviewers with write access.

@jywarren jywarren merged commit a73cba8 into main Feb 8, 2021
@jywarren
Copy link
Member

jywarren commented Feb 8, 2021

Fantastic!!!!

@dependabot-preview dependabot-preview bot deleted the dependabot/npm_and_yarn/commander-7.0.0 branch February 8, 2021 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants