Skip to content

chore: replace picocolors with builtins#2210

Merged
aklinker1 merged 3 commits intowxt-dev:mainfrom
eupthere:remove-picocolors
Apr 11, 2026
Merged

chore: replace picocolors with builtins#2210
aklinker1 merged 3 commits intowxt-dev:mainfrom
eupthere:remove-picocolors

Conversation

@eupthere
Copy link
Copy Markdown
Contributor

Overview

  • Removed picocolors dependency from wxt package.
  • Introduced a new color utility for text styling.
  • Updated all instances of picocolors to use the new color utility.

Manual Testing

# Build the CLI
pnpm --filter wxt build

# Run a command that prints the header and normal logs
node packages/wxt/dist/cli/index.mjs --help

# Run a command that hits more colored log output, for example inside the demo app
cd packages/wxt-demo
node ../wxt/dist/cli/index.mjs zip

Results

image image

Related Issue

This PR closes #2180

@eupthere eupthere requested a review from aklinker1 as a code owner March 24, 2026 13:42
@netlify
Copy link
Copy Markdown

netlify bot commented Mar 24, 2026

Deploy Preview for creative-fairy-df92c4 ready!

Name Link
🔨 Latest commit 094136b
🔍 Latest deploy log https://app.netlify.com/projects/creative-fairy-df92c4/deploys/69daa7742bf90a0008272bf2
😎 Deploy Preview https://deploy-preview-2210--creative-fairy-df92c4.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions bot added the pkg/wxt Includes changes to the `packages/wxt` directory label Mar 24, 2026
Copy link
Copy Markdown
Collaborator

@PatrykKuniczak PatrykKuniczak left a comment

Choose a reason for hiding this comment

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

LGTM

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 28, 2026

Codecov Report

❌ Patch coverage is 35.71429% with 18 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.27%. Comparing base (fa69826) to head (094136b).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
packages/wxt/src/core/initialize.ts 12.50% 6 Missing and 1 partial ⚠️
packages/wxt/src/core/clean.ts 0.00% 4 Missing ⚠️
...ages/wxt/src/core/utils/building/internal-build.ts 20.00% 3 Missing and 1 partial ⚠️
packages/wxt/src/core/create-server.ts 0.00% 2 Missing ⚠️
packages/wxt/src/core/utils/syntax-errors.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2210      +/-   ##
==========================================
+ Coverage   76.18%   76.27%   +0.08%     
==========================================
  Files         116      116              
  Lines        3103     3106       +3     
  Branches      689      691       +2     
==========================================
+ Hits         2364     2369       +5     
+ Misses        656      655       -1     
+ Partials       83       82       -1     

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Mar 28, 2026

Open in StackBlitz

@wxt-dev/analytics

npm i https://pkg.pr.new/@wxt-dev/analytics@2210

@wxt-dev/auto-icons

npm i https://pkg.pr.new/@wxt-dev/auto-icons@2210

@wxt-dev/browser

npm i https://pkg.pr.new/@wxt-dev/browser@2210

@wxt-dev/i18n

npm i https://pkg.pr.new/@wxt-dev/i18n@2210

@wxt-dev/is-background

npm i https://pkg.pr.new/@wxt-dev/is-background@2210

@wxt-dev/module-react

npm i https://pkg.pr.new/@wxt-dev/module-react@2210

@wxt-dev/module-solid

npm i https://pkg.pr.new/@wxt-dev/module-solid@2210

@wxt-dev/module-svelte

npm i https://pkg.pr.new/@wxt-dev/module-svelte@2210

@wxt-dev/module-vue

npm i https://pkg.pr.new/@wxt-dev/module-vue@2210

@wxt-dev/runner

npm i https://pkg.pr.new/@wxt-dev/runner@2210

@wxt-dev/storage

npm i https://pkg.pr.new/@wxt-dev/storage@2210

@wxt-dev/unocss

npm i https://pkg.pr.new/@wxt-dev/unocss@2210

@wxt-dev/webextension-polyfill

npm i https://pkg.pr.new/@wxt-dev/webextension-polyfill@2210

wxt

npm i https://pkg.pr.new/wxt@2210

commit: 094136b

Copy link
Copy Markdown
Member

@aklinker1 aklinker1 left a comment

Choose a reason for hiding this comment

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

Thoughts on using styleText directly? It's a nice API, I've been using it this last month and really like it. Not sure we need a wrapper.

I already have a commit done that replaces the wrapper with styleText directly, LMK if you want me to push it.

@PatrykKuniczak
Copy link
Copy Markdown
Collaborator

After #2246, i think wrapper is unnecessary layer of abstraction here, and IMO, we can use it directly, as @aklinker1 suggested.

Are you agree @eupthere ?

- Removed `picocolors` dependency from wxt package.
- Introduced a new `color` utility for text styling.
- Updated all instances of `picocolors` to use the new `color` utility.
@eupthere
Copy link
Copy Markdown
Contributor Author

@aklinker1 I added the wrapper to preserve the picocolor style API, but I agree it’s not really needed. Using styleText directly is simpler. I'm happy to drop the wrapper!

@aklinker1
Copy link
Copy Markdown
Member

@PatrykKuniczak can you please update PRs with a merge commit rather than a rebase and force push? It throws off everyone's history if multiple people are working on a branch.

@aklinker1 aklinker1 enabled auto-merge (squash) April 11, 2026 19:58
@aklinker1 aklinker1 merged commit 864d7a0 into wxt-dev:main Apr 11, 2026
18 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

Thanks for helping make WXT better!

@PatrykKuniczak
Copy link
Copy Markdown
Collaborator

@PatrykKuniczak can you please update PRs with a merge commit rather than a rebase and force push? It throws off everyone's history if multiple people are working on a branch.

No problem

aklinker1 added a commit that referenced this pull request Apr 13, 2026
Co-authored-by: Aaron <aaronklinker1@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg/wxt Includes changes to the `packages/wxt` directory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace picocolors with builtins

3 participants