fix(deps): update module github.com/charmbracelet/bubbletea to v2#13
Open
renovate[bot] wants to merge 1 commit intomainfrom
Open
fix(deps): update module github.com/charmbracelet/bubbletea to v2#13renovate[bot] wants to merge 1 commit intomainfrom
renovate[bot] wants to merge 1 commit intomainfrom
Conversation
Contributor
Author
|
2e5d25a to
e18adcb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
v0.27.1→v2.0.1Release Notes
charmbracelet/bubbletea (github.com/charmbracelet/bubbletea)
v2.0.1Compare Source
A small patch release to fix opening the proper default stdin file for input.
Changelog
Fixed
110a919: fix(examples): add missingWithWidthto table example (#1598) (@shv-ng)66b7abd: fix: check if os.Stdin is a terminal before opening the TTY (@aymanbagabas)Docs
c751374: docs: correct whats new link (@aymanbagabas)736fba2: docs: upgrade guide: correct badge url (@aymanbagabas)Thoughts? Questions? We love hearing from you. Feel free to reach out on X, Discord, Slack, The Fediverse, Bluesky.
v2.0.0Compare Source
What's New in Bubble Tea v2
We're very excited to announce the second major release of Bubble Tea!
If you (or your LLM) are just looking for technical details on on migrating from v1, please check out the Upgrade Guide.
❤️ Charm Land Import Path
We've updated our import paths to use vanity domains and use our domain to import Go packages.
Everything else stays the same 🙂
👾 The Cursed Renderer
Bubble Tea v2 ships with the all-new Cursed Renderer which was built from the ground up. It's based on the ncurses rendering algorithm and is highly optimized for speed, efficiency, and accuracy and is built on an enormous amount of research and development.
Optimized renders also means that Wish users get big performance benefits and lower bandwidth usage by orders of magnitude.
To take advantage of the new Cursed Renderer you don't need to do anything at all except keep on using the Bubble Tea you know and love.
✌️ Key handling is way better now
Newer terminals can now take advantage of all sorts keyboard input via progressive keyboard enhancements. You can now map all sorts of keys and modifiers like shift+enter and super+space. You can also detect key releases (we're looking at you, game developers).
It's easy to detect support for supporting terminals and add fallbacks for those that don't. For details, see keyboard enhancements below.
🥊 No more fighting
In the past, Bubble Tea and Lip Gloss would often fight over i/o. Bubble Tea wanted to read keyboard input and Lip Gloss wanted to query for the background color. This means that things could get messy. Not anymore! In v2, Lip Gloss is now pure, which means, Bubble Tea manages i/o and gives orders to Lip Gloss. In short, we only need one lib to call the shots, and in the context of this relationship, that lib is Bubble Tea.
But what about color downsampling? That's a great question.
👨🏻🎨 Built-in Color Downsampling
We sneakily released a little library called colorprofile that will detect the terminal's color profile and auto-downsample any ANSI styling that flows through it to the best available color profile. This means that color will "just work" (and not misbehave) no matter where the ANSI styling comes from.
Downsampling is built-into Bubble Tea and is automatically enabled.
🧘 Declarative, Not Imperative
This is a big one. In v1, you'd toggle terminal features on and off with commands like
tea.EnterAltScreen,tea.EnableMouseCellMotion,tea.EnableReportFocus, and so on. In v2, all of that is gone and replaced by fields on theViewstruct. You just declare what you want your view to look like and Bubble Tea takes care of the rest.This means no more fighting over startup options and commands. Just set the fields and forget about it. For example, to enter full screen mode:
The same goes for mouse mode, bracketed paste, focus reporting, window title, keyboard enhancements, and more. See A Declarative View below for the full picture.
Keyboard Enhancements
Progressive keyboard enhancements allow you to receive key events not normally possible in traditional terminals. For example, you can now listen for the ctrl+m key, as well as previously unavailable key combinations like shift+enter.
Bubble Tea v2 will always try to enable basic keyboard enhancements that disambiguate keys. If your terminal supports it, your program will receive a
tea.KeyboardEnhancementsMsgmessage that indicates support for requested features.Historically, certain key combinations in terminals map to control codes. For example, ctrl+h outputs a backspace by default, which means you can't normally bind a key event to ctrl+h. With key disambiguation, you can now actually bind events to those key combinations.
You can detect if a terminal supports keyboard enhancements by listening for
tea.KeyboardEnhancementsMsg.Which terminals support progressive enhancement?
Key Messages
Key messages are now split into
tea.KeyPressMsgandtea.KeyReleaseMsg. Usetea.KeyMsgto match against both. We've also replacedkey.Typeandkey.Runeswithkey.Codeandkey.Text. Modifiers live inkey.Modnow instead of being separate booleans. Oh, and space bar returns"space"instead of" ".The easiest way to match against key press events is to use
msg.String():The
Keystruct also has some nice new fields:key.BaseCode— the key according to a standard US PC-101 layout. Handy for international keyboards where the physical key might differ.key.IsRepeat— tells you if the key is being held down and auto-repeating. Only available with the Kitty Keyboard Protocol or Windows Console API.key.Keystroke()— a new method that returns the keystroke representation (e.g.,"ctrl+shift+alt+a"). UnlikeString(), it always includes modifier info.For the full list of changes and before/after code samples, see the Upgrade Guide.
Paste Messages
Paste events used to arrive as
tea.KeyMsgwith a confusingmsg.Pasteflag. Now they're their own thing:Mouse Messages
We've improved the mouse API. Mouse messages are now split into
tea.MouseClickMsg,tea.MouseReleaseMsg,tea.MouseWheelMsg, andtea.MouseMotionMsg. And mouse mode is set declaratively in yourView():A Declarative View
In v1,
View()returned astring. In v2, it returns atea.Viewstruct that lets you declare everything about your view — content, cursor, alt screen, mouse mode, colors, window title, progress bar, and more:No more fighting over options and commands! Just set the fields:
An Actual Cursor
You can now control the cursor position, color, and shape right from your view function. Want it hidden? Just set
view.Cursor = nil.You can also use
tea.NewCursor(x, y)for a quick block cursor with default settings.Progress Bar Support
Now you can ask Bubble Tea to render a native progress bar for your application. Just set the
view.ProgressBarfield and Bubble Tea will take care of the rest.Synchronized Updates (Mode 2026)
Bubble Tea will try and use mode 2026 to push updates to the terminal. This mode helps reduce tearing and cursor flickering by atomically updating the terminal window once all the update sequences are pushed out and read by the terminal. This is enabled by default and there's nothing you need to do.
Better Terminal Unicode Support (mode 2027)
Now Bubble Tea will automatically enable mode 2027
on terminals that support it. This mode allows the terminal to properly handle wide Unicode
characters and emojis without breaking the layout of your app. Again, this is
enabled by default and there's nothing you need to do.
Native Clipboard Support
Bubble Tea now supports native clipboard operations, also known as OSC52. This means you can even copy and paste over SSH!
X11 and Wayland users can also use
tea.SetPrimaryClipboardto set the primary clipboard. Note that this is a very niche sort of thing and may or may not work on macOS, Windows, and other platforms without the notion of more than one clipboard.Terminal Colors
You can now read and set the terminal's foreground, background, and cursor colors. To change them, set
view.ForegroundColor,view.BackgroundColor, andview.Cursor.Colorin yourView()function.🌍 Environment Variables
Bubble Tea now sends you a
tea.EnvMsgat startup with the environment variables. This is especially handy for SSH apps whereos.Getenvwould give you the server's environment, not the client's.🔮 Raw Escape Sequences
For the power users out there, you can now send raw escape sequences directly to the terminal with
tea.Raw. This is great for querying terminal capabilities or doing things Bubble Tea doesn't have a built-in for (yet).Responses from the terminal will come back as messages in
Update. Just be sure you know what you're doing — with great power comes great terminal weirdness.📍 Cursor Position Queries
Need to know where the cursor is? Now you can ask.
📊 Terminal Mode Reports
You can query whether the terminal supports specific modes (like focus events or synchronized output) using DECRPM mode reports. Send a raw DECRQM request and listen for
tea.ModeReportMsg.Terminal Version and Name
Don't know what terminal you're running in?
$TERMis too vague? Bubble Tea now has atea.RequestTerminalVersioncommand that queries the terminal for its name and version using the XTVERSION escape sequence.Terminfo and Termcap Capabilities
Sometimes you need to know what capabilities the terminal has. Bubble Tea now has a
tea.RequestCapabilitycommand that queries the terminal for a specific terminfo/termcap capability.Detecting the Color Profile
Need to use the detected color profile in your app? Listen to
tea.ColorProfileMsginUpdate:Manually Applying a Color Profile
Want to manually set a color profile for testing? Now you can, on the program level.
Want to hard detect the color profile in Wish? We bet you do.
🪟 Window Size for Testing
When running tests or in non-interactive environments, you can now set the initial terminal size:
No more mocking terminals just to run your tests. Nice!
Use the Terminal's TTY
Sometimes your program will write to stdout while it's being piped or
redirected. In these cases, you might want to write directly to the terminal's
TTY instead of stdout because stdout might not be a terminal. Or your program
expects to read from stdin but stdin is being piped from another program.
In Bubble Tea v1, there wasn't a good way to do this. In the latter case, you
could use the
WithInputTTY()option to read from the terminal's TTY insteadof stdin. However, there was no easy way to write to the terminal's TTY instead
of stdout without fiddling with file descriptors.
In Bubble Tea v2, you can now simply use the global
OpenTTY()to open theterminal's TTY for reading and writing. You can then pass the TTY file handles
to the
WithInput()andWithOutput()options.Note that Bubble Tea v2 will always use the TTY for input when input is not specified
via
WithInput(...).Changelog
New!
Fixed
Docs
Other stuff
🌈 More on Bubble Tea v2
Ready to migrate? Head over to the Upgrade Guide for the full migration checklist.
Feedback
Have thoughts on Bubble Tea v2? We'd love to hear about it. Let us know on…
Part of Charm.
Charm热爱开源 • Charm loves open source • نحنُ نحب المصادر المفتوحة
v1.3.10Compare Source
Changelog
Bug fixes
9edf69c: fix: handle setWindowTitleMsg and windowSizeMsg in eventLoop (@aymanbagabas)Thoughts? Questions? We love hearing from you. Feel free to reach out on X, Discord, Slack, The Fediverse, Bluesky.
v1.3.9Compare Source
Changelog
New Features
314b50c: feat: properly call nested sequenceMsg and batchMsg (@wolfmagnate)Bug fixes
9e0e8f0: fix: recover from nested panics in Sequence and Batch commands (@aymanbagabas)Other work
6e1282a: add example for the nested Sequence and Batch (@wolfmagnate)0290af4: simplify case for BatchMsg (@wolfmagnate)Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, Discord, Slack, The Fediverse.
v1.3.8Compare Source
Changelog
Bug fixes
21eecd5: fix: send batch commands to cmds channel instead of executing them in event loop (#1473) (@aymanbagabas)Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, Discord, Slack, The Fediverse.
v1.3.7Compare Source
Changelog
Bug fixes
28ab4f4: fix(renderer): properly reset cursor position to start of line (#1472) (@aymanbagabas)c76509a: fix: compact sequences like batches (#958) (@jdhenke)f5da8d0: fix: handle nested SequenceMsg in event loop and use sync.WaitGroup f… (#1463) (@aymanbagabas)80ea844: fix: lint issues in key_windows.go and tty_windows.go (@aymanbagabas)Documentation updates
c3136ed: docs(license): update copyright date range (@meowgorithm)919805f: docs(readme): update footer art (@meowgorithm)f01583b: docs: show the correct branch in the build badge (@aymanbagabas)Other work
a81d6f3: ci: sync dependabot config (#1480) (@charmcli)53609c1: ci: sync golangci-lint config (#1466) (@github-actions[bot])Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, Discord, Slack, The Fediverse.
v1.3.6Compare Source
This version fixes some important issues regarding
tea.Execoutput after resuming from the executed program, and Windows losing input character on successive program execution.Big thanks to @raphaelvigee and @joshallenit for working on these issues, you're the best!
Changelog
Bug fixes
0a63003: fix: Windows: first character input lost on successive programs (#1368) (@joshallenit)78ed49b: fix: maintain exec output (#1276) (@raphaelvigee)Documentation updates
1b0f489: docs(readme): cleanup badges (@meowgorithm)Other work
ca9473b: ci: sync golangci-lint config (#1431) (@github-actions[bot])Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, The Fediverse, or on Discord.
v1.3.5Compare Source
This release fixes an important bug on Windows where function keys (F1..F20) don't get recognized and sent to the program. It also fixes multiple concurrency bugs related to using external context and p.Wait() and p.Kill().
Also, huge thank you to @desertwitch who went in and just crushed a handful of deadlocks.
Happy hacking!
Changelog
Bug fixes
62ca063: fix(key): windows: recognize function keys on Windows (#1405) (@aymanbagabas)0f9cd5b: fix(panics): fix race condition and false nil error return (@desertwitch)a79ab3f: fix(tests): account for multiple p.Wait() (@desertwitch)1b5fc27: fix: prevent deadlock on ctx cancel during msg processing (@desertwitch)aa7a240: fix: release p.Wait() on p.Kill() to prevent external deadlocks (@desertwitch)1923181: fix: report only external ctx cancel as ctx error (@desertwitch)c56f776: fix: resolve race conditions caused by p.Kill() (@desertwitch)Documentation updates
3797acb: docs(readme): fix header image mis-caching (@meowgorithm)8508131: docs(readme): header art adjustments (@meowgorithm)b3150e1: docs(readme): update header art (@meowgorithm)Other work
b224818: ci(lint): fix all lint issues onmain(#1342) (@andreynering)1a0062b: ci: fix lint issues (@andreynering)d0c4b65: ci: fix linting on windows-only files (#1361) (@andreynering)0b18d1f: ci: sync dependabot config (#1403) (@charmcli)0e49efb: ci: sync golangci-lint config (#1354) (@github-actions[bot])a46d16d: ci: sync golangci-lint config (#1379) (@github-actions[bot])5a360c9: ci: sync golangci-lint config (#1394) (@github-actions[bot])Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, The Fediverse, or on Discord.
v1.3.4Compare Source
This release fixes an issue on Windows where the mouse is always enabled even if it wasn't requested. Now, using mouse options such as
tea.WithAllMouseMotion()and commands such astea.EnableMouseAllMotionandtea.DisableMouseturns the mouse on/off as expected.Changelog
New Features
e817654: feat(ci): move from goveralls to codecov (#1332) (@aymanbagabas)Bug fixes
bf1216d: fix: windows: enable mouse mode on demand (#1340) (@aymanbagabas)Other work
00e3ef4: ci: sync dependabot config (#1328) (@charmcli)4a30f3f: ci: sync dependabot config (#1329) (@charmcli)Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, The Fediverse, or on Discord.
v1.3.3Compare Source
This release restore the program options that were deprecated in the previous releases.
Changelog
Full Changelog: charmbracelet/bubbletea@v1.3.2...v1.3.3
Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, The Fediverse, or on Discord.
v1.3.2Compare Source
Fix canceling terminal input reads on Windows.
Changelog
Bug fixes
b0186ad: fix: windows: handle cancel io error (@aymanbagabas)Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, The Fediverse, or on Discord.
v1.3.1Compare Source
This release introduces some important bug fixes when it comes to cursor movements while rendering, and properly handle Windows AltGr key on non-English keyboards.
Changelog
Bug fixes
771a101: fix: renderer: use newline instead of cud1 to move cursor down (#1323) (@aymanbagabas)c66daf9: fix: windows: AltGr maps to LEFT_CTRL+RIGHT_ALT (#1162) (@aymanbagabas)Other work
439398b: Remove irrelevant option comments (@nervo)Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, The Fediverse, or on Discord.
v1.3.0Compare Source
Sorry to interrupt: it's time for Bubble Tea v1.3.0!
Bubble Tea now ships with refined interrupt handling, courtesy @caarlos0. Now, you can throw your terminal a ctrl+c or an interrupt signal, Bubble Tea will take it with grace and poise. Switch any ol’ run-of-the-mill
tea.Quitcommand withtea.Interruptfor seamless interruptions.Bug Fixes
2556e01: The last rendered line count now includes those sneaky alt screen lines, thanks to @semihbkgr's keen eye (#1254)c8d6005: Windows users rejoice! @awoodbeck has managed to cancel those unruly threads like an expert party planner usingCancelIoEx(#1305)New Contributors
Special thanks to the following new contributors:
Changelog
New Features
Bug fixes
Documentation updates
Other work
Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, The Fediverse, or on Discord.
v1.2.4Compare Source
A few little rendering fixes
This release fixes a couple rendering bugs. Quality rendering in Bubble Tea is paramount!
Changelog
Bug fixes
4ad0792: fix: cursor position adjustment after exiting alt screen (#1241) (@semihbkgr)ede8caa: fix: renderer: keep a separate count of lines rendered in the alt screen (@aymanbagabas)Other work
76b0f81: ci: fix goreleaser config (#1238) (@caarlos0)Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, The Fediverse, or on Discord.
v1.2.3Compare Source
Altscreen-not-altscreen
This release fixes a sneaky longstanding bug in the renderer where mis-paints could happen when toggling in and out of the altscreen if the height of the TUI changed whilst in the altscreen. Special thanks to @applejag for reporting the issue and @semihbkgr for the fix.
Changelog
f8f840c: fix: cursor position adjustment after exiting alt screen (#1241) (@semihbkgr)Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, The Fediverse, or on Discord.
v1.2.2Compare Source
Hi! This release fixes some bugs found the fast new renderer introduced in v1.2.0. Happy rendering!
Fixed
New Contributors
Full Changelog: charmbracelet/bubbletea@v1.2.0...v1.2.2
Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, The Fediverse, or on Discord.
v1.2.1Compare Source
v1.2.0Compare Source
It’s performance boost time
Sometimes you have to take matters into your own hands. That’s exactly what @LeperGnome did when he wanted faster rendering. This release features adjustments to the rendering algorithm for faster repaints. We encourage you to upgrade and give it a go!
Changelog
New Contributors
Full Changelog: charmbracelet/bubbletea@v1.1.2...v1.2.0
Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, The Fediverse, or on Discord.
v1.1.2Compare Source
This and that
A tiny tiny release that fixes the tests on Windows, and uses the latest
ansipackage definitions.Changelog
Details
New Features
Bug fixes
Documentation updates
Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, The Fediverse, or on Discord.
v1.1.1Compare Source
Don't panic!
Panicking is a part of life…and a part of workin’ in Go. This release addresses two edge cases where a
panic()could tank Bubble Tea and break your terminal:Panics outside of Bubble Tea
If a panic occurs outside of Bubble Tea you can use
Program.Killto restore the terminal state before exiting:Panics in Cmds
If a panic occurs in a
CmdBubble Tea will now automatically restore the terminal to its naConfiguration
📅 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.