fix(deps): update module github.com/charmbracelet/huh to v2#67
fix(deps): update module github.com/charmbracelet/huh to v2#67renovate[bot] wants to merge 1 commit intomainfrom
Conversation
|
|
Claude finished @renovate[bot]'s task in 1m 10s —— View job Code Review: fix(deps): update module github.com/charmbracelet/huh to v2Tasks
SummaryDo not merge this PR. Renovate itself flagged it as broken, and the analysis below confirms it. Upgrading Critical Issues1. Wrong module path in
|
| Usage | Line | Status |
|---|---|---|
huh.NewInput() |
68 | Likely compatible, verify |
huh.ErrUserAborted |
74 | Verify still exported in v2 |
The v2 release notes mention accessible mode is form-level only now, but this file uses huh in standalone field mode (.Run()), so that may require verification too.
What Needs to Happen
A proper v2 upgrade requires:
- Change
go.modrequire fromgithub.com/charmbracelet/huh/v2→charm.land/huh/v2 - Update
internal/prompt/prompt.goimport fromgithub.com/charmbracelet/huh→charm.land/huh/v2 - Run
go mod tidyto resolve all transitive dependencies (bubbletea v2, lipgloss v2, etc.) - Verify the
huh.ErrUserAbortedandhuh.NewInput().Run()API still works as expected under v2 - Run tests to confirm nothing regressed
This PR should be closed. A fresh branch with all of these changes made together would be the right approach.
Fix this →%20Change%20go.mod%20require%20entry%20from%20github.com%2Fcharmbracelet%2Fhuh%2Fv2%20to%20charm.land%2Fhuh%2Fv2%202)%20Update%20internal%2Fprompt%2Fprompt.go%20import%20from%20github.com%2Fcharmbracelet%2Fhuh%20to%20charm.land%2Fhuh%2Fv2%203)%20Run%20go%20mod%20tidy%20to%20update%20all%20transitive%20deps%20(bubbletea%20v2%2C%20lipgloss%20v2%2C%20etc.)%204)%20Verify%20huh.ErrUserAborted%20and%20huh.NewInput().Run()%20still%20work%20under%20v2%20API&repo=boneskull/gh-stack)
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
cf16bc1 to
027f18d
Compare
|
Claude finished @renovate[bot]'s task in 1m 10s —— View job Code Review: fix(deps): update module github.com/charmbracelet/huh to v2Tasks
Do not merge this PR. This branch is still broken in all the same ways identified in the previous review. The PR has been re-synchronized but none of the underlying issues are fixed. Critical Issues (Unchanged)1. Wrong module path in
|
| Package | Current | Required |
|---|---|---|
github.com/charmbracelet/bubbletea |
v1.3.6 |
v2.x |
github.com/charmbracelet/lipgloss |
v1.1.1-... |
v2.x |
API Compatibility (Needs Verification After Fix)
Once import paths are corrected, these usages in prompt.go need verification against the v2 API:
| Usage | Line | Notes |
|---|---|---|
huh.NewDefaultKeyMap() |
70 | Verify exported in v2 |
huh.ErrUserAborted |
86 | Verify still exported in v2 |
huh.NewForm(...).WithKeyMap(km) |
81–84 | KeyMap type may have changed |
key.NewBinding(...) from charmbracelet/bubbles |
71–74 | bubbles dep may be removed/changed in huh v2 |
What Needs to Happen
This requires a manual fix — Renovate cannot handle it automatically because the vanity domain redirect makes this a module path rename, not a version bump:
- Update
go.mod: change require entry fromgithub.com/charmbracelet/huh/v2→charm.land/huh/v2 - Update
internal/prompt/prompt.go:12: change import from"github.com/charmbracelet/huh"→huh "charm.land/huh/v2" - Run
go mod tidyto pull in bubbletea v2, lipgloss v2, and updatego.sum - Fix any API breakage surfaced by the compiler (key maps,
bubbles/keyusage, etc.) - Run tests
Fix this →%20In%20go.mod%2C%20change%20require%20entry%20from%20%60github.com%2Fcharmbracelet%2Fhuh%2Fv2%20v2.0.3%60%20to%20%60charm.land%2Fhuh%2Fv2%20v2.0.3%60.%202)%20In%20internal%2Fprompt%2Fprompt.go%3A12%2C%20change%20import%20from%20%60%22github.com%2Fcharmbracelet%2Fhuh%22%60%20to%20%60huh%20%22charm.land%2Fhuh%2Fv2%22%60.%203)%20Run%20go%20mod%20tidy%20to%20update%20go.sum%20and%20pull%20in%20bubbletea%20v2%20and%20lipgloss%20v2.%204)%20Fix%20any%20API%20breakage%20(check%20NewDefaultKeyMap%2C%20ErrUserAborted%2C%20WithKeyMap%2C%20bubbles%2Fkey%20usage%20in%20prompt.go).%205)%20Run%20tests%20to%20verify.&repo=boneskull/gh-stack)
027f18d to
43b8be2
Compare
|
Claude finished @renovate[bot]'s task in 1m 13s —— View job Code Review: fix(deps): update module github.com/charmbracelet/huh to v2Tasks
Do not merge this PR. This branch has been re-synchronized but is still broken in all the same ways identified in prior reviews. No underlying issues have been fixed. Critical Issues (Unchanged)1. Wrong module path in
|
| Package | Current | Required |
|---|---|---|
github.com/charmbracelet/bubbletea |
v1.3.10 |
v2.x |
github.com/charmbracelet/lipgloss |
v1.1.1-… |
v2.x |
github.com/charmbracelet/bubbles |
v0.21.1 |
Likely removed in v2 |
API Compatibility (Needs Verification After Fix)
internal/prompt/prompt.go uses these huh APIs that need verification against v2:
| Usage | Line | Risk |
|---|---|---|
huh.NewDefaultKeyMap() |
70 | May have changed in v2 |
key.NewBinding(...) from charmbracelet/bubbles/key |
71–74 | bubbles may be removed in huh v2 |
huh.ErrUserAborted |
86 | Verify still exported in v2 |
.WithKeyMap(km) |
84 | KeyMap type may have changed |
The charmbracelet/bubbles package is currently a direct dependency (used for key.NewBinding in prompt.go). Since huh v2 drops bubbles, this usage may need to be replaced.
What Needs to Happen
This requires a manual fix — Renovate cannot handle it because the vanity domain makes this a module path rename, not a simple version bump:
- In
go.mod, change the require entry fromgithub.com/charmbracelet/huh/v2 v2.0.3→charm.land/huh/v2 v2.0.3 - In
internal/prompt/prompt.go:12, change import from"github.com/charmbracelet/huh"→huh "charm.land/huh/v2" - Verify/fix
bubbles/keyusage (lines 11, 71–74) — thekey.NewBindingcall may need replacing if huh v2 no longer usesbubbles - Run
go mod tidyto pull in bubbletea v2, lipgloss v2, and updatego.sum - Fix any remaining API breakage the compiler surfaces
- Run tests to confirm nothing regressed
Fix this →%20In%20go.mod%2C%20change%20require%20entry%20from%20%60github.com%2Fcharmbracelet%2Fhuh%2Fv2%20v2.0.3%60%20to%20%60charm.land%2Fhuh%2Fv2%20v2.0.3%60.%202)%20In%20internal%2Fprompt%2Fprompt.go%3A12%2C%20change%20import%20from%20%60%22github.com%2Fcharmbracelet%2Fhuh%22%60%20to%20%60huh%20%22charm.land%2Fhuh%2Fv2%22%60.%203)%20Check%20if%20charmbracelet%2Fbubbles%2Fkey.NewBinding%20is%20still%20available%20in%20huh%20v2%20and%20fix%20accordingly.%204)%20Run%20go%20mod%20tidy%20to%20update%20go.sum%20and%20pull%20in%20bubbletea%20v2%20and%20lipgloss%20v2.%205)%20Fix%20any%20remaining%20API%20breakage%20(ErrUserAborted%2C%20WithKeyMap%2C%20etc.).%206)%20Run%20tests%20to%20verify.&repo=boneskull/gh-stack)
43b8be2 to
9e15dd5
Compare
|
Claude finished @renovate[bot]'s task in 1m 25s —— View job Code Review: fix(deps): update module github.com/charmbracelet/huh to v2Tasks
Do not merge this PR. This branch has been re-synchronized again, but all the same critical issues remain unfixed. This is now the fourth review with the same findings. Critical Issues (Unchanged)1. Wrong module path in
|
| Package | Current | Required |
|---|---|---|
github.com/charmbracelet/bubbletea |
v1.3.10 |
v2.x |
github.com/charmbracelet/lipgloss |
v1.1.1-… |
v2.x |
github.com/charmbracelet/bubbles |
v0.21.1 |
Likely removed in huh v2 |
API Compatibility (Needs Verification After Fix)
internal/prompt/prompt.go uses these APIs that need verification against v2:
| Usage | Line | Risk |
|---|---|---|
key.NewBinding(...) from charmbracelet/bubbles/key |
11, 71–74 | bubbles is likely removed from huh v2 dependencies |
huh.NewDefaultKeyMap() |
70 | May have changed in v2 |
huh.ErrUserAborted |
86 | Verify still exported in v2 |
.WithKeyMap(km) |
83 | KeyMap type may have changed |
Root Cause
Renovate cannot fix this automatically because the charm.land/huh/v2 vanity domain makes this a module path rename, not a version bump. Each time Renovate retries, it resolves github.com/charmbracelet/huh/v2 (which proxies to charm.land/huh/v2) and fails when Go validates the module declaration in go.mod doesn't match the requested path.
What Needs to Happen (Manual Fix)
- In
go.mod:7, changegithub.com/charmbracelet/huh/v2 v2.0.3→charm.land/huh/v2 v2.0.3 - In
internal/prompt/prompt.go:12, change import from"github.com/charmbracelet/huh"→huh "charm.land/huh/v2" - Assess
bubbles/keyusage (lines 11, 71–74) —key.NewBindingmay need replacing ifbubblesis gone from huh v2's dep tree - Run
go mod tidyto pull in bubbletea v2, lipgloss v2, and regeneratego.sum - Fix any remaining compiler errors (KeyMap type, ErrUserAborted, etc.)
- Run tests
Fix this →%20In%20go.mod%2C%20change%20require%20entry%20from%20%60github.com%2Fcharmbracelet%2Fhuh%2Fv2%20v2.0.3%60%20to%20%60charm.land%2Fhuh%2Fv2%20v2.0.3%60.%202)%20In%20internal%2Fprompt%2Fprompt.go%3A12%2C%20change%20import%20from%20%60%22github.com%2Fcharmbracelet%2Fhuh%22%60%20to%20%60huh%20%22charm.land%2Fhuh%2Fv2%22%60.%203)%20Assess%20charmbracelet%2Fbubbles%2Fkey.NewBinding%20usage%20(lines%2011%2C%2071-74%20in%20prompt.go)%20-%20bubbles%20may%20be%20removed%20from%20huh%20v2.%204)%20Run%20go%20mod%20tidy%20to%20pull%20in%20bubbletea%20v2%2C%20lipgloss%20v2%2C%20update%20go.sum.%205)%20Fix%20remaining%20API%20breakage%20(NewDefaultKeyMap%2C%20ErrUserAborted%2C%20WithKeyMap).%206)%20Run%20tests.&repo=boneskull/gh-stack)
This PR contains the following updates:
v1.0.0→v2.0.3Release Notes
charmbracelet/huh (github.com/charmbracelet/huh)
v2.0.3Compare Source
This patch release fixes two UX issues where multiline options might get cutoff when navigating, and the other is related to ensuring the viewport width is updated after a resize.
Changelog
Fixed
3c0116c: fix(select): ensure cursor visibility when navigating multiline options (#749) (@aymanbagabas)ec53694: fix(select): recompute viewport width on WithWidth (#747) (@SergioChan)Thoughts? Questions? We love hearing from you. Feel free to reach out on X, Discord, Slack, The Fediverse, Bluesky.
v2.0.2Compare Source
Paste Paste Paste
This patch release fixes an issue where sometimes, a paste event, might get triggered multiple times. Enjoy!
Changelog
Fixed
8ccc9e1: fix: Prevent double paste in focused field (#746) (@ConnorsApps)35e08d4: fix: use keypress events instead of key events to avoid release events (@aymanbagabas)Docs
28dc68f: docs(license): update copyright date (@meowgorithm)4b802ae: docs(readme): update footer (@meowgorithm)Thoughts? Questions? We love hearing from you. Feel free to reach out on X, Discord, Slack, The Fediverse, Bluesky.
v2.0.1Compare Source
This patch release includes upgrading the minimum Go version, upgrade our Bubble Tea and Lip Gloss libraries to use that latest and greatest patches. Enjoy!
Thoughts? Questions? We love hearing from you. Feel free to reach out on X, Discord, Slack, The Fediverse, Bluesky.
v2.0.0Compare Source
Huh? v2?
We're thrilled to announce the second major release of Huh!
❤️ Charm Land Import Path
We've updated our import paths to use vanity domains and use our domain to import Go packages.
🍵 Bubble Tea v2 & Lip Gloss v2
Huh v2 is built on the all-new Bubble Tea v2 and Lip Gloss v2, bringing all their improvements along for the ride:
All these improvements come for free. Just upgrade and enjoy the performance and stability benefits.
🎨 Simpler Theming
Themes are now passed by value instead of pointer. This makes theme handling more straightforward and predictable.
All built-in themes now take a
boolparameter to indicate whether the terminal has a dark background. Huh will automatically detect your terminal's background color, but you can also provide your own custom theme function:🔍 View Hooks
Want to modify your form's view before it hits the screen? Now you can with
WithViewHook:This is perfect for dynamically controlling terminal features, applying custom view transformations, or integrating Huh forms with larger Bubble Tea applications.
♿ Simplified Accessible Mode
The separate
accessibilitypackage is gone. Accessible mode is now built directly into Huh and controlled exclusively at the form level:This makes accessible mode simpler and more consistent — one setting controls the entire form.
🗂️ Better Model Handling
The internal
Modeltype is now exposed, making it easier to work with Huh forms in Bubble Tea applications. This improves type safety and makes composition patterns more natural.🧹 Cleaner Dependencies
Huh v2 benefits from the simplified dependency tree of Bubble Tea v2 and Lip Gloss v2. This means faster builds, smaller binaries, and fewer potential version conflicts.
🌈 More on Huh v2
Ready to migrate? Head over to the Upgrade Guide for the full migration checklist.
Changelog
New!
Fixed
Docs
Other stuff
Feedback
Have thoughts on Huh v2? We'd love to hear about it. Let us know on…
Part of Charm.
Charm热爱开源 • Charm loves open source • نحنُ نحب المصادر المفتوحة
Configuration
📅 Schedule: (UTC)
🚦 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.