Skip to content

fix(deps): update to lipgloss/v2 #5877

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

Merged
merged 3 commits into from
Jul 4, 2025
Merged

fix(deps): update to lipgloss/v2 #5877

merged 3 commits into from
Jul 4, 2025

Conversation

caarlos0
Copy link
Member

@caarlos0 caarlos0 commented Jul 3, 2025

upgrading all usage to v2.

v1 is still an indirect dependency of quill.

@caarlos0 caarlos0 requested a review from Copilot July 3, 2025 23:56
@caarlos0 caarlos0 self-assigned this Jul 3, 2025
@caarlos0 caarlos0 added enhancement New feature or request dependencies Pull requests that update a dependency file labels Jul 3, 2025
@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jul 3, 2025
Copy link

cloudflare-workers-and-pages bot commented Jul 3, 2025

Deploying goreleaser with  Cloudflare Pages  Cloudflare Pages

Latest commit: 95a9238
Status: ✅  Deploy successful!
Preview URL: https://3d0d7076.goreleaser.pages.dev
Branch Preview URL: https://lipgloss.goreleaser.pages.dev

View logs

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR upgrades all references to use lipgloss v2, removes legacy termenv-based color profile setup, and adjusts style definitions to the new v2 API.

  • Update import paths from github.com/charmbracelet/lipgloss to github.com/charmbracelet/lipgloss/v2
  • Remove lipgloss.SetColorProfile(termenv.X) calls in main.go and tests
  • Migrate style definitions from AdaptiveColor to lipgloss.Color and bump go.mod to v2

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
main.go Removed v1 lipgloss import and CI color-profile init via termenv
internal/middleware/logging/logging.go Switched lipgloss import to v2
internal/logext/writer_test.go Dropped lipgloss & termenv imports and test color-profile setup
internal/logext/styles.go Updated import and changed AdaptiveColor to lipgloss.Color
internal/deprecate/testdata/TestNotice.txt.golden Whitespace change around deprecation notice (NBSP introduced)
internal/deprecate/deprecate_test.go Removed lipgloss import and test color-profile calls
cmd/root.go Updated lipgloss import to v2
cmd/healthcheck.go Updated lipgloss import to v2
go.mod Bumped lipgloss to v2 in require, cleaned up termenv
Comments suppressed due to low confidence (2)

internal/logext/writer_test.go:12

  • Tests no longer set a deterministic color profile, which can lead to inconsistent output across environments. Reintroduce a fixed profile using the lipgloss/v2 API (e.g., via lipgloss.SetColorProfile) for stable, reproducible tests.
)

internal/deprecate/deprecate_test.go:11

  • Removing the explicit ASCII profile setup can cause environment-dependent ANSI output in this test. Please set a known lipgloss/v2 color profile within the test to maintain consistent golden comparisons.
)

@@ -1,3 +1,3 @@
• first
• DEPRECATED: foo.bar_whatever: foobar should not be used anymore, check https://goreleaser.com/deprecations#foobar_whatever-foobar for more info
• DEPRECATED:  foo.bar_whatever: foobar  should not be used anymore, check https://goreleaser.com/deprecations#foobar_whatever-foobar for more info
Copy link
Preview

Copilot AI Jul 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line contains non-breaking space characters (U+00A0) around the deprecation message, which may cause golden-file mismatches. Replace them with regular ASCII spaces to ensure consistent test comparisons.

Suggested change
• DEPRECATED:  foo.bar_whatever: foobar  should not be used anymore, check https://goreleaser.com/deprecations#foobar_whatever-foobar for more info
• DEPRECATED: foo.bar_whatever: foobar should not be used anymore, check https://goreleaser.com/deprecations#foobar_whatever-foobar for more info

Copilot uses AI. Check for mistakes.

Copy link

codecov bot commented Jul 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.75%. Comparing base (dd83d93) to head (38d54b1).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5877      +/-   ##
==========================================
- Coverage   82.75%   82.75%   -0.01%     
==========================================
  Files         165      165              
  Lines       16521    16519       -2     
==========================================
- Hits        13672    13670       -2     
  Misses       2258     2258              
  Partials      591      591              

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

caarlos0 added 2 commits July 3, 2025 23:11
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
@caarlos0 caarlos0 merged commit b67fe02 into main Jul 4, 2025
11 of 13 checks passed
@caarlos0 caarlos0 deleted the lipgloss branch July 4, 2025 02:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file enhancement New feature or request size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant