chore(deps): replace chalk with picocolors#2763
Open
roli-lpci wants to merge 1 commit intocucumber:mainfrom
Open
chore(deps): replace chalk with picocolors#2763roli-lpci wants to merge 1 commit intocucumber:mainfrom
roli-lpci wants to merge 1 commit intocucumber:mainfrom
Conversation
Replace chalk (4 transitive deps) with picocolors (zero deps) for
terminal color output. The `chalk.Instance(support)` pattern is
replaced with `picocolors.createColors(!!support)`, which provides
the same enable/disable behavior since `supports-color` already
returns `false` for no-support and `{level: 1|2|3}` for support.
All colors used (red, green, yellow, cyan, gray) are basic ANSI
codes, so the level→boolean flattening has no visual impact.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
chalk(4 transitive deps: chalk, ansi-styles, supports-color's dep has-flag) withpicocolors(zero deps) for terminal color outputnew chalk.Instance(support)topicocolors.createColors(!!support)— supports-color returnsfalsefor no-support and{level: 1|2|3}for support, so the boolean coercion preserves the same enable/disable semanticschalk.greytopicocolors.gray(both emit ANSI code 90)createColors(false)handles this automaticallyChanges
src/formatter/get_color_fns.ts— Replace chalk.Instance + bind pattern with picocolors.createColors, simplify from 46 lines to 30features/support/warn_user_about_enabling_developer_mode.ts— Replacechalk.red()withpc.red()package.json— Swapchalkforpicocolorsin dependenciespackage-lock.json— RegeneratedNotes
supports-coloris intentionally kept — it is used bysrc/publish/publish_plugin.tsoutside of the chalk contextTesting