test: execute steps using @yarnpkg/shell#292
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
6a29b2a to
2504f58
Compare
808b082 to
e79cc88
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the snapshot testing infrastructure to use @yarnpkg/shell instead of Node's child_process.exec for command execution. This change ensures stable stdout/stderr ordering and better cross-platform command handling.
- Replaces
child_process.execwith@yarnpkg/shell'sexecutefunction for running test commands - Implements file-based output capture to ensure stable ordering of stdout/stderr
- Removes shell-specific redirects (e.g.,
2>&1) from test command definitions
Reviewed Changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| pnpm-workspace.yaml | Adds @yarnpkg/fslib and @yarnpkg/shell to the catalog |
| pnpm-lock.yaml | Updates lockfile with new dependencies and their transitive dependencies |
| packages/tools/package.json | Adds @yarnpkg/fslib and @yarnpkg/shell as runtime dependencies |
| packages/tools/src/snap-test.ts | Refactors command execution to use @yarnpkg/shell with file-based output capture |
| packages/cli/snap-tests/replay-logs-chronological-order/steps.json | Removes 2>&1 redirects from commands |
| packages/global/snap-tests/command-update-npm10/snap.txt | Updates snapshot with new output ordering |
| packages/global/snap-tests/command-update-npm10-with-workspace/snap.txt | Updates snapshot with new output ordering |
| packages/global/snap-tests/command-add-pnpm9/snap.txt | Updates snapshot with output changes |
| packages/global/snap-tests/command-add-pnpm9-with-workspace/snap.txt | Updates snapshot with output changes |
| packages/cli/snap-tests/replay-logs-chronological-order/snap.txt | Updates snapshot reflecting removal of 2>&1 |
| packages/cli/snap-tests/command-doc/snap.txt | Updates snapshot with new output ordering |
| mise.toml | Removes mise configuration file |
| .gitmodules | Removes git submodules configuration |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 12 out of 13 changed files in this pull request and generated 3 comments.
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Merge activity
|

What changed?
2>&1redirections from test commands as we can capture stdout/stderr stably.@yarnpkg/shellWhy make this change?
To get prepared to run on Windows