Update module github.com/charmbracelet/bubbletea to v1 - autoclosed #48

Closed
abs3nt wants to merge 1 commits from renovate/github.com-charmbracelet-bubbletea-1.x into main
Owner

This PR contains the following updates:

Package Type Update Change
github.com/charmbracelet/bubbletea require major v0.26.6 -> v1.2.4

Release Notes

charmbracelet/bubbletea (github.com/charmbracelet/bubbletea)

v1.2.4

Compare Source

Changelog

Bug fixes
Other work

The Charm logo

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

v1.2.3

Compare 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


The Charm logo

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

v1.2.2

Compare Source

Hi! This release fixes some bugs found the fast new renderer introduced in v1.2.0. Happy rendering!

Fixed

New Contributors

Full Changelog: https://github.com/charmbracelet/bubbletea/compare/v1.2.0...v1.2.2


The Charm logo

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

v1.2.1

Compare Source

v1.2.0

Compare 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!

!NOTE]
Renderer changes are no laughing matter. We’ve tested the new renderer extensively, however if you notice any bugs let us know. Rendering accuracy is among our top priorities.

Changelog

New Contributors

Full Changelog: https://github.com/charmbracelet/bubbletea/compare/v1.1.2...v1.2.0


The Charm logo

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

v1.1.2

Compare Source

This and that

A tiny tiny release that fixes the tests on Windows, and uses the latest ansi package definitions.

Changelog

New Features
  • 12b04c5d6001056875bc712f81fa1efd470fa592: feat(ci): use meta lint workflow (@​aymanbagabas)
  • 3209d62ae751da63a38237666d6706ab7c9f0006: feat(ci): use meta lint-sync workflow to sync linter config (@​aymanbagabas)
Bug fixes
  • 566879aa33ce13f27a6bdab4a274e08be01bac9c: fix(ci): run lint workflow on all platforms (@​aymanbagabas)
  • cd1e4d34a7e0232ea94afcc168eec107450aa332: fix: exec tests on windows (@​aymanbagabas)
Documentation updates
  • d928d8dcabcd4bca0efc22fb661de0cc27c66b21: docs: update contributing guidelines (#​1186) (@​bashbunni)
  • de4788dc763d5a6ce7ca555c5ee6fce3179dedc4: docs: update readme badge images (@​aymanbagabas)

The Charm logo

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

v1.1.1

Compare 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.Kill to restore the terminal state before exiting:

func main() {
	p := tea.NewProgram(model{})

	go func() {
		time.Sleep(3 * time.Second)
		defer p.Kill()
		panic("Urgh")
	}()

	if _, err := p.Run(); err != nil {
		log.Fatal(err)
	}
}

Panics in Cmds

If a panic occurs in a Cmd Bubble Tea will now automatically restore the terminal to its natural state before exiting.

type model struct{}

// This command will totally panic.
func pancikyCmd() tea.Msg {
	panic("Oh no! Jk.")
}

func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
	switch msg := msg.(type) {
	case tea.KeyMsg:
		switch msg.String() {
		case "enter":
			// Panic time! But everything will be OK.
			return m, pancikyCmd
		}
	}
	return m, nil
}

Happy panicking (if that makes any sense).

Changelog

Fixed!

The Charm logo

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

v1.1.0

Compare Source

Let’s focus

Lose focus much? This release contains support for focus-blur window events.

Usage

All you need to do is to add the program option to your application:

p := tea.NewProgram(model{}, tea.WithReportFocus())
if _, err := p.Run(); err != nil {
	fmt.Fprintln(os.Stderr, "Oof:", err)
	os.Exit(1)
}

Then later in your Update function, you can listen for focus-blur messages:

func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
	switch msg := msg.(type) {
	case tea.FocusMsg:
		// Focused!
	case tea.BlurMsg:
		// Not focused :(
        }
        return m, nil
}

For details, see WithReportFocus.

Tmux

If you're using tmux, make sure you enable the focus-events option in your config.

set-option -g focus-events on

Happy focusing (whatever that means)!


The Charm logo

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

v1.0.1

Compare Source

This release that fixes the way carriage returns are handled with using the WithoutRenderer ProgramOption and improves the way it works overall by not altering the terminal the way we normally do when starting a Program. For details see #​1120.


