Skip to content

perf(deps): replace picocolors with styleText from node:util#1543

Merged
Timeless0911 merged 1 commit intomainfrom
david/chore-remove-picocolors
Mar 17, 2026
Merged

perf(deps): replace picocolors with styleText from node:util#1543
Timeless0911 merged 1 commit intomainfrom
david/chore-remove-picocolors

Conversation

@Timeless0911
Copy link
Contributor

Summary

Replace picocolors with Node.js styleText and remove the package from the core and dts plugin build setup.

core now re-exports color from rslog, while plugin-dts uses an internal color helper built on node:util.

Related Links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI review requested due to automatic review settings March 17, 2026 12:22
@Timeless0911 Timeless0911 enabled auto-merge (squash) March 17, 2026 12:25
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 picocolors from core and plugin-dts build/prebundle/tsconfig path setups.
  • Switch core to re-export color from rslog.
  • Add a node:util styleText-based color helper in plugin-dts and 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

@Timeless0911 Timeless0911 merged commit 6932df1 into main Mar 17, 2026
12 checks passed
@Timeless0911 Timeless0911 deleted the david/chore-remove-picocolors branch March 17, 2026 13:11
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.

3 participants