Skip to content

fix: hide import traces by default for warnings#6785

Merged
chenjiahan merged 3 commits intomainfrom
warn_trace_1215
Dec 16, 2025
Merged

fix: hide import traces by default for warnings#6785
chenjiahan merged 3 commits intomainfrom
warn_trace_1215

Conversation

@chenjiahan
Copy link
Copy Markdown
Member

Summary

Import traces are no longer shown by default for warnings to reduce log noise and improve readability.

Error messages remain unchanged and still include full import traces. Import traces for warnings can be enabled via debug mode.

Before

Screenshot 2025-12-15 at 21 31 28

After

image

Checklist

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

Copilot AI review requested due to automatic review settings December 15, 2025 14:00
@chatgpt-codex-connector
Copy link
Copy Markdown

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

netlify Bot commented Dec 15, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit c0a7b8c
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/6940c4465e935a000776a602
😎 Deploy Preview https://deploy-preview-6785--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: 61 (🔴 down 14 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
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

This PR reduces log noise by hiding import/module traces from warning messages by default while keeping them visible for errors and in verbose/debug mode.

Key Changes:

  • Added a level parameter to formatStatsError() to distinguish between errors and warnings
  • Module traces are now only shown for errors or when verbose mode is enabled
  • Updated warning call sites to pass 'warning' as the level parameter

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
packages/core/src/helpers/format.ts Added optional level parameter to formatStatsError() and conditional logic to hide module traces for warnings unless in verbose mode
packages/core/src/helpers/stats.ts Updated warning formatting to pass 'warning' as the level parameter
packages/core/src/server/socketServer.ts Updated socket server warning handler to pass 'warning' as the level parameter

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

Comment thread packages/core/src/helpers/format.ts Outdated
Comment thread packages/core/src/helpers/format.ts
chenjiahan and others added 2 commits December 16, 2025 10:17
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@chenjiahan chenjiahan merged commit 731340b into main Dec 16, 2025
11 checks passed
@chenjiahan chenjiahan deleted the warn_trace_1215 branch December 16, 2025 02:40
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