Skip to content

Conversation

@chenjiahan
Copy link
Member

Summary

Ensure proper resource cleanup after the E2E build process.

Checklist

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

Copilot AI review requested due to automatic review settings June 19, 2025 05:07
@netlify
Copy link

netlify bot commented Jun 19, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit cdc4ba8
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/68539b030df69f00072a8346
😎 Deploy Preview https://deploy-preview-5441--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: 85 (🔴 down 2 from production)
Accessibility: 97 (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 ensures that the build’s internal resources are cleaned up by capturing and invoking the close callback returned from rsbuild.build().

  • Store the build-close function (result.close) in closeBuild
  • Invoke closeBuild before shutting down the preview server and restoring console proxy
  • Update the cleanup logic in the returned close handler
Comments suppressed due to low confidence (2)

e2e/scripts/shared.ts:283

  • [nitpick] Add a brief comment explaining what closeBuild represents and when it might be undefined to aid future maintainers.
  let closeBuild: () => Promise<void> | undefined;

e2e/scripts/shared.ts:331

  • Consider adding an E2E or unit test that verifies closeBuild is actually invoked and that build-related resources are released correctly.
      await closeBuild?.();

@chenjiahan chenjiahan merged commit 7bef3cb into main Jun 19, 2025
12 checks passed
@chenjiahan chenjiahan deleted the close_build_0619 branch June 19, 2025 05:16
This was referenced Jun 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant