Skip to content

chore: replace chalk and lodash with picocolors and native code#385

Open
roli-lpci wants to merge 1 commit into
americanexpress:mainfrom
roli-lpci:chore/replace-chalk-and-lodash-with-native
Open

chore: replace chalk and lodash with picocolors and native code#385
roli-lpci wants to merge 1 commit into
americanexpress:mainfrom
roli-lpci:chore/replace-chalk-and-lodash-with-native

Conversation

@roli-lpci
Copy link
Copy Markdown

Summary

Removes chalk and lodash dependencies, replacing with picocolors (~6KB) and native JavaScript equivalents. Net dependency reduction of ~639KB.

Changes

  • src/index.js: chalk.Instance → picocolors.createColors, lodash/kebabCase → inline function, lodash/merge → Object.assign
  • tests/index.spec.js: Updated 3 test blocks for picocolors mock pattern
  • tests/integration.spec.js: lodash/uniqueId → inline counter
  • examples/image-reporter.js: chalk → picocolors
  • package.json: -chalk -lodash +picocolors

Test Results

  • 101/104 tests pass (3 pre-existing failures in outdated-snapshot-reporter.spec.js, reproducible on unmodified main)
  • 15/15 snapshots pass (ANSI escape sequences identical between chalk and picocolors)
  • 100% code coverage on all source files

Closes #378

…tives

Replace chalk (~45KB) with picocolors (~6KB, zero deps) for terminal
color output. Replace lodash/kebabCase with an inline function and
lodash/merge with native Object.assign, eliminating the full lodash
dependency (~600KB) entirely.

Closes americanexpress#378

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Feb 25, 2026

CLA assistant check
All committers have signed the CLA.

@roli-lpci
Copy link
Copy Markdown
Author

I have signed the CLA. @cla-assistant check

guym4c
guym4c previously approved these changes Mar 16, 2026
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.

Suggestion: remove chalk and lodash

3 participants