-
-
Notifications
You must be signed in to change notification settings - Fork 746
fix: strip ANSI codes from ignoreWarnings messages #12435
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for rspack canceled.
|
There was a problem hiding this 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 addresses issue #12434 by stripping ANSI/VT control characters from warning messages before matching them against ignoreWarnings patterns, and refactors the normalization logic for better code organization.
- Adds ANSI code stripping in
IgnoreWarningsPluginusing Node.js'sutil.stripVTControlCharacters - Extracts
ignoreWarningsnormalization logic into a standalone function - Preserves warning objects by creating shallow copies with stripped messages
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/rspack/src/lib/IgnoreWarningsPlugin.ts | Imports util module and strips VT control characters from warning messages before pattern matching |
| packages/rspack/src/config/normalization.ts | Extracts normalizeIgnoreWarnings function to improve code organization and maintainability |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Rsdoctor Bundle Diff AnalysisFound 5 project(s) in monorepo. 📁 react-10kPath:
📦 Download Diff Report: react-10k Bundle Diff 📁 react-1kPath:
📦 Download Diff Report: react-1k Bundle Diff 📁 react-5kPath:
📦 Download Diff Report: react-5k Bundle Diff 📁 romePath:
📦 Download Diff Report: rome Bundle Diff 📁 ui-componentsPath:
📦 Download Diff Report: ui-components Bundle Diff Generated by Rsdoctor GitHub Action |
📦 Binary Size-limit
🙈 Size remains the same at 48.20MB |
CodSpeed Performance ReportMerging #12435 will not alter performanceComparing Summary
Footnotes |
Summary
ignoreWarningsmessages viautil.stripVTControlCharactersto ensure thatignoreWarningscan more easily match warning message.ignoreWarningsoption to make the code cleaner.Related links
ignoreWarningsmessages #12434Checklist