Skip to content

fix(deps): update module github.com/charmbracelet/bubbletea to v0.27.0#87

Merged
Clivern merged 1 commit intomainfrom
renovate/github.com-charmbracelet-bubbletea-0.x
Aug 16, 2024
Merged

fix(deps): update module github.com/charmbracelet/bubbletea to v0.27.0#87
Clivern merged 1 commit intomainfrom
renovate/github.com-charmbracelet-bubbletea-0.x

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate bot commented Aug 16, 2024

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
github.com/charmbracelet/bubbletea v0.26.6 -> v0.27.0 age adoption passing confidence

Release Notes

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

v0.27.0

Compare Source

Suspending, environments, and more

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
	}

	// ...
}

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

Example

Setting the environment

When Bubble Tea is behind Wish you may have needed to modify the environment. Now you can with the all new tea.WithEnvironment.

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

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 was generated by Mend Renovate. View the repository job log.

@renovate
Copy link
Copy Markdown
Contributor Author

renovate bot commented Aug 16, 2024

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

  • 3 additional dependencies were updated

Details:

Package Change
github.com/charmbracelet/x/ansi v0.1.2 -> v0.1.4
golang.org/x/sync v0.7.0 -> v0.8.0
golang.org/x/sys v0.21.0 -> v0.24.0

@renovate renovate bot requested a review from Clivern as a code owner August 16, 2024 18:31
@Clivern Clivern merged commit c96b3f0 into main Aug 16, 2024
@Clivern Clivern deleted the renovate/github.com-charmbracelet-bubbletea-0.x branch August 16, 2024 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant