test(snapshots): migrate npm-global-* cases to the PTY snapshot suite#2134
Merged
Conversation
✅ Deploy Preview for viteplus-preview canceled.
|
Member
Author
How to use the Graphite Merge QueueAdd the label auto-merge to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
14 tasks
fef91b7 to
1f6c46c
Compare
1f6c46c to
a8298bd
Compare
a8298bd to
b635efa
Compare
7e9ca79 to
ccfc261
Compare
This was referenced Jul 10, 2026
Merge activity
|
wan9chi
approved these changes
Jul 10, 2026
…te (#2134) Migrates 9 of the 10 npm-global shim cases (global npm install/uninstall link behavior) from packages/cli/snap-tests-global, unblocked by #2110 removing the step program allow-list. Runner/vpt additions the cases need: - `vpt stat-file` gains a `symlink` state (via symlink_metadata, shell `test -L` semantics) so link assertions keep their predicate fidelity; no existing baseline stats a symlink. - vpt expands a leading `$NAME` env reference in its arguments (`$VP_HOME/bin/x`), replacing the shell expansion the legacy runner provided; unset variables stay verbatim. - The per-case npm global prefix joins the redaction paths as `<npm-prefix>` (a sibling of `home`, so the `<home>` pair never matched it; `npm config get prefix` prints it). - New WHICH_NODE_VERSION_RE masks `vp env which`'s `Node:` field and the BinConfig `"nodeVersion"` value, which track the environment's managed default runtime rather than a fixture pin. The npm install/uninstall steps run with `tty = false`: under a PTY the npm shim's link-hint path probes the terminal and blocks on a reply the vt100 emulator never sends, while the legacy runner always piped stdio. npm-global-install-custom-prefix-on-path stays in the legacy tree: its `PATH=$(pwd)/...:$PATH` dynamic prefix is not expressible without a shell. Part of #2116.
7e9ca79 to
5986dae
Compare
b635efa to
dfba9ba
Compare
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.

Migrates 9 of the 10 npm-global shim cases (global npm install/uninstall
link behavior) from packages/cli/snap-tests-global, unblocked by #2110
removing the step program allow-list. Runner/vpt additions the cases need:
vpt stat-filegains asymlinkstate (via symlink_metadata, shelltest -Lsemantics) so link assertions keep their predicate fidelity;no existing baseline stats a symlink.
$NAMEenv reference in its arguments(
$VP_HOME/bin/x), replacing the shell expansion the legacy runnerprovided; unset variables stay verbatim.
<npm-prefix>(a sibling ofhome, so the<home>pair nevermatched it;
npm config get prefixprints it).vp env which'sNode:field and theBinConfig
"nodeVersion"value, which track the environment's manageddefault runtime rather than a fixture pin.
The npm install/uninstall steps run with
tty = false: under a PTY thenpm shim's link-hint path probes the terminal and blocks on a reply the
vt100 emulator never sends, while the legacy runner always piped stdio.
npm-global-install-custom-prefix-on-path stays in the legacy tree: its
PATH=$(pwd)/...:$PATHdynamic prefix is not expressible without ashell.
Part of #2116.