The Charm logo

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

v1.0.0

Compare Source

At last: v1.0.0

This is an honorary release denoting that Bubble Tea is now stable. Thank you, open source community, for all your love, support, and great taste in beverage over the past four years.

Stay tuned for v2: we have some great things coming.


The Charm logo

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

v0.27.1

Compare Source

This is a lil’ workaround for a hang that can occur when starting a program using Lip Gloss. For details see https://github.com/charmbracelet/bubbletea/pull/1107.

Changelog

Bug fixes

The Charm logo

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

v0.27.0

Compare Source

Suspending, environment hacking, and more

Hi! This release has three nice little features and some bug fixes. Let's take a look:

Suspending and resuming

At last, now you can programmatically suspend and resume programs with the tea.Suspend command and handle resumes with the tea.ResumeMsg message:

func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
	switch msg := msg.(type) {

	// Suspend with ctrl+z!
	case tea.KeyMsg:
		switch msg.String() {
		case "ctrl+z":
			m.suspended = true
			return m, tea.Suspend
		}

	// Handle resumes
	case tea.ResumeMsg:
		m.suspended = false
		return m, nil
	}

	// ...
}

Example

There's also a tea.SuspendMsg that flows through Update on suspension.

Special thanks to @​knz for prototyping the original implementation of this.

Setting the environment

When Bubble Tea is behind Wish you may have needed to pass environment variables from the remote session to the Program. Now you can with the all new tea.WithEnvironment:

