chore: replace chalk and log-symbols with Node.js built-in styleText#4245
Merged
Conversation
Drops two direct dependencies in favor of the built-in `styleText` (available since Node 20.12) and inline unicode symbols, reducing the install footprint with no behavior change. https://claude.ai/code/session_01Nz9h7uooUdybS8pNjABMsE
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
This PR replaces the
chalkandlog-symbolsdependencies with Node.js's built-instyleTextutility from thenode:utilmodule. This reduces external dependencies while maintaining the same terminal styling functionality.Changes
chalkandlog-symbolsfrom all package.json filesimport chalk from 'chalk'withimport { styleText } from 'node:util'chalk.color(text)→styleText('color', text)chalk.color.modifier(text)→styleText(['color', 'modifier'], text)(for combined styles)logSymbols.warning→styleText('yellow', '⚠')logSymbols.error→styleText('red', '✖')Files Modified
packages/plugin/vite/src/VitePlugin.tspackages/plugin/vite/src/subprocess-worker.tspackages/plugin/webpack/src/WebpackPlugin.tspackages/api/core/src/api/make.tspackages/api/core/src/api/package.tspackages/api/core/src/api/publish.tspackages/api/core/src/api/start.tspackages/api/core/src/util/plugin-interface.tspackages/api/core/src/util/hook.tspackages/api/core/src/util/electron-executable.tspackages/api/cli/src/electron-forge.tspackages/api/cli/src/electron-forge-make.tspackages/api/cli/src/electron-forge-publish.tspackages/api/cli/src/util/terminate.tspackages/external/create-electron-app/src/create-electron-app.tspackages/external/create-electron-app/src/index.tspackages/external/create-electron-app/src/init.tspackages/external/create-electron-app/src/import.tspackages/external/create-electron-app/src/init-scripts/init-directory.tspackages/maker/wix/src/MakerWix.tspackages/publisher/github/src/PublisherGitHub.tstools/test-dist.tstools/test-clear.tspackage.jsonfilesBenefits
Testing
Existing tests pass. The changes are straightforward refactoring of styling calls with no functional behavior changes.
https://claude.ai/code/session_01Nz9h7uooUdybS8pNjABMsE