Closed renovate[bot] closed 3 months ago
In order to perform the update(s) described in the table above, Renovate ran the go get
command, which resulted in the following additional change(s):
Details:
Package | Change |
---|---|
github.com/charmbracelet/x/exp/strings |
v0.0.0-20240606154654-7c42867b53c7 -> v0.0.0-20240722160745-212f7b056ed0 |
This PR contains the following updates:
v0.4.2
->v0.5.2
Release Notes
charmbracelet/huh (github.com/charmbracelet/huh)
### [`v0.5.2`](https://togithub.com/charmbracelet/huh/releases/tag/v0.5.2) [Compare Source](https://togithub.com/charmbracelet/huh/compare/v0.5.1...v0.5.2) ### Lil’ fixes ’n’ improvements Hi! This is a maintenance release to fix issues with dynamic forms as well as address issues with [Gum](https://togithub.com/charmbracelet/gum) upstream. #### Changelog ##### New - add accept and reject key bindings to confirm by [@csandeep](https://togithub.com/csandeep) in [https://github.com/charmbracelet/huh/pull/308](https://togithub.com/charmbracelet/huh/pull/308) - allow Generic `T` updateOptionsMsg by [@maaslalani](https://togithub.com/maaslalani) in [https://github.com/charmbracelet/huh/pull/318](https://togithub.com/charmbracelet/huh/pull/318) ##### Fixed - improve distinction in field select by [@csandeep](https://togithub.com/csandeep) in [https://github.com/charmbracelet/huh/pull/304](https://togithub.com/charmbracelet/huh/pull/304) - fix invalid order of event handling in input/text fields by [@Sculas](https://togithub.com/Sculas) in [https://github.com/charmbracelet/huh/pull/284](https://togithub.com/charmbracelet/huh/pull/284) #### New Contributors - [@csandeep](https://togithub.com/csandeep) made their first contribution in [https://github.com/charmbracelet/huh/pull/304](https://togithub.com/charmbracelet/huh/pull/304) - [@MaximilianSoerenPollak](https://togithub.com/MaximilianSoerenPollak) made their first contribution in [https://github.com/charmbracelet/huh/pull/313](https://togithub.com/charmbracelet/huh/pull/313) **Full Changelog**: https://github.com/charmbracelet/huh/compare/v0.5.1...v0.5.2 *** Thoughts? Questions? We love hearing from you. Feel free to reach out on [Twitter](https://twitter.com/charmcli), [The Fediverse](https://mastodon.technology/@charm), or [Discord](https://charm.sh/chat). ### [`v0.5.1`](https://togithub.com/charmbracelet/huh/compare/v0.5.0...v0.5.1) [Compare Source](https://togithub.com/charmbracelet/huh/compare/v0.5.0...v0.5.1) ### [`v0.5.0`](https://togithub.com/charmbracelet/huh/releases/tag/v0.5.0) [Compare Source](https://togithub.com/charmbracelet/huh/compare/v0.4.2...v0.5.0) This big news in this release is that forms in Huh can now be dynamic. Read on for more: #### Dynamic Forms 🪄 `huh?` forms can now react to changes in other parts of the form. Replace properties such as `Options`, `Title`, `Description` with their dynamic counterparts: `OptionsFunc`, `TitleFunc`, and `DescriptionFunc` to recompute properties values on changes when watched variables change. Let’s build a simple state / province picker. ```go var country string var state string ``` The `country` select will be static, we’ll use this value to recompute the options and title for the next input. ```go huh.NewSelect[string](). Options(huh.NewOptions("United States", "Canada", "Mexico")...). Value(&country). Title("Country"). ``` Define your `Select` with `TitleFunc` and `OptionsFunc` and bind them to the `&country` value from the previous field. Whenever the user chooses a different country, the `TitleFunc` and `OptionsFunc` will be recomputed. > \[!IMPORTANT] > We have to pass `&country` as the binding to recompute the function only when > `country` changes, otherwise we will hit the API too often. ```go huh.NewSelect[string](). Value(&state). Height(8). TitleFunc(func() string { switch country { case "United States": return "State" case "Canada": return "Province" default: return "Territory" } }, &country). OptionsFunc(func() []huh.Option[string] { opts := fetchStatesForCountry(country) return huh.NewOptions(opts...) }, &country), ``` Lastly, run the `form` with these inputs. ```go err := form.Run() if err != nil { log.Fatal(err) } ``` #### Changelog ##### New! - Form Layouts by [@adamdottv](https://togithub.com/adamdottv) in [https://github.com/charmbracelet/huh/pull/274](https://togithub.com/charmbracelet/huh/pull/274) - `CursorText` style by [@nervo](https://togithub.com/nervo) in [https://github.com/charmbracelet/huh/pull/259](https://togithub.com/charmbracelet/huh/pull/259) - `WithInput` by [@Delta456](https://togithub.com/Delta456) in [https://github.com/charmbracelet/huh/pull/271](https://togithub.com/charmbracelet/huh/pull/271) - `WithTimeout` by [@Delta456](https://togithub.com/Delta456) in [https://github.com/charmbracelet/huh/pull/276](https://togithub.com/charmbracelet/huh/pull/276) - Introduce `accessor` by [@nervo](https://togithub.com/nervo) in [https://github.com/charmbracelet/huh/pull/263](https://togithub.com/charmbracelet/huh/pull/263) - Introduce `accessor` by [@nervo](https://togithub.com/nervo) in [https://github.com/charmbracelet/huh/pull/263](https://togithub.com/charmbracelet/huh/pull/263) - Set filtering state of select on init by [@PJGaetan](https://togithub.com/PJGaetan) in [https://github.com/charmbracelet/huh/pull/179](https://togithub.com/charmbracelet/huh/pull/179) ##### Fixed - Aborting a form returned a timeout error by [@Sculas](https://togithub.com/Sculas) in [https://github.com/charmbracelet/huh/pull/287](https://togithub.com/charmbracelet/huh/pull/287) - Resolve conflict between select and filter by [@MikaelFangel](https://togithub.com/MikaelFangel) in [https://github.com/charmbracelet/huh/pull/252](https://togithub.com/charmbracelet/huh/pull/252) - Adjust input width to char limit by [@nervo](https://togithub.com/nervo) in [https://github.com/charmbracelet/huh/pull/260](https://togithub.com/charmbracelet/huh/pull/260) #### New Contributors - [@MikaelFangel](https://togithub.com/MikaelFangel) made their first contribution in [https://github.com/charmbracelet/huh/pull/252](https://togithub.com/charmbracelet/huh/pull/252) - [@nervo](https://togithub.com/nervo) made their first contribution in [https://github.com/charmbracelet/huh/pull/253](https://togithub.com/charmbracelet/huh/pull/253) - [@shedyfreak](https://togithub.com/shedyfreak) made their first contribution in [https://github.com/charmbracelet/huh/pull/230](https://togithub.com/charmbracelet/huh/pull/230) - [@Delta456](https://togithub.com/Delta456) made their first contribution in [https://github.com/charmbracelet/huh/pull/271](https://togithub.com/charmbracelet/huh/pull/271) - [@abradley2](https://togithub.com/abradley2) made their first contribution in [https://github.com/charmbracelet/huh/pull/280](https://togithub.com/charmbracelet/huh/pull/280) - [@PJGaetan](https://togithub.com/PJGaetan) made their first contribution in [https://github.com/charmbracelet/huh/pull/179](https://togithub.com/charmbracelet/huh/pull/179) - [@Sculas](https://togithub.com/Sculas) made their first contribution in [https://github.com/charmbracelet/huh/pull/287](https://togithub.com/charmbracelet/huh/pull/287) **Full Changelog**: https://github.com/charmbracelet/huh/compare/v0.4.2...v0.5.0 *** Thoughts? Questions? We love hearing from you. Feel free to reach out on [Twitter](https://twitter.com/charmcli), [The Fediverse](https://mastodon.technology/@charm), or [Discord](https://charm.sh/chat).Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.