var sess ssh.Session // ssh.Session is a type from the github.com/charmbracelet/ssh package
pty, _, _ := sess.Pty()
environ := append(sess.Environ(), "TERM="+pty.Term)
p := tea.NewProgram(model, tea.WithEnvironment(environ)

Requesting the window dimensions

All the Bubble Tea pros know that you get a tea.WindowSizeMsg when the Program starts and when the window resizes. Now you can just query it on demand too with the tea.WindowSize command.

Changelog

New!
Fixed

The Charm logo

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


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.


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

This PR has been generated by Renovate Bot.

This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github.com/charmbracelet/bubbletea](https://github.com/charmbracelet/bubbletea) | require | major | `v0.26.6` -> `v1.2.4` | --- ### Release Notes <details> <summary>charmbracelet/bubbletea (github.com/charmbracelet/bubbletea)</summary> ### [`v1.2.4`](https://github.com/charmbracelet/bubbletea/releases/tag/v1.2.4) [Compare Source](https://github.com/charmbracelet/bubbletea/compare/v1.2.3...v1.2.4) #### Changelog ##### Bug fixes - [`4ad0792`](https://github.com/charmbracelet/bubbletea/commit/4ad07926d7ff00bc21a05b2536d82a7cc629225e): fix: cursor position adjustment after exiting alt screen ([#&#8203;1241](https://github.com/charmbracelet/bubbletea/issues/1241)) ([@&#8203;semihbkgr](https://github.com/semihbkgr)) - [`ede8caa`](https://github.com/charmbracelet/bubbletea/commit/ede8caa9d4f588a4a2c744d8e135a1b444bf2ce9): fix: renderer: keep a separate count of lines rendered in the alt screen ([@&#8203;aymanbagabas](https://github.com/aymanbagabas)) ##### Other work - [`76b0f81`](https://github.com/charmbracelet/bubbletea/commit/76b0f818b3174a3e9b77f93c19820d07855f13f4): ci: fix goreleaser config ([#&#8203;1238](https://github.com/charmbracelet/bubbletea/issues/1238)) ([@&#8203;caarlos0](https://github.com/caarlos0)) *** <a href="https://charm.sh/"><img alt="The Charm logo" src="https://stuff.charm.sh/charm-badge.jpg" width="400"></a> Thoughts? Questions? We love hearing from you. Feel free to reach out on [Twitter](https://twitter.com/charmcli), [The Fediverse](https://mastodon.technology/@&#8203;charm), or on [Discord](https://charm.sh/chat). ### [`v1.2.3`](https://github.com/charmbracelet/bubbletea/releases/tag/v1.2.3) [Compare Source](https://github.com/charmbracelet/bubbletea/compare/v1.2.2...v1.2.3) ### 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 [@&#8203;applejag](https://github.com/applejag) for reporting the issue and [@&#8203;semihbkgr](https://github.com/semihbkgr) for the fix. #### Changelog - [`f8f840c`](https://github.com/charmbracelet/bubbletea/commit/f8f840c38a36140fe890a02c6b35589f15a85ff5): fix: cursor position adjustment after exiting alt screen ([#&#8203;1241](https://github.com/charmbracelet/bubbletea/issues/1241)) ([@&#8203;semihbkgr](https://github.com/semihbkgr)) *** <a href="https://charm.sh/"><img alt="The Charm logo" src="https://stuff.charm.sh/charm-badge.jpg" width="400"></a> Thoughts? Questions? We love hearing from you. Feel free to reach out on [Twitter](https://twitter.com/charmcli), [The Fediverse](https://mastodon.technology/@&#8203;charm), or on [Discord](https://charm.sh/chat). ### [`v1.2.2`](https://github.com/charmbracelet/bubbletea/releases/tag/v1.2.2) [Compare Source](https://github.com/charmbracelet/bubbletea/compare/v1.2.1...v1.2.2) Hi! This release fixes some bugs found the fast new renderer introduced in [v1.2.0](https://github.com/charmbracelet/bubbletea/releases/tag/v1.2.0). Happy rendering! #### Fixed - Incorrect line skipping in renderer flush by [@&#8203;semihbkgr](https://github.com/semihbkgr) in https://github.com/charmbracelet/bubbletea/pull/1233 - Erase the rest of the line when it's shorter than the width by [@&#8203;aymanbagabas](https://github.com/aymanbagabas) in https://github.com/charmbracelet/bubbletea/pull/1227 #### New Contributors - [@&#8203;semihbkgr](https://github.com/semihbkgr) made their first contribution in https://github.com/charmbracelet/bubbletea/pull/1233 **Full Changelog**: https://github.com/charmbracelet/bubbletea/compare/v1.2.0...v1.2.2 *** <a href="https://charm.sh/"><img alt="The Charm logo" src="https://stuff.charm.sh/charm-badge.jpg" width="400"></a> Thoughts? Questions? We love hearing from you. Feel free to reach out on [Twitter](https://twitter.com/charmcli), [The Fediverse](https://mastodon.technology/@&#8203;charm), or on [Discord](https://charm.sh/chat). ### [`v1.2.1`](https://github.com/charmbracelet/bubbletea/compare/v1.2.0...v1.2.1) [Compare Source](https://github.com/charmbracelet/bubbletea/compare/v1.2.0...v1.2.1) ### [`v1.2.0`](https://github.com/charmbracelet/bubbletea/releases/tag/v1.2.0) [Compare Source](https://github.com/charmbracelet/bubbletea/compare/v1.1.2...v1.2.0) ### It’s performance boost time Sometimes you have to take matters into your own hands. That’s exactly what [@&#8203;LeperGnome](https://github.com/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! > \[!NOTE] > Renderer changes are no laughing matter. We’ve tested the new renderer extensively, however if you notice any bugs let us know. Rendering accuracy is among our top priorities. #### Changelog - rendering speed improvements by [@&#8203;LeperGnome](https://github.com/LeperGnome) in https://github.com/charmbracelet/bubbletea/pull/1132 #### New Contributors - [@&#8203;LeperGnome](https://github.com/LeperGnome) made their first contribution in https://github.com/charmbracelet/bubbletea/pull/1132 **Full Changelog**: https://github.com/charmbracelet/bubbletea/compare/v1.1.2...v1.2.0 *** <a href="https://charm.sh/"><img alt="The Charm logo" src="https://stuff.charm.sh/charm-badge.jpg" width="400"></a> Thoughts? Questions? We love hearing from you. Feel free to reach out on [Twitter](https://twitter.com/charmcli), [The Fediverse](https://mastodon.technology/@&#8203;charm), or on [Discord](https://charm.sh/chat). ### [`v1.1.2`](https://github.com/charmbracelet/bubbletea/releases/tag/v1.1.2) [Compare Source](https://github.com/charmbracelet/bubbletea/compare/v1.1.1...v1.1.2) ### This and that A tiny tiny release that fixes the tests on Windows, and uses the latest `ansi` package definitions. <summary> #### Changelog </summary> <details> ##### New Features * 12b04c5d6001056875bc712f81fa1efd470fa592: feat(ci): use meta lint workflow (@&#8203;aymanbagabas) * 3209d62ae751da63a38237666d6706ab7c9f0006: feat(ci): use meta lint-sync workflow to sync linter config (@&#8203;aymanbagabas) ##### Bug fixes * 566879aa33ce13f27a6bdab4a274e08be01bac9c: fix(ci): run lint workflow on all platforms (@&#8203;aymanbagabas) * cd1e4d34a7e0232ea94afcc168eec107450aa332: fix: exec tests on windows (@&#8203;aymanbagabas) ##### Documentation updates * d928d8dcabcd4bca0efc22fb661de0cc27c66b21: docs: update contributing guidelines (#&#8203;1186) (@&#8203;bashbunni) * de4788dc763d5a6ce7ca555c5ee6fce3179dedc4: docs: update readme badge images (@&#8203;aymanbagabas) </details> *** <a href="https://charm.sh/"><img alt="The Charm logo" src="https://stuff.charm.sh/charm-badge.jpg" width="400"></a> Thoughts? Questions? We love hearing from you. Feel free to reach out on [Twitter](https://twitter.com/charmcli), [The Fediverse](https://mastodon.technology/@&#8203;charm), or on [Discord](https://charm.sh/chat). ### [`v1.1.1`](https://github.com/charmbracelet/bubbletea/releases/tag/v1.1.1) [Compare Source](https://github.com/charmbracelet/bubbletea/compare/v1.1.0...v1.1.1) ### 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.Kill`](https://pkg.go.dev/github.com/charmbracelet/bubbletea#Program.Kill) to restore the terminal state before exiting: ```go func main() { p := tea.NewProgram(model{}) go func() { time.Sleep(3 * time.Second) defer p.Kill() panic("Urgh") }() if _, err := p.Run(); err != nil { log.Fatal(err) } } ``` #### Panics in Cmds If a panic occurs in a `Cmd` Bubble Tea will now automatically restore the terminal to its natural state before exiting. ```go type model struct{} // This command will totally panic. func pancikyCmd() tea.Msg { panic("Oh no! Jk.") } func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { switch msg := msg.(type) { case tea.KeyMsg: switch msg.String() { case "enter": // Panic time! But everything will be OK. return m, pancikyCmd } } return m, nil } ``` Happy panicking (if that makes any sense). #### Changelog ##### Fixed! - [`0589921`](https://github.com/charmbracelet/bubbletea/commit/0589921d2e5a1ee33e0dba1d54836946e78fe059): fix: recover from panics within cmds ([@&#8203;aymanbagabas](https://github.com/aymanbagabas)) - [`6e71f52`](https://github.com/charmbracelet/bubbletea/commit/6e71f52a8add0fdeba202d4e1bdd289182b156ac): fix: restore the terminal on kill ([@&#8203;aymanbagabas](https://github.com/aymanbagabas)) *** <a href="https://charm.sh/"><img alt="The Charm logo" src="https://stuff.charm.sh/charm-badge.jpg" width="400"></a> Thoughts? Questions? We love hearing from you. Feel free to reach out on [Twitter](https://twitter.com/charmcli), [The Fediverse](https://mastodon.technology/@&#8203;charm), or on [Discord](https://charm.sh/chat). ### [`v1.1.0`](https://github.com/charmbracelet/bubbletea/releases/tag/v1.1.0) [Compare Source](https://github.com/charmbracelet/bubbletea/compare/v1.0.1...v1.1.0) ### Let’s focus Lose focus much? This release contains support for focus-blur window events. #### Usage All you need to do is to add the program option to your application: ```go p := tea.NewProgram(model{}, tea.WithReportFocus()) if _, err := p.Run(); err != nil { fmt.Fprintln(os.Stderr, "Oof:", err) os.Exit(1) } ``` Then later in your `Update` function, you can listen for focus-blur messages: ```go func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { switch msg := msg.(type) { case tea.FocusMsg: // Focused! case tea.BlurMsg: // Not focused :( } return m, nil } ``` For details, see [WithReportFocus](https://pkg.go.dev/github.com/charmbracelet/bubbletea#WithReportFocus). #### Tmux If you're using `tmux`, make sure you enable the `focus-events` option in your config. ```config set-option -g focus-events on ``` Happy focusing (whatever that means)! *** <a href="https://charm.sh/"><img alt="The Charm logo" src="https://stuff.charm.sh/charm-badge.jpg" width="400"></a> Thoughts? Questions? We love hearing from you. Feel free to reach out on [Twitter](https://twitter.com/charmcli), [The Fediverse](https://mastodon.technology/@&#8203;charm), or on [Discord](https://charm.sh/chat). ### [`v1.0.1`](https://github.com/charmbracelet/bubbletea/releases/tag/v1.0.1) [Compare Source](https://github.com/charmbracelet/bubbletea/compare/v1.0.0...v1.0.1) This release that fixes the way carriage returns are handled with using the [WithoutRenderer](https://pkg.go.dev/github.com/charmbracelet/bubbletea#WithoutRenderer) `ProgramOption` and improves the way it works overall by not altering the terminal the way we normally do when starting a `Program`. For details see [#&#8203;1120](https://github.com/charmbracelet/bubbletea/issues/1120). - [`c69bd97`](https://github.com/charmbracelet/bubbletea/commit/c69bd971e65f6774aaa0347df035c8f1f3f36275): fix: we don't initialize the terminal when using a nilRenderer ([#&#8203;1120](https://github.com/charmbracelet/bubbletea/issues/1120)) ([@&#8203;aymanbagabas](https://github.com/aymanbagabas)) *** <a href="https://charm.sh/"><img alt="The Charm logo" src="https://stuff.charm.sh/charm-badge.jpg" width="400"></a> Thoughts? Questions? We love hearing from you. Feel free to reach out on [Twitter](https://twitter.com/charmcli), [The Fediverse](https://mastodon.technology/@&#8203;charm), or on [Discord](https://charm.sh/chat). ### [`v1.0.0`](https://github.com/charmbracelet/bubbletea/releases/tag/v1.0.0) [Compare Source](https://github.com/charmbracelet/bubbletea/compare/v0.27.1...v1.0.0) ### At last: v1.0.0 <p><img src="https://github.com/user-attachments/assets/880437d6-da9b-4881-9033-5ce22dc93c82" width="540"</p> This is an honorary release denoting that Bubble Tea is now stable. Thank you, open source community, for all your love, support, and great taste in beverage over the past four years. Stay tuned for v2: we have some great things coming. *** <a href="https://charm.sh/"><img alt="The Charm logo" src="https://stuff.charm.sh/charm-badge.jpg" width="400"></a> Thoughts? Questions? We love hearing from you. Feel free to reach out on [Twitter](https://twitter.com/charmcli), [The Fediverse](https://mastodon.technology/@&#8203;charm), or on [Discord](https://charm.sh/chat). ### [`v0.27.1`](https://github.com/charmbracelet/bubbletea/releases/tag/v0.27.1) [Compare Source](https://github.com/charmbracelet/bubbletea/compare/v0.27.0...v0.27.1) This is a lil’ workaround for a hang that can occur when starting a program using Lip Gloss. For details see https://github.com/charmbracelet/bubbletea/pull/1107. #### Changelog ##### Bug fixes - [`d6458e0`](https://github.com/charmbracelet/bubbletea/commit/d6458e03f27245a597a30234a532ef345af31d36): fix: force query the terminal bg before running any programs ([@&#8203;aymanbagabas](https://github.com/aymanbagabas)) *** <a href="https://charm.sh/"><img alt="The Charm logo" src="https://stuff.charm.sh/charm-badge.jpg" width="400"></a> Thoughts? Questions? We love hearing from you. Feel free to reach out on [Twitter](https://twitter.com/charmcli), [The Fediverse](https://mastodon.technology/@&#8203;charm), or on [Discord](https://charm.sh/chat). ### [`v0.27.0`](https://github.com/charmbracelet/bubbletea/releases/tag/v0.27.0) [Compare Source](https://github.com/charmbracelet/bubbletea/compare/v0.26.6...v0.27.0) ### Suspending, environment hacking, and more Hi! This release has three nice little features and some bug fixes. Let's take a look: #### Suspending and resuming At last, now you can programmatically suspend and resume programs with the [`tea.Suspend`](https://pkg.go.dev/github.com/charmbracelet/bubbletea#Suspend) command and handle resumes with the [`tea.ResumeMsg`](https://pkg.go.dev/github.com/charmbracelet/bubbletea#ResumeMsg) message: ```go func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { switch msg := msg.(type) { // Suspend with ctrl+z! case tea.KeyMsg: switch msg.String() { case "ctrl+z": m.suspended = true return m, tea.Suspend } // Handle resumes case tea.ResumeMsg: m.suspended = false return m, nil } // ... } ``` [Example](https://github.com/charmbracelet/bubbletea/blob/d6a19f0eb5a983610bd65a1647f5955abe3ee69e/examples/suspend/main.go) There's also a [`tea.SuspendMsg`](https://pkg.go.dev/github.com/charmbracelet/bubbletea#SuspendMsg) that flows through `Update` on suspension. Special thanks to [@&#8203;knz](https://github.com/knz) for prototyping the original implementation of this. #### Setting the environment When Bubble Tea is behind [Wish](https://github.com/charmbracelet/wish) you may have needed to pass environment variables from the remote session to the `Program`. Now you can with the all new [tea.WithEnvironment](https://pkg.go.dev/github.com/charmbracelet/bubbletea#WithEnvironment): ```go var sess ssh.Session // ssh.Session is a type from the github.com/charmbracelet/ssh package pty, _, _ := sess.Pty() environ := append(sess.Environ(), "TERM="+pty.Term) p := tea.NewProgram(model, tea.WithEnvironment(environ) ``` #### Requesting the window dimensions All the Bubble Tea pros know that you get a `tea.WindowSizeMsg` when the `Program` starts and when the window resizes. Now you can just query it on demand too with the [`tea.WindowSize`](https://pkg.go.dev/github.com/charmbracelet/bubbletea#WindowSize) command. #### Changelog ##### New! - [`7d70838`](https://github.com/charmbracelet/bubbletea/commit/7d708384a105005dfbcec2290bfe4ea1d0e8d9f0): feat: add a cmd to request window size ([#&#8203;988](https://github.com/charmbracelet/bubbletea/issues/988)) ([@&#8203;aymanbagabas](https://github.com/aymanbagabas)) - [`ea13ffb`](https://github.com/charmbracelet/bubbletea/commit/ea13ffb9a18d0925491eeb580c66b4c6b2f4284f): feat: allow to suspend bubbletea programs ([#&#8203;1054](https://github.com/charmbracelet/bubbletea/issues/1054)) ([@&#8203;caarlos0](https://github.com/caarlos0)) - [`cae9acd`](https://github.com/charmbracelet/bubbletea/commit/cae9acdf7b37b5723078bae2eaa99ca14c6bcd05): feat: set the program environment variables ([#&#8203;1063](https://github.com/charmbracelet/bubbletea/issues/1063)) ([@&#8203;aymanbagabas](https://github.com/aymanbagabas)) ##### Fixed - [`7c1bfc0`](https://github.com/charmbracelet/bubbletea/commit/7c1bfc0e55e65bc6d52ec1e126d97ee45ddbeb08): query window-size in a goroutine ([#&#8203;1059](https://github.com/charmbracelet/bubbletea/issues/1059)) ([@&#8203;aymanbagabas](https://github.com/aymanbagabas)) - [`4497aa9`](https://github.com/charmbracelet/bubbletea/commit/4497aa9eef1ce78044d016782e9301dcb1b7c288): reset cursor position on renderer exit ([#&#8203;1058](https://github.com/charmbracelet/bubbletea/issues/1058)) ([@&#8203;aymanbagabas](https://github.com/aymanbagabas)) - [`d6a19f0`](https://github.com/charmbracelet/bubbletea/commit/d6a19f0eb5a983610bd65a1647f5955abe3ee69e): wrap `ErrProgramKilled` error ([@&#8203;aymanbagabas](https://github.com/aymanbagabas)) - [`4a9620e`](https://github.com/charmbracelet/bubbletea/commit/4a9620e7134978771059ff7b481b6c9a8c611ac3): fix bugs in package-manager example ([@&#8203;AkshayKalose](https://github.com/AkshayKalose)) *** <a href="https://charm.sh/"><img alt="The Charm logo" src="https://stuff.charm.sh/charm-badge.jpg" width="400"></a> Thoughts? Questions? We love hearing from you. Feel free to reach out on [Twitter](https://twitter.com/charmcli), [The Fediverse](https://mastodon.technology/@&#8203;charm), or on [Discord](https://charm.sh/chat). </details> --- ### 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. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC41Ni4zIiwidXBkYXRlZEluVmVyIjoiMzkuMjkuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->
abs3nt added 1 commit 2024-08-28 15:48:28 +00:00
Author
Owner

ℹ Artifact update notice

File name: go.mod

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):

  • 5 additional dependencies were updated

