chore: migrate remaining chalk usage to miniChalk utility#15782
Open
roli-lpci wants to merge 2 commits intopayloadcms:mainfrom
Open
chore: migrate remaining chalk usage to miniChalk utility#15782roli-lpci wants to merge 2 commits intopayloadcms:mainfrom
roli-lpci wants to merge 2 commits intopayloadcms:mainfrom
Conversation
Remove the chalk dependency from create-payload-app and the unused chalk import from plugin-multi-tenant. This continues the migration started in payloadcms#14003 by replacing all remaining chalk v4 calls with the project's existing miniChalk utility pattern. Changes: - Add miniChalk utility to create-payload-app with proper SGR close codes for correct nested styling (e.g. bold wrapping bgBlack) - Migrate all 5 create-payload-app source files from chalk to miniChalk - Convert chalk tagged template literals to miniChalk function calls - Remove unused chalk import from plugin-multi-tenant/src/index.ts - Remove chalk from create-payload-app/package.json Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
User-facing CLI tools should respect the NO_COLOR convention (https://no-color.org/) and FORCE_COLOR env vars. Without this, piped output and NO_COLOR=1 usage would contain raw ANSI escapes. Also documents the intentional divergence from the existing miniChalk implementations (specific SGR close codes vs full reset). 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
Removes the
chalkdependency from the publishedcreate-payload-apppackage and cleans up a deadchalkimport left behind inplugin-multi-tenantafter #14003.miniChalkutility tocreate-payload-appfollowing the same pattern already used inpackages/payloadandpackages/plugin-multi-tenant\x1b[39m,\x1b[49m,\x1b[22m) instead of full reset (\x1b[0m) so nested calls likeminiChalk.bold(... miniChalk.green(...) ...)preserve outer styles — matching chalk's nesting behaviormessages.tsto directminiChalkfunction callschalkfromcreate-payload-app/package.jsondependenciesFiles changed
packages/create-payload-app/src/utils/miniChalk.tspackages/create-payload-app/src/utils/log.tspackages/create-payload-app/src/utils/messages.tspackages/create-payload-app/src/lib/create-project.tspackages/create-payload-app/src/lib/wrap-next-config.tspackages/create-payload-app/src/main.tspackages/plugin-multi-tenant/src/index.tschalkimport (already uses miniChalk)packages/create-payload-app/package.jsonchalkdependencyTest plan
tsc --noEmit) for bothcreate-payload-appandplugin-multi-tenantnpx create-payload-appshows colored output correctly (bold labels, bg-colored badges, dim text)Install Payload in this project?)