fix(cli): invoke Rspeedy without Windows shims - #134
Open
Huxpro wants to merge 1 commit into
Open
Conversation
Resolve the Rspeedy JavaScript bin from package metadata and run it with the current Node executable for both build and dev. Co-authored-by: TRAE CLI <noreply@bytedance.com>
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
@lynx-js/rspeedythrough its exportedpackage.jsonand validatedbin.rspeedymetadataprocess.execPathfor bothbuildanddevshell: false, including when package or app paths contain spacesrunCommandcallers such as adb, Gradle, and iOS tooling shell-freeRoot cause
On Windows, npm and pnpm expose
rspeedythrough a.cmdbatch shim. Node'schild_process.spawn()cannot execute that shim directly withshell: false, so Sparkling failed withspawn rspeedy ENOENT.Rather than enabling a shell for all Windows commands, this change bypasses the platform shim: it resolves Rspeedy's declared JavaScript bin from package metadata and launches it with the current Node executable. Build and dev share the same resolver, while the existing dev restart and signal lifecycle remains unchanged.
Tests
runCommandremainsshell: falsesparkling-app-cliJest suite: 12 suites, 71 tests--help)Residual risk
The Windows-shaped resolution and invocation behavior is covered deterministically, but the patch has not been run end-to-end on a native Windows host.
Fixes #63
This supersedes the remaining Windows Rspeedy launch portion of #73. It intentionally does not redo the ESM loader path fix, which is already present on
main.