SpatiumPortae / portal

Portal is a quick and easy command-line file transfer utility from any computer to another 🌌 ✨
https://portal.spatiumportae.com
MIT License
1.39k stars 35 forks source link

chore(deps): bump github.com/erikgeiser/promptkit from 0.7.0 to 0.9.0 #125

Closed dependabot[bot] closed 1 year ago

dependabot[bot] commented 1 year ago

Bumps github.com/erikgeiser/promptkit from 0.7.0 to 0.9.0.

Release notes

Sourced from github.com/erikgeiser/promptkit's releases.

v0.9.0

This is just a small update with some bug fixes for the selection prompt and updated dependencies.

Changelog:

  • Fixed an issue where parts of a selection prompt were not correctly re-drawn.
  • Improved performance for selection prompts with a large number of options.
  • Improved compatibility with newer https://github.com/charmbracelet/bubbletea versions.
  • Updated dependencies.

v0.8.0

As mentioned before, v0.8.0 introduces a breaking change by rewriting the selection prompt to use generics, but there are also a few other changes.

Changelog:

  • selection: The selection prompt now utilizes generics such that the choices don't have to be wrapped in Choice objects anymore and now the actual value of the the selected choice is returned. Migration instructions can be found below.
  • selection: A new option called LoopCursor was added. If enabled, the cursor now jumps to the top when pressing 'down' on the last entry and the other way around. See the custom selection prompt example for information on how to use it.
  • Fixed an issue where the wrong color profile was applied.
  • All dependencies were updated.

Migration:

  • When creating the selection prompt, instead of wrapping the choices like this
// before
selection.New("What do you pick?", selection.Choices([]string{"Horse", "Car", "Plane", "Bike"}))

they are now passed directly like this:

// now
selection.New("What do you pick?", []string{"Horse", "Car", "Plane", "Bike"})
  • The result is now directly returned, so instead of unwrapping the value from the choice object like this
// before
selected, err := sp.RunPrompt()
fmt.Println(selected.Value)

It can now be directly used instead:

// now
selected, err := sp.RunPrompt()
fmt.Println(selected)

  • selection.Model now can return both the selected choice in wrapped and unwrapped from with Model.Value() and Model.ValueAsChoice().
  • Some of the function properties of the selection prompt such as Filter or SelectedChoiceStyle now have a slightly different signature. Take a look at the custom selection example in which these properties are used.
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 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)
codecov[bot] commented 1 year ago

Codecov Report

Merging #125 (70b3b3c) into master (6ee211f) will not change coverage. The diff coverage is n/a.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/SpatiumPortae/portal/pull/125/graphs/tree.svg?width=650&height=150&src=pr&token=FH5GXKW890&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=SpatiumPortae)](https://app.codecov.io/gh/SpatiumPortae/portal/pull/125?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=SpatiumPortae) ```diff @@ Coverage Diff @@ ## master #125 +/- ## ======================================= Coverage 31.71% 31.71% ======================================= Files 6 6 Lines 227 227 ======================================= Hits 72 72 Misses 135 135 Partials 20 20 ``` [![Impacted file tree graph](https://app.codecov.io/gh/SpatiumPortae/portal/pull/125/graphs/tree.svg?width=650&height=150&src=pr&token=FH5GXKW890&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=SpatiumPortae)](https://app.codecov.io/gh/SpatiumPortae/portal/pull/125?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=SpatiumPortae)