Replace execa with tinyexec#4930
Closed
stianjensen wants to merge 2 commits into
Closed
Conversation
Drop execa (large dependency tree) in favor of tinyexec ^0.3.0 (zero dependencies, dual CJS/ESM). Uses args-tokenizer to split command strings since tinyexec expects (command, args[]) rather than a single command string. tinyexec 1.x is ESM-only, so I opted to use the 0.3.x line for now (since my understanding is Detox still supports node versions that don't support require(esm)).
….stop() execa v5 sent SIGKILL 5 s after SIGTERM via forceKillAfterTimeout (default). tinyexec has no such built-in, so re-implement the same behaviour manually: send SIGTERM, schedule SIGKILL at 5000 ms with unref(), cancel on exit. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Collaborator
|
Superseded by #4956, which retains your commit in history — it'll land to |
Contributor
Author
|
Thanks! Just happy to see it landing 😄 |
noomorph
added a commit
that referenced
this pull request
May 30, 2026
Closes #4930. Inspired by @stianjensen's original PR; tinyexec was chosen first but caused Windows CI failures (windowsHide, PATH augmentation, and path.normalize() behaviors absent from execa). Production code now uses Node's built-in child_process.spawn() instead. - AppStartCommand.js: execa.command() → spawn(cmd, [], {shell:true}), no new prod deps - stop(): SIGTERM with 5s SIGKILL escalation (restored from original execa behavior) - Integration tests: execa.commandSync() → tinyexec.x() (async) - execa removed from prod dependencies; tinyexec added to devDependencies - New AppStartCommand.test.js: covers SIGKILL escalation via jest.useFakeTimers() Co-Authored-By: Stian Jensen <me@stianj.com> Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
noomorph
added a commit
that referenced
this pull request
May 30, 2026
Closes #4930. Inspired by @stianjensen's original PR; tinyexec was chosen first but caused Windows CI failures (windowsHide, PATH augmentation, and path.normalize() behaviors absent from execa). Production code now uses Node's built-in child_process.spawn() instead. - AppStartCommand.js: execa.command() → spawn(cmd, [], {shell:true}), no new prod deps - stop(): SIGTERM with 5s SIGKILL escalation (restored from original execa behavior) - Integration tests: execa.commandSync() → tinyexec.x() (async) - execa removed from prod dependencies; tinyexec added to devDependencies - New AppStartCommand.test.js: covers SIGKILL escalation via jest.useFakeTimers() Co-Authored-By: Stian Jensen <me@stianj.com> Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.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.
Description
Drop execa (large dependency tree) in favor of tinyexec ^0.3.0 (zero dependencies, dual CJS/ESM). Uses args-tokenizer to split command strings since tinyexec expects (command, args[]) rather than a single command string.
tinyexec 1.x is ESM-only, so I opted to use the 0.3.x line for now (since my understanding is Detox still supports node versions that don't support require(esm)).