Repository navigation
fix(deps): update module github.com/charmbracelet/lipgloss to v2 - #10
renovate-appwrite[bot] wants to merge 1 commit into
Conversation
|
🟡 Tier B · Needs changes before merging
The dependency declaration now requests Lip Gloss v2.1.0. No source import or checksum files are changed in this update.
Fix with agent prompt### Issue 1
go.mod:7
**Use Lip Gloss v2's declared module and import paths**
Lip Gloss v2.0.6 declares its module path as `charm.land/lipgloss/v2`, so requiring it as `github.com/charmbracelet/lipgloss/v2` fails module path validation. The existing import in `theme.go` also still uses the pre-v2 `github.com/charmbracelet/lipgloss` path, which v2 does not provide; update the dependency and import together.
### Issue 2
go.mod:7
**Add the upgraded module checksums**
The existing `go.sum` has no entries for v2.0.6, and the reported `verify / build .` check fails because the `go.mod` checksum is missing. Please update `go.sum` with the upgraded module's checksums as part of this dependency change.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.📂 Walkthrough · 1
⏳ Still open from earlier reviews · 2Reviewed |
| require github.com/appwrite/sdk-for-go v0.0.1-rc.8 | ||
|
|
||
| require github.com/charmbracelet/lipgloss v0.12.1 | ||
| require github.com/charmbracelet/lipgloss/v2 v2.0.6 |
There was a problem hiding this comment.
Use Lip Gloss v2's declared module and import paths
Lip Gloss v2.0.6 declares its module path as charm.land/lipgloss/v2, so requiring it as github.com/charmbracelet/lipgloss/v2 fails module path validation. The existing import in theme.go also still uses the pre-v2 github.com/charmbracelet/lipgloss path, which v2 does not provide; update the dependency and import together.
Prompt To Fix With AI
This is a comment left during a code review.
Path: go.mod
Line: 7
Comment:
**Use Lip Gloss v2's declared module and import paths**
Lip Gloss v2.0.6 declares its module path as `charm.land/lipgloss/v2`, so requiring it as `github.com/charmbracelet/lipgloss/v2` fails module path validation. The existing import in `theme.go` also still uses the pre-v2 `github.com/charmbracelet/lipgloss` path, which v2 does not provide; update the dependency and import together.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.🟠 Major · bug · Reply if this doesn't apply.
| require github.com/appwrite/sdk-for-go v0.0.1-rc.8 | ||
|
|
||
| require github.com/charmbracelet/lipgloss v0.12.1 | ||
| require github.com/charmbracelet/lipgloss/v2 v2.0.6 |
There was a problem hiding this comment.
Add the upgraded module checksums
The existing go.sum has no entries for v2.0.6, and the reported verify / build . check fails because the go.mod checksum is missing. Please update go.sum with the upgraded module's checksums as part of this dependency change.
Prompt To Fix With AI
This is a comment left during a code review.
Path: go.mod
Line: 7
Comment:
**Add the upgraded module checksums**
The existing `go.sum` has no entries for v2.0.6, and the reported `verify / build .` check fails because the `go.mod` checksum is missing. Please update `go.sum` with the upgraded module's checksums as part of this dependency change.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.🟠 Major · bug · Reply if this doesn't apply.
922aa5c to
6cce4dd
Compare
This PR contains the following updates:
v0.12.1→v2.1.0Release Notes
charmbracelet/lipgloss (github.com/charmbracelet/lipgloss)
v2.1.0Compare Source
New table parameter and many fixes
Hi all! This release gives tables a new feature. They can now size themselves to their content and still respect a maximum width. It also comes with a big batch of fixes, many of them from first-time contributors. Let's go!
Fit Content on tables
Until now, setting
Widthon a table meant it would always stretch to fill that width, even if it only had three short words in it. Now there'sFitContent():With
FitContent, the table renders at the width its content actually needs.Widthbecomes a ceiling, if the content is wider than that, the table is held to the maximum and wraps like before.Perfect for sidebars, popups, and anywhere a table shouldn't go far. Thanks, @pete-woods!
Darker Darks, Lighter Lights
Lip Gloss now decides whether a color is dark using CIELAB lightness instead of HSL. In simple words, it now judges dark and light the way your eyes do, so saturated blues and purples are no longer mistaken for light colors.
LightDarkand friends will pick the right side more often. Thanks, @janearc!Full-Fidelity RGB
RGBColorchannels are now 16 bits, so colors survive the round trip throughcolor.Colorwithout losing precision. Thanks, @MokiMeow!Faster Wrapping
Wrapnow sizes its buffer up front and copies bytes in runs instead of one at a time. Thanks, @taciturnaxolotl!That's all for now,
Charm XX 💫
Changelog
New!
6a419c6: feat: addFitContentproperty to table renderer (#697) (@pete-woods)Fixed
e3f0511: fix(color): expand RGBColor channels to 16 bits (#757) (@MokiMeow)092b7f4: fix(compat): honor NO_COLOR in init-time background query (#692) (@jadb)19f011f: fix(luminance): detect dark colors by Lab, not HSL (#752) (@janearc)8c6bfaf: fix(table): prevent panic when YOffset is set to a negative value (#727) (@bunlongheng)03215bc: fix(tree): handle nil values (#738) (@Charlie-Wang-03)4da0bdd: fix(tree): stop swapping Offset start and end (#676) (@c-tonneslan)2a70d4e: fix: alphabet enumerator producing non-letters for large lists (#715) (@winklemad)ce49a2a: fix: don't mangle embedded ANSI when styling spaces (#708) (@larrasket)0599726: fix: infinite loop with zero-width characters (#670) (@Spuxy)4b8c667: fix: store bool props in a 64-bit field (#732) (@QuentinouLeTwist)3ab3b5f: fix: terminate margin background on each line (#711) (@c-tonneslan)0f0a984: fix: unset underline style rule (#686) (@abnormal749)Other stuff
6860635: Fix order of calling w.Close in Wrap (#689) (@neomantra)4a8c4de: Inline: replace newlines with a space, not empty string (#665) (@MukundaKatta)77047a8: ci: sync dependabot config (#728) (@charmcli)c7d9f35: perf(wrap): forward bytes in runs instead of one at a time (@taciturnaxolotl)868e8b5: perf(wrap): size the buffer in Wrap up front (@taciturnaxolotl)ff16a4e: v2.1.0 (@andrinoff)Thoughts? Questions? We love hearing from you. Feel free to reach out on X, Discord, Slack, The Fediverse, Bluesky.
v2.0.6Compare Source
Devanagari, auto-grapheme mode, and more
Hi! The big news in this release is that Lip Gloss now properly renders Devanagari (Hindi)! Beyond that—or perhaps as a result—Lip Gloss will now switch to mode 2027 for grapheme support when possible.
There's other good stuff too. Let's go!
क्या हाल है?
Hindi speakers, it's about time! Lip Gloss and Ultraviolet now properly renders Devanagari. That means Bubble Tea will as well.
This brings us to…
Cyberpunk 2027
Lip Gloss (and Ultraviolet) now asks the terminal at startup whether it supports Unicode core mode (DEC mode 2027), and when it does, measures widths the same way the terminal does. We did this for Devanagari but it also means Emojis and things render better now too. Let's go!
Shrinky tables: not anymore
Columns no longer shrink to zero width. Thanks, @taciturnaxolotl!
Changelog
Fixed
d231906: fix(table): prevent columns from shrinking to zero width (#671) (@taciturnaxolotl)Thoughts? Questions? We love hearing from you. Feel free to reach out on X, Discord, Slack, The Fediverse, Bluesky.
v2.0.5Compare Source
Graphemes, Schmraphemes
If you’re using emojis in the terminal you're in for a rough ride. That said, we do what we can. This release brings some in some very specific edge case rendering improvements. Enjoy.
Enjoy!
Changelog
10f9584: chore(deps): bump ultraviolet for emoji-related improvementsThoughts? Questions? We love hearing from you. Feel free to reach out on X, Discord, Slack, The Fediverse, Bluesky.
v2.0.4Compare Source
Mini Crash Patch
Hi! This is a small patch to fix a writer-related panic. Thanks for using Lip Gloss!
Changelog
Fixed
fefa41d: fix: prevent crash when writing to a closed wrap writer (#699) (@taciturnaxolotl)Docs
40ec0e6: docs: fix typo in table comment (#641) (@aymanbagabas)a4d0b40: docs: restore missing diaereses (#664) (@meowgorithm)Chore
aa91b99: chore: remove CODEOWNERS (@aymanbagabas)9cbfe8b: chore(lint): exclude revive naming linter (@aymanbagabas)Thoughts? Questions? We love hearing from you. Feel free to reach out on X, Discord, Slack, The Fediverse, Bluesky.
v2.0.3Compare Source
Changelog
Fixed
472d718: fix: Avoid background color query hang (#636) (@jedevc)Docs
9e39a0a: docs: fix README typo (#629) (@Rohan5commit)cd93a9f: docs: fix tree comment typo (#634) (@Rohan5commit)Thoughts? Questions? We love hearing from you. Feel free to reach out on X, Discord, Slack, The Fediverse, Bluesky.
v2.0.2Compare Source
Table patch
If you don't know, we made big improvements in table rendering recently shipped in v2.0.0.
@MartinodF made a good job on improving it even further for tricky edge cases, in particular when content wrapping is enabled.
Changelog
Fixed
c289bad: fix(table): height and overflow with wrapping content (#620) (@MartinodF)Thoughts? Questions? We love hearing from you. Feel free to reach out on X, Discord, Slack, The Fediverse, Bluesky.
v2.0.1Compare Source
A small release to properly set style underline colors, as well as handling partial reads while querying the terminal.
Changelog
Fixed
3044146: fix: add missing underlineColorKey case in getAsColor (#624) (@flux627)Docs
61e734b: docs: Charm logo link in upgrade guide (@aymanbagabas)Other stuff
92b13d8: ci: sync golangci-lint config (#621) (@github-actions[bot])Thoughts? Questions? We love hearing from you. Feel free to reach out on X, Discord, Slack, The Fediverse, Bluesky.
v2.0.0Compare Source
Do you think you can handle Lip Gloss v2?
We’re really excited for you to try Lip Gloss v2! Read on for new features and a guide to upgrading.
If you (or your LLM) just want the technical details, take a look at Upgrade Guide.
What’s new?
The big changes are that Styles are now deterministic (λipgloss!) and you can be much more intentional with your inputs and outputs. Why does this matter?
Playing nicely with others
v2 gives you precise control over I/O. One of the issues we saw with the Lip Gloss and Bubble Tea v1s is that they could fight over the same inputs and outputs, producing lock-ups. The v2s now operate in lockstep.
Querying the right inputs and outputs
In v1, Lip Gloss defaulted to looking at
stdinandstdoutwhen downsampling colors and querying for the background color. This was not always necessarily what you wanted. For example, if your application was writing tostderrwhile redirectingstdoutto a file, the program would erroneously think output was not a TTY and strip colors. Lip Gloss v2 gives you control over this.Going beyond localhost
Did you know TUIs and CLIs can be served over the network? For example, Wish allows you to serve Bubble Tea and Lip Gloss over SSH. In these cases, you need to work with the input and output of the connected clients as opposed to
stdinandstdout, which belong to the server. Lip Gloss v2 gives you flexibility around this in a more natural way.🧋 Using Lip Gloss with Bubble Tea?
Make sure you get all the latest v2s as they’ve been designed to work together.
# Collect the whole set. go get charm.land/bubbletea/v2 go get charm.land/bubbles/v2 go get charm.land/lipgloss/v2🐇 Quick upgrade
If you don't have time for changes and just want to upgrade to Lip Gloss v2 as fast as possible? Here’s a quick guide:
Use the
compatpackageThe
compatpackage provides adaptive colors, complete colors, and complete adaptive colors:compatworks by looking atstdinandstdouton a global basis. Want to change the inputs and outputs? Knock yourself out:Use the new Lip Gloss writer
If you’re using Bubble Tea with Lip Gloss you can skip this step. If you're using Lip Gloss in a standalone fashion, however, you'll want to use
lipgloss.Println(andlipgloss.Printfand so on) when printing your output:Why? Because
lipgloss.Printlnwill automatically downsample colors based on the environment.That’s it!
Yep, you’re done. All this said, we encourage you to read on to get the full benefit of v2.
👀 What’s changing?
Only a couple main things that are changing in Lip Gloss v2:
🪄 Downsampling colors with a writer
One of the best things about Lip Gloss is that it can automatically downsample colors to the best available profile, stripping colors (and ANSI) entirely when output is not a TTY.
If you're using Lip Gloss with Bubble Tea there's nothing to do here: downsampling is built into Bubble Tea v2. If you're not using Bubble Tea you now need to use a writer to downsample colors. Lip Gloss writers are a drop-in replacement for the usual functions found in the
fmtpackage:🌛 Background color detection and adaptive colors
Rendering different colors depending on whether the terminal has a light or dark background is an awesome power. Lip Gloss v2 gives you more control over this progress. This especially matters when input and output are not
stdinandstdout.If that doesn’t matter to you and you're only working with
stdoutyou skip this viacompatabove, though we encourage you to explore this new functionality.With Bubble Tea
In Bubble Tea, request the background color, listen for a
BackgroundColorMsgin your update, and respond accordingly.Standalone
If you're not using Bubble Tea you simply can perform the query manually:
🥕 Other stuff
Colors are now
color.Colorlipgloss.Color()now produces an idiomaticcolor.Color, whereas before colors were typelipgloss.TerminalColor. Generally speaking, this is more of an implementation detail, but it’s worth noting the structural differences.Changelog
New!
Fixed
Docs
Other stuff
🌈 Feedback
That's a wrap! Feel free to reach out, ask questions, and let us know how it's going. We'd love to know what you think.
Part of Charm.
Charm热爱开源 • Charm loves open source • نحنُ نحب المصادر المفتوحة
v1.1.0Compare Source
Tables, Improved
In this release, the inimitable @andreynering and @bashbunni majorly overhauled on the table sizing and content wrapping algorithms. Tables will now be much smarter on deciding the ideal width of each column, and contents now wraps by default inside cells.
New Border Styles
Also, we added two new border styles that you can use to generate tables in Markdown and ASCII styles.
Markdown Tables
To render tables correctly for Markdown you'll want to use
lipgloss.MarkdownBorderand disable the top and bottom borders.ASCII Tables
To render an ASCII-style table use
lipgloss.ASCIIBorder.Thanks everyone
Special thanks to @aymanbagabas, @bashbunni, @andreynering, and @caarlos0 for or all the work on this release!
Changelog
New Features
7862f52: feat(table): improve sizing and behavior: wrap by default, overflow optionally (@andreynering)1f1209e: feat(table): use cellbuf to preserve styles for wrapped content (@bashbunni)c454a0a: feat(tables): add markdown and ascii border style for tables (#480) (@andreynering)bafb8fd: feat(tree): hide children (#460) (@bashbunni)9942166: feat: style ranges (#458) (@caarlos0)Bug fixes
9500f10: fix(table): ensure we're passing the right row index tostyleFunc(@andreynering)7b191c5: fix(test): make table wrapping tests use golden files (@bashbunni)9b8304f: fix: border size getters when implicit borders are present (#411) (@meowgorithm)022e967: fix: range test (@caarlos0)Other work
ecc1bd0: fix: comment on min func in utils (@derezzolution)5cd2074: style(table): improve naming of the resizer functions (@andreynering)9cfb7dd: test(table): check truncation logic for overflow and nowrap (@bashbunni)2aa2eb0: test(table): test wrapping cell styles (@bashbunni)ca67d0f: chore(lint): apply De Morgans law to the if statement (@aymanbagabas)0fbb070: chore(lint): fix lint ignore comments (@andreynering)Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, The Fediverse, or on Discord.
v1.0.0Compare Source
At last: v1.0.0
This is an honorary release indicating that Lip Gloss is now stable. Thank you, open source community, for all your love, support, contributions, and great style.
Stay tuned for a v2 alpha!
v0.13.1Compare Source
Table improvements, on stream
@bashbunni went to town in this release and fixed a bunch of bugs, mostly around table. Best of all, she did most of it on stream.
Changelog
Table
Other Stuff
Bonus
New Contributors
Full Changelog: charmbracelet/lipgloss@v0.13.0...v0.13.1
Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, The Fediverse, or on Discord.
v0.13.0Compare Source
Woodn’t you know, Lip Gloss has trees!
Lip Gloss ships with a tree rendering sub-package.
Define a new tree.
Print the tree.
Trees have the ability to nest.
Print the tree.
Trees can be customized via their enumeration function as well as using
lipgloss.Styles.Print the tree.
The predefined enumerators for trees are
DefaultEnumeratorandRoundedEnumerator.If you need, you can also build trees incrementally:
There’s more where that came from
See all the tree examples.
Changelog
New Features
0618c73: feat(test): add test forJoinHorizontal(#346) (@aditipatelpro)feb42a9: feat: move tree to root (#342) (@caarlos0)Bug fixes
8a0e640: fix: remove unnecessary if (@aymanbagabas)Documentation updates
bc0de5c: docs(README): make tree example match output (@bashbunni)bb3e339: docs(README): match tree example alignment with list examples (@bashbunni)185fde3: docs(README): update tree images (@bashbunni)ed7f56e: docs: fixCompleteColorexample (#345) (@bashbunni)cf0a7c6: docs: fix tree screenshot (@caarlos0)Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, The Fediverse, or on Discord.
Configuration
📅 Schedule: (UTC)
* * * * 1)🚦 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 has been generated by Mend Renovate CLI.