test(e2e): replace execSync and npx with a faster helper#5783
Merged
chenjiahan merged 3 commits intomainfrom Aug 7, 2025
Merged
test(e2e): replace execSync and npx with a faster helper#5783chenjiahan merged 3 commits intomainfrom
chenjiahan merged 3 commits intomainfrom
Conversation
✅ Deploy Preview for rsbuild ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
There was a problem hiding this comment.
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
runCliSynchelper function that directly executes the rsbuild binary - Replace all instances of
execSync('npx rsbuild ...')withrunCliSync('...')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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Replace the
execSyncandnpxwith a fasterrunCliSynchelper in e2e cases:npxnpxwarning in Node 24Before
After
Checklist