perf(deps): replace picocolors with styleText from node:util#1543
Merged
Timeless0911 merged 1 commit intomainfrom Mar 17, 2026
Merged
perf(deps): replace picocolors with styleText from node:util#1543Timeless0911 merged 1 commit intomainfrom
Timeless0911 merged 1 commit intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Replace picocolors usage with built-in / internal color helpers, removing the prebundling/path indirection for picocolors in both core and plugin-dts.
Changes:
- Remove
picocolorsfromcoreandplugin-dtsbuild/prebundle/tsconfig path setups. - Switch
coreto re-exportcolorfromrslog. - Add a
node:utilstyleText-basedcolorhelper inplugin-dtsand update call sites.
Reviewed changes
Copilot reviewed 16 out of 17 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/plugin-dts/tsconfig.json | Removes picocolors path mapping now that it’s no longer used. |
| packages/plugin-dts/src/utils.ts | Introduces internal color helper built on node:util styleText. |
| packages/plugin-dts/src/tsgo.ts | Switches from picocolors import to internal color. |
| packages/plugin-dts/src/tsc.ts | Switches from picocolors import to internal color. |
| packages/plugin-dts/src/index.ts | Switches from picocolors import to internal color. |
| packages/plugin-dts/src/dts.ts | Switches from picocolors import to internal color. |
| packages/plugin-dts/src/apiExtractor.ts | Switches from picocolors import to internal color. |
| packages/plugin-dts/rslib.config.ts | Removes picocolors from externals map. |
| packages/plugin-dts/prebundle.config.mjs | Drops picocolors from prebundle dependencies and removes its prebundle hook. |
| packages/plugin-dts/package.json | Removes picocolors dependency. |
| packages/core/tsconfig.json | Removes picocolors path mapping. |
| packages/core/src/utils/color.ts | Re-exports color from rslog instead of picocolors. |
| packages/core/src/cli/commands.ts | Adds a guard before applying coloring to the title. |
| packages/core/rslib.config.ts | Removes picocolors from externals map. |
| packages/core/prebundle.config.mjs | Drops picocolors from prebundle dependencies and removes its prebundle hook. |
| packages/core/package.json | Removes picocolors dependency. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
fi3ework
approved these changes
Mar 17, 2026
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
Replace
picocolorswith Node.jsstyleTextand remove the package from the core and dts plugin build setup.corenow re-exportscolorfromrslog, whileplugin-dtsuses an internal color helper built onnode:util.Related Links
Checklist