Skip to content

refactor(fileSize): rename showDiff to diff#6688

Merged
chenjiahan merged 3 commits intomainfrom
rename_show_diff_1203
Dec 3, 2025
Merged

refactor(fileSize): rename showDiff to diff#6688
chenjiahan merged 3 commits intomainfrom
rename_show_diff_1203

Conversation

@chenjiahan
Copy link
Member

Summary

  • Simplify the file size diff configuration by using a shorter name.
  • Remove unused diff-related header calculations to clean up the code.

Related Links

Checklist

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

Copilot AI review requested due to automatic review settings December 3, 2025 09:10
@netlify
Copy link

netlify bot commented Dec 3, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit 7360a6d
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/6930011b9364080008c8c3d2
😎 Deploy Preview https://deploy-preview-6688--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: 67 (🟢 up 5 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

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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 refactors the file size diff configuration by renaming showDiff to diff for a more concise API, and removes unused diff-related header calculation code.

Key changes:

  • Renamed printFileSize.showDiff to printFileSize.diff across type definitions, implementation, and documentation
  • Removed unused maxDiffLength and showDiffHeader parameters from getHeader() function
  • Added version history section documenting the diff option addition in v1.6.13

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
website/docs/en/config/performance/print-file-size.mdx Updated type definition, section heading, usage examples, and added version history for the renamed diff option
packages/core/src/types/config.ts Renamed showDiff property to diff in PrintFileSizeOptions type
packages/core/src/plugins/fileSize.ts Updated property references from showDiff to diff, removed unused diff header parameters and logic from getHeader() function

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

@chenjiahan chenjiahan merged commit 43144d2 into main Dec 3, 2025
11 checks passed
@chenjiahan chenjiahan deleted the rename_show_diff_1203 branch December 3, 2025 09:37
@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.

1 participant