Skip to content

Commit e43f636

Browse files
authored
test(snapshots): pin dev_engines_runtime_pnpm11 to the seeded default Node version (#2390)
Since 2026-08-08 the Windows PTY snapshot leg fails intermittently on `dev_engines_runtime_pnpm11`: the `vp dlx -s print-current-version` step times out after 60s with empty output (13+ runs across branches, main included, e.g. [run 31302523708](https://github.com/voidzero-dev/vite-plus/actions/runs/31302523708)). The fixture pinned devEngines node `22.22.2`, the only pin in the suite that the CI runtime seed does not carry, so the step had to download Node.js from nodejs.org inside its 60s budget. Connections from the Windows runner to nodejs.org stall intermittently, and the shared HTTP client's 2-minute request timeout (see #2386) outlives the step budget, so a stalled attempt can neither fail nor retry in time. The sibling `dev_engines_runtime_pnpm10` pins the seeded default `22.18.0` and passed in ~2s in the same failed runs, which clears the npm registry path and isolates the stall to nodejs.org. Pin the pnpm11 fixture to `22.18.0` as well. The `22.22.2` pin carried no assertion value: #1289 picked it as the then-latest 22.x above vp's minimum, and the snapshot redacts the printed version to `<version>`. The case still verifies that vp honors `devEngines.runtime` under pnpm 11. Verified with `cargo test -p vp_cli_snapshots --test cli_snapshots -- dev_engines_runtime_pnpm11` (passes in 6s, no snapshot drift).
1 parent f6e7897 commit e43f636

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/dev_engines_runtime_pnpm11/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"devEngines": {
55
"runtime": {
66
"name": "node",
7-
"version": "22.22.2"
7+
"version": "22.18.0"
88
}
99
},
1010
"packageManager": "pnpm@11.0.6"
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
[[case]]
22
name = "dev_engines_runtime_pnpm11"
33
vp = "global"
4+
# The devEngines pin must stay on vp's default Node.js version: the CI seed
5+
# only carries the default, and any other pin makes this step download a
6+
# runtime from nodejs.org inside its 60s budget, which times out when the
7+
# Windows runner's connection stalls.
48
steps = [
5-
{ argv = ["vp", "dlx", "-s", "print-current-version"], comment = "should print Node.js version 22.22.2 from devEngines.runtime", continue-on-failure = true },
9+
{ argv = ["vp", "dlx", "-s", "print-current-version"], comment = "should print Node.js version 22.18.0 from devEngines.runtime", continue-on-failure = true },
610
]

crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/dev_engines_runtime_pnpm11/snapshots/dev_engines_runtime_pnpm11.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## `vp dlx -s print-current-version`
44

5-
should print Node.js version 22.22.2 from devEngines.runtime
5+
should print Node.js version 22.18.0 from devEngines.runtime
66

77
```
88
<version>

0 commit comments

Comments
 (0)