Skip to content

feat: support cli generate diff report#1350

Merged
yifancong merged 1 commit intomainfrom
feat/action-diff-html
Oct 17, 2025
Merged

feat: support cli generate diff report#1350
yifancong merged 1 commit intomainfrom
feat/action-diff-html

Conversation

@yifancong
Copy link
Contributor

@yifancong yifancong commented Oct 13, 2025

Summary

feat: support cli generate diff report

Use the command rsdoctor bundle-diff --html --baseline="xxx.json" --current="xxx.json" to generate a bundle diff report in HTML format, suitable for CI environments or sharing.

Related Links

  • Add e2e for this cli command

Copilot AI review requested due to automatic review settings October 13, 2025 02:56
@netlify
Copy link

netlify bot commented Oct 13, 2025

Deploy Preview for rsdoctor ready!

Name Link
🔨 Latest commit 8557185
🔍 Latest deploy log https://app.netlify.com/projects/rsdoctor/deploys/68f1fa03e48de10008cef369
😎 Deploy Preview https://deploy-preview-1350--rsdoctor.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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 adds CLI support for generating standalone HTML diff reports for bundle comparisons. The feature allows users to output bundle diff analysis as a self-contained HTML file instead of only serving it through a development server.

  • Added --html and --output CLI options for generating standalone HTML reports
  • Implemented HTML generation logic that inlines all CSS and JavaScript assets
  • Enhanced the diff viewer to load compressed data from window globals when available

Reviewed Changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 6 comments.

File Description
packages/rspack-plugin/tsconfig.json Removed unused baseUrl configuration
packages/components/src/pages/Resources/BundleDiff/DiffServerAPIProvider/index.tsx Added support for loading diff data from window globals with decompression
packages/cli/src/commands/bundle-diff.ts Implemented HTML generation functionality with asset inlining and data compression
packages/cli/package.json Added @rsdoctor/client as dependency for HTML template access
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

9aoy
9aoy previously approved these changes Oct 17, 2025
feat: support rsdoctor cli to generate diff report html

feat: support rsdoctor cli to generate diff report html

feat: support rsdoctor cli to generate diff report html

feat: support rsdoctor cli to generate diff report html
@yifancong yifancong force-pushed the feat/action-diff-html branch from e62c46d to 8557185 Compare October 17, 2025 08:10
@yifancong yifancong merged commit 30abb80 into main Oct 17, 2025
8 checks passed
@yifancong yifancong deleted the feat/action-diff-html branch October 17, 2025 08:27
@yifancong yifancong mentioned this pull request Oct 24, 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.

3 participants