Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update charmbracelet in go.mod #55

Merged
merged 3 commits into from
Jun 5, 2024
Merged

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jun 5, 2024

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
github.com/charmbracelet/huh v0.3.0 -> v0.4.2 age adoption passing confidence
github.com/charmbracelet/lipgloss v0.10.0 -> v0.11.0 age adoption passing confidence

Release Notes

charmbracelet/huh (github.com/charmbracelet/huh)

v0.4.2

Compare Source

Your favourite files 📁

Huh? v0.4.0 (v0.4.2) introduces the File Picker to forms ✨

Prompt users to select a file in just a few lines of code, you know the drill :)

var file string

huh.NewFilePicker().
    Title("Select a file:").
    Description("This will be your profile image.").
    AllowedTypes([]string{".png", ".jpeg", ".webp", ".gif"}).
    Value(&file)
Made with VHS

Field Interface

Zoom

File pickers introduce a new Zoom method to the Field interface.

type Field interface {

    // ...

    Zoom() bool

    // ...

}

Zoom tells the form whether this field should be the only visible field.

Notice how the FilePicker field zooms in when selecting a file and zooms out when the file is selected, showing only the selected file.

Skip

Notes introduce a new Skip method to the Field interface.

type Field interface {

    // ...

    Skip() bool

    // ...

}

Skip indicates to the form whether or not to skip this field, i.e. don't let the user interact with it. This is useful for notes to be purely informational.

What else?

Bug Fixes

New Contributors

A special thanks to everyone who made this release of Huh? possible! 🤗

Full Changelog: charmbracelet/huh@v0.3.0...v0.4.0


The Charm logo

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

v0.4.1

Compare Source

v0.4.0

Compare Source

charmbracelet/lipgloss (github.com/charmbracelet/lipgloss)

v0.11.0

Compare Source

Immutable Styles and Raw Speed, Baby

So! The big news in this release is:

  • Style methods will now always return new styles
  • Style and ANSI operations under the hood are faster

There are also a handful of great lil' bug fixes. Read on for more.

Immutable Styles

Every Style method now returns a completely new style with its own underlying data structure no matter what. This means working with Styles is a lot easier. No more need for Copy()!

// Before
s := lipgloss.NewStyle().Bold(true)
newStyle := s.Copy()

// After
s := lipgloss.NewStyle().Bold(true)
newStyle := s // this is a true copy

Okay, but why are styles easier to work with now? Consider this:

// Before
baseStyle := lipgloss.NewStyle().Background(lipgloss.Color("59"))
styleAtRuntime := baseStyle.Copy().Width(m.Width)

// After
baseStyle := lipgloss.NewStyle().Padding(1, 2)
styleAtRuntime := baseStyle.Width(m.Width)

It might seem small, but eliminating the risk of mutations in persistent styles in an enormous usability improvement.

How to upgrade

There's nothing to do, however Style.Copy() is now deprecated and only returns itself, so you can just remove Style.Copy() calls. If you need to just copy a style without any changes to it you can simply b := a.

Faster ANSI

Sometimes watch companies brag about their "in-house" watch movement. Well, now we're bragging about our in-house-amazing x/ansi library by our own @​aymanbagabas. It's a fine-tuned, low-level way to manage ANSI sequencing and, because we're pretty nerdy, we’re super excited about it.


What's Changed

New!
Changed
Fixed

New Contributors

Full Changelog: charmbracelet/lipgloss@v0.10.0...v0.11.0


The Charm logo

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


Configuration

📅 Schedule: Branch creation - "* */8 * * *" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


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

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot added the dependencies label Jun 5, 2024
@renovate renovate bot enabled auto-merge (squash) June 5, 2024 21:17
Copy link
Contributor Author

renovate bot commented Jun 5, 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):

  • 7 additional dependencies were updated

Details:

Package Change
github.com/charmbracelet/bubbles v0.17.2-0.20240108170749-ec883029c8e6 -> v0.18.0
github.com/charmbracelet/bubbletea v0.25.0 -> v0.26.3
golang.org/x/crypto v0.22.0 -> v0.23.0
golang.org/x/sync v0.6.0 -> v0.7.0
golang.org/x/sys v0.19.0 -> v0.20.0
golang.org/x/term v0.19.0 -> v0.20.0
golang.org/x/text v0.14.0 -> v0.15.0

Copy link

codecov bot commented Jun 5, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 68.95%. Comparing base (c07d0b8) to head (56b6f1b).

Files Patch % Lines
pkg/tui/printer.go 50.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main      #55   +/-   ##
=======================================
  Coverage   68.95%   68.95%           
=======================================
  Files          66       66           
  Lines        3466     3466           
=======================================
  Hits         2390     2390           
  Misses        951      951           
  Partials      125      125           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor Author

renovate bot commented Jun 5, 2024

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

⚠️ Warning: custom changes will be lost.

@renovate renovate bot merged commit f6d2480 into main Jun 5, 2024
8 of 9 checks passed
@renovate renovate bot deleted the renovate/charmbracelet branch June 5, 2024 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant