Skip to content

chore: replace chalk with picocolors#593

Open
roli-lpci wants to merge 1 commit intods300:masterfrom
roli-lpci:chore/replace-chalk-with-picocolors
Open

chore: replace chalk with picocolors#593
roli-lpci wants to merge 1 commit intods300:masterfrom
roli-lpci:chore/replace-chalk-with-picocolors

Conversation

@roli-lpci
Copy link

Summary

  • Replace chalk (136KB + deps) with picocolors (3.8KB, zero deps) for terminal color output
  • All chained style calls converted to function composition (e.g. chalk.red.bold(x)pc.red(pc.bold(x)))
  • chalk.grey mapped to pc.gray, chalk.blueBright mapped to pc.blueBright

Changes

  • package.json: swap chalk dep for picocolors
  • src/applyPatches.ts: replace chalk usage (heaviest file — error messages, warnings, status output)
  • src/createIssue.ts: replace chalk.bold
  • src/detectPackageManager.ts: replace chalk error formatting
  • src/index.ts: replace chalk in help text
  • src/makePatch.ts: replace chalk progress indicators and error messages
  • src/makeRegExp.ts: replace chalk error formatting
  • src/patch/read.ts: replace chalk error formatting
  • src/rebase.ts: replace chalk status and error messages
  • src/stateFile.ts: replace chalk info messages

Testing

  • TypeScript compilation: zero errors
  • Unit tests: all passing (467 tests across 9 suites)
  • Integration tests: pre-existing failure unrelated to this change (same on master)

Addresses #499

Replace chalk (136KB + deps) with picocolors (3.8KB, zero deps) for
terminal color output. picocolors provides the same core API with
significantly smaller footprint.

All chained style calls (e.g. chalk.red.bold) are converted to
function composition (e.g. pc.red(pc.bold(...))).

Addresses ds300#499

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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