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

Update golang (packages) #3564

Merged
merged 5 commits into from
Mar 29, 2024
Merged

Update golang (packages) #3564

merged 5 commits into from
Mar 29, 2024

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Mar 28, 2024

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
github.com/cenkalti/backoff/v4 v4.2.1 -> v4.3.0 age adoption passing confidence
github.com/charmbracelet/huh/spinner v0.0.0-20240306161957-71f31c155b08 -> v0.3.0 age adoption passing confidence
github.com/distribution/reference v0.5.0 -> v0.6.0 age adoption passing confidence
github.com/expr-lang/expr v1.16.2 -> v1.16.3 age adoption passing confidence
github.com/go-sql-driver/mysql v1.8.0 -> v1.8.1 age adoption passing confidence

Release Notes

cenkalti/backoff (github.com/cenkalti/backoff/v4)

v4.3.0

Compare Source

charmbracelet/huh (github.com/charmbracelet/huh/spinner)

v0.3.0

Compare Source

Scrolling, autocomplete, smaller binaries and more!

This is a big release with a tonne of new features.

  • Scrollable Forms
  • Scrollable Selects and Multi selects
  • Autocomplete for inputs
  • 7x smaller binaries
  • Multi select filtering
  • Lotsa' bugfixes and quality-of-life improvements

To upgrade to huh v0.3.0:

go get -u github.com/charmbracelet/huh@latest

For details read on!

Scrollable forms

If a form is in a small terminal it will automatically resize to fit the available space and the active group will scroll to stay in view. Form heights can also be set manually with the new WithHeight method.

Made with VHS

Select and Multi select Scrolling

Select and Multi select fields can now be restricted to a certain height, allowing their options to be scrollable. This means you can now pack in tonnes of options.

To make a Select or MultiSelect scrollable simply set the height on the field or form through the Height method.

s := huh.NewSelect()
    .Title("What’s for dinner?")
    .Options(/* ... */)
    .Height(height)
Made with VHS

Autocomplete

Now Inputs can offer suggestions making it easier for users to fill out inputs. These suggestions can be accepted autocomplete-style with a configurable key binding (which defaults to ctrl+e).

Simply provide a []string to Suggestions to enable this feature.

huh.NewInput().
    Title("What's for lunch?").
    Prompt("? ").
    Suggestions([]string{
        "Artichoke",
        // ...
        "Cashew Apple",
        "Cashews",
        "Cat Food",
        "Coconut Milk",
        "Cucumber",
        "Curry Paste",
        "Currywurst",
        // ...
    })
Made with VHS

More helpful help

Forms will automatically adjust their help text to indicate to the user whether the form will continue or submit on actions. This works with hidden groups. In the below example, the user will be asked to list their allergies if they select "Yes" otherwise, the form will submit.

Made with VHS

Way smaller binaries

Huh now produces way smaller binaries! Thanks to #​94 Huh now has a 7x smaller compiled footprint.

Before, using huh@v0.2.3:

33M     ./burger

After, using huh@v0.3.0:

4.5M    ./burger

Thanks, Vitor!

Special thanks to the intrepid @​vitor-mariano, one of the earliest huh contributors, who came in hot with features, fixes, improvements and good vibes. Thank you, Vitor!

Changelog

New
Fixed

Full Changelog: charmbracelet/huh@v0.2.3...v0.3.0


The Charm logo

Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, The Fediverse, or on Discord.

v0.2.3

Compare Source

Better Defaults!

Huh? v0.2.3 fixes some bugs for more consistent behaviour across inputs 🐞

  • Text inputs now update values on each keystroke rather than on Blur for consistency.
  • Select and MultiSelect read their default values from the initial values set by the Value variable if provided.

A special thanks to @​vitor-mariano for all his contributions to this release 🤗

Defaults Example

You can now have preselected options by declaring them in the Value variable:

var toppings = []string{"Lettuce", "Tomatoes"}
var options = huh.NewOptions("Lettuce", "Tomatoes", "Charm Sauce", "Cheese", "Vegan Cheese")

huh.NewMultiSelect[string]().Title("Toppings").Options(options...).Value(&toppings).Run()

In the above example, Lettuce and Tomatoes will be preselected by default.

What's Changed

Full Changelog: charmbracelet/huh@v0.2.2...v0.2.3


The Charm logo

Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, The Fediverse, or on Discord.

v0.2.2

Compare Source

Better Wrapping 🎁

Huh? v0.2.2 improves wrapping of the Input and Text fields.
It applies width set on the form to the inputs to perform wrapping based on the specified or terminal width.

New Contributors

Full Changelog: charmbracelet/huh@v0.2.1...v0.2.2


The Charm logo

Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, The Fediverse, or Discord.

v0.2.1

Compare Source

New Theme! 😸

huh? forms can now use Catppuccin themes. (Thanks to the wonderful @​sgoudham ✨)

Simply add the following to your huh.Forms:

.WithTheme(huh.ThemeCatppuccin())

The Charm logo

Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, The Fediverse, or Discord.

v0.2.0

Compare Source

Better Help Styles!

Help Styles now apply on a Theme rather than embedded in FieldStyles. (Thanks to the wonderful @​jolheiser ✨)

// Old...
theme.Focused.Help.ShortKey = lipgloss.NewStyle() //...

// Updated!
theme.Help.ShortKey = lipgloss.NewStyle() //...

The Charm logo

Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, The Fediverse, or Discord.

distribution/reference (github.com/distribution/reference)

v0.6.0

Compare Source

What's Changed

New Contributors

Full Changelog: distribution/reference@v0.5.0...v0.6.0

expr-lang/expr (github.com/expr-lang/expr)

v1.16.3

Compare Source

Expr is a Go-centric expression language designed to deliver dynamic configurations with unparalleled accuracy,
safety, and speed.

program, err := expr.Compile(`let x = 2 + 2; x ^ x`)
output, err := expr.Run(program, env)

In this release:

  • Improved printing for maps: {(foo + bar): 42}

Expr Editor

The Expr Editor is an embeddable code editor written in JavaScript with full support of Expr language.

Expr Pro

Expr Pro is a set of extensions for Expr for advanced use cases. It includes expressions explanation, performance profiling, and more.

go-sql-driver/mysql (github.com/go-sql-driver/mysql)

v1.8.1

Compare Source

What's Changed

Bugfixes:

Full Changelog: go-sql-driver/mysql@v1.8.0...v1.8.1


Configuration

📅 Schedule: Branch creation - "before 4am" (UTC), Automerge - "before 4am" (UTC).

🚦 Automerge: Enabled.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


  • If you want to rebase/retry this PR, check this box

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

@renovate renovate bot enabled auto-merge (squash) March 28, 2024 09:38
Copy link
Contributor Author

renovate bot commented Mar 28, 2024

⚠ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: go.sum
Command failed: go get -d -t ./...
go: github.com/charmbracelet/huh/spinner@v0.3.0: reading github.com/charmbracelet/huh/spinner/go.mod at revision spinner/v0.3.0: unknown revision spinner/v0.3.0

@renovate renovate bot force-pushed the renovate/golang-(packages) branch from b57efdb to e9d7b97 Compare March 28, 2024 10:13
Copy link
Contributor Author

renovate bot commented Mar 28, 2024

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

Warning: custom changes will be lost.

@renovate renovate bot merged commit afd457a into main Mar 29, 2024
7 of 13 checks passed
@renovate renovate bot deleted the renovate/golang-(packages) branch March 29, 2024 08:21
@woodpecker-bot woodpecker-bot mentioned this pull request Mar 26, 2024
1 task
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.

1 participant