Skip to content

refactor: migrate color utilities to rslog package#7299

Merged
chenjiahan merged 1 commit intomainfrom
rslog_color_0308
Mar 8, 2026
Merged

refactor: migrate color utilities to rslog package#7299
chenjiahan merged 1 commit intomainfrom
rslog_color_0308

Conversation

@chenjiahan
Copy link
Copy Markdown
Member

Summary

  • remove local color implementation and use rslog's color utilities instead
  • update rslog dependency to v2.0.1

Related Links

Checklist

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

Copilot AI review requested due to automatic review settings March 8, 2026 01:40
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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 rslog package. This change eliminates redundant local implementations, streamlines code, and ensures consistent color styling across the application by leveraging an external, maintained dependency. The update also includes a minor version bump for the rslog package.

Highlights

  • Color Utilities Migration: The local color utility implementation has been removed and replaced with the color utilities provided by the rslog package.
  • Dependency Update: The rslog dependency has been updated to version 2.0.1.
Changelog
  • packages/core/bin/rsbuild.js
    • Removed an unused import for the process module.
  • packages/core/package.json
    • Updated the rslog dependency from ^2.0.0 to ^2.0.1.
  • packages/core/src/helpers/color.ts
    • Deleted the entire file, removing the custom local color utility implementation.
  • packages/core/src/helpers/format.ts
    • Modified the import statement for color to use the rslog package instead of the now-removed local helper.
  • packages/core/src/helpers/index.ts
    • Modified the import statement for color to use the rslog package instead of the now-removed local helper.
  • packages/core/src/helpers/stats.ts
    • Modified the import statement for color to use the rslog package instead of the now-removed local helper.
  • packages/core/src/logger.ts
    • Modified the import statement for color to use the rslog package instead of the now-removed local helper.
  • pnpm-lock.yaml
    • Updated the rslog package version and its associated integrity hash.
    • Added integrity hashes for @rslib/core and rsbuild-plugin-dts from pkg.pr.new resolutions.
Activity
  • No human activity has been recorded on this pull request yet.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
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

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 rslog from 2.0.0 to 2.0.1.
  • Replace imports of the local helpers/color with rslog’s color export (and re-export via helpers).
  • Remove the now-unused packages/core/src/helpers/color.ts implementation 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.

@chenjiahan chenjiahan merged commit 52abe8b into main Mar 8, 2026
10 checks passed
@chenjiahan chenjiahan deleted the rslog_color_0308 branch March 8, 2026 01:49
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.

2 participants