Details:

Package Change
github.com/charmbracelet/lipgloss v0.12.1 -> v1.0.0
golang.org/x/sync v0.7.0 -> v0.9.0
github.com/charmbracelet/x/ansi v0.1.4 -> v0.4.5
github.com/charmbracelet/x/term v0.1.1 -> v0.2.1
golang.org/x/sys v0.22.0 -> v0.27.0
### ℹ Artifact update notice ##### File name: go.mod 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): - 5 additional dependencies were updated Details: | **Package** | **Change** | | :---------------------------------- | :--------------------- | | `github.com/charmbracelet/lipgloss` | `v0.12.1` -> `v1.0.0` | | `golang.org/x/sync` | `v0.7.0` -> `v0.9.0` | | `github.com/charmbracelet/x/ansi` | `v0.1.4` -> `v0.4.5` | | `github.com/charmbracelet/x/term` | `v0.1.1` -> `v0.2.1` | | `golang.org/x/sys` | `v0.22.0` -> `v0.27.0` |
abs3nt force-pushed renovate/github.com-charmbracelet-bubbletea-1.x from 22d2d560a7 to 83c19fc59e 2024-08-29 17:48:21 +00:00 Compare
abs3nt force-pushed renovate/github.com-charmbracelet-bubbletea-1.x from 83c19fc59e to 475e30d3f9 2024-08-30 13:48:36 +00:00 Compare
abs3nt force-pushed renovate/github.com-charmbracelet-bubbletea-1.x from 475e30d3f9 to 81d82fe96f 2024-09-11 17:49:03 +00:00 Compare
abs3nt force-pushed renovate/github.com-charmbracelet-bubbletea-1.x from 81d82fe96f to 9c7790ad84 2024-10-24 18:49:16 +00:00 Compare
abs3nt force-pushed renovate/github.com-charmbracelet-bubbletea-1.x from 9c7790ad84 to 54d1fe1b16 2024-11-06 16:49:03 +00:00 Compare
abs3nt force-pushed renovate/github.com-charmbracelet-bubbletea-1.x from 54d1fe1b16 to 9def6d8e62 2024-11-08 17:48:26 +00:00 Compare
abs3nt force-pushed renovate/github.com-charmbracelet-bubbletea-1.x from 9def6d8e62 to c95e66f46a 2024-11-12 19:48:41 +00:00 Compare
abs3nt force-pushed renovate/github.com-charmbracelet-bubbletea-1.x from c95e66f46a to 9a7c44e93e 2024-11-19 22:48:32 +00:00 Compare
abs3nt force-pushed renovate/github.com-charmbracelet-bubbletea-1.x from 9a7c44e93e to a2bc73288f 2024-11-25 15:48:52 +00:00 Compare
abs3nt changed title from Update module github.com/charmbracelet/bubbletea to v1 to Update module github.com/charmbracelet/bubbletea to v1 - autoclosed 2024-12-05 09:48:42 +00:00
abs3nt closed this pull request 2024-12-05 09:48:42 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: abs3nt/gospt#48
No description provided.