refactor: migrate color utilities to rslog package#7299
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request refactors the project's color utility management by centralizing it within the Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request refactors the color utility handling by removing the local implementation and migrating to the color utilities from the rslog package. The rslog dependency is also updated to v2.0.1 to support this change. The refactoring has been applied consistently across all relevant files. The changes are correct and align with the goal of the pull request. I have no further comments.
Note: Security Review did not run due to the size of the PR.
There was a problem hiding this comment.
Pull request overview
Refactors @rsbuild/core to stop using its local ANSI color helper and instead rely on rslog’s color utilities, alongside a patch bump of the rslog dependency.
Changes:
- Bump
rslogfrom2.0.0to2.0.1. - Replace imports of the local
helpers/colorwithrslog’scolorexport (and re-export viahelpers). - Remove the now-unused
packages/core/src/helpers/color.tsimplementation and clean up an unused import in the CLI entry.
Reviewed changes
Copilot reviewed 6 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| pnpm-lock.yaml | Updates lockfile entries for rslog@2.0.1 (and related integrity metadata). |
| packages/core/package.json | Bumps rslog devDependency to ^2.0.1. |
| packages/core/src/logger.ts | Switches logger color usage to rslog’s color export. |
| packages/core/src/helpers/index.ts | Re-exports color from rslog via the helpers barrel and updates internal usage. |
| packages/core/src/helpers/format.ts | Updates color import to come from rslog. |
| packages/core/src/helpers/stats.ts | Updates color import to come from rslog. |
| packages/core/src/helpers/color.ts | Deletes the local color utility implementation. |
| packages/core/bin/rsbuild.js | Removes an unused process import (uses global process). |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
Related Links
Checklist