Skip to content

test(e2e): replace execSync and npx with a faster helper#5783

Merged
chenjiahan merged 3 commits intomainfrom
e2e_run_cli_0807
Aug 7, 2025
Merged

test(e2e): replace execSync and npx with a faster helper#5783
chenjiahan merged 3 commits intomainfrom
e2e_run_cli_0807

Conversation

@chenjiahan
Copy link
Copy Markdown
Member

Summary

Replace the execSync and npx with a faster runCliSync helper in e2e cases:

  • Reduce the overhead of npx
  • Fix the npx warning in Node 24

Before

Screenshot 2025-08-07 at 13 04 09 Screenshot 2025-08-07 at 12 53 52

After

Screenshot 2025-08-07 at 13 03 23 Screenshot 2025-08-07 at 12 54 04

Checklist

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

Copilot AI review requested due to automatic review settings August 7, 2025 05:05
@netlify
Copy link
Copy Markdown

netlify bot commented Aug 7, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit bbe954e
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/689439dac7b30f00082cabe4
😎 Deploy Preview https://deploy-preview-5783--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 (🟢 up 11 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
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

Replace the use of execSync with npx commands with a new runCliSync helper function to improve performance and eliminate Node 24 warnings in e2e tests.

  • Introduce a new runCliSync helper function that directly executes the rsbuild binary
  • Replace all instances of execSync('npx rsbuild ...') with runCliSync('...') across 25+ test files
  • Update Node.js engine requirement from >=18.0.0 to >=22.0.0

Reviewed Changes

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

Show a summary per file
File Description
package.json Updated Node.js engine requirement to >=22.0.0
e2e/scripts/shared.ts Added new runCliSync helper function
e2e/cases/server/ssr/package.json Added @rsbuild/core dependency and removed npx from scripts
e2e/cases/cli/*/index.test.ts Replaced execSync+npx with runCliSync in 25 test files
e2e/cases/alias/tsconfig-paths-reload/tsconfig.json Updated path mapping to use relative path
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

@chenjiahan chenjiahan merged commit b921140 into main Aug 7, 2025
11 checks passed
@chenjiahan chenjiahan deleted the e2e_run_cli_0807 branch August 7, 2025 05:36
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.

2 participants