Skip to content

fix: handle ANSI escape codes in node polyfill hint#6704

Merged
chenjiahan merged 1 commit intomainfrom
node_hint_strip_1204
Dec 4, 2025
Merged

fix: handle ANSI escape codes in node polyfill hint#6704
chenjiahan merged 1 commit intomainfrom
node_hint_strip_1204

Conversation

@chenjiahan
Copy link
Member

Summary

Strip ANSI control characters before matching error message to ensure consistent pattern matching.

Related Links

Checklist

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

Copilot AI review requested due to automatic review settings December 4, 2025 09:37
@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@netlify
Copy link

netlify bot commented Dec 4, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit 72ed16a
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/6931564d71e6c300084113e2
😎 Deploy Preview https://deploy-preview-6704--rsbuild.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 71 (🟢 up 3 from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: 60 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

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

This PR fixes a bug where ANSI escape codes in error messages could prevent proper pattern matching when detecting Node.js built-in module resolution failures. The fix strips ANSI control characters before applying regex matching to ensure consistent behavior.

  • Imports stripVTControlCharacters from Node.js's util module
  • Applies ANSI stripping to error messages before regex matching in the node polyfill hint logic

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@chenjiahan chenjiahan enabled auto-merge (squash) December 4, 2025 09:40
@chenjiahan chenjiahan merged commit d520225 into main Dec 4, 2025
18 checks passed
@chenjiahan chenjiahan deleted the node_hint_strip_1204 branch December 4, 2025 09:46
@chenjiahan chenjiahan mentioned this pull request Dec 6, 2025
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