From 240552e7f62fc7f1590346f67715a87cb481ec9e Mon Sep 17 00:00:00 2001 From: "voidzero-guard[bot]" <278573678+voidzero-guard[bot]@users.noreply.github.com> Date: Wed, 23 Sep 2026 01:50:29 +0000 Subject: [PATCH 1/3] feat(deps): upgrade upstream dependencies - no version changes detected Code changes: - Re-record standalone npm fallback snapshot for upstream npm 12.1.0 (crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_env_install_no_arg/snapshots/command_env_install_standalone_npm_fallback.md) Co-Authored-By: Claude Code --- .../snapshots/command_env_install_standalone_npm_fallback.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_env_install_no_arg/snapshots/command_env_install_standalone_npm_fallback.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_env_install_no_arg/snapshots/command_env_install_standalone_npm_fallback.md index cb6c3c9065..774316077d 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_env_install_no_arg/snapshots/command_env_install_standalone_npm_fallback.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_env_install_no_arg/snapshots/command_env_install_standalone_npm_fallback.md @@ -7,7 +7,7 @@ Explicit npm installation uses standalone registry npm without installing Node.j an explicit npm scope exports the standalone npm fallback ``` -export VP_NPM_VERSION=12.0.2 +export VP_NPM_VERSION=12.1.0 Using npm (resolved from registry fallback) ``` From 632a6a11fb8b007cad1324aa18b4a2bf6611eaf8 Mon Sep 17 00:00:00 2001 From: MK Date: Wed, 23 Sep 2026 15:44:06 +0800 Subject: [PATCH 2/3] test: stabilize standalone npm fallback snapshot --- crates/vp_cli_snapshots/tests/cli_snapshots/README.md | 11 ++++++++--- .../assert-installed-npm.cjs | 3 ++- .../command_env_install_no_arg/mock-manifest.json | 3 +++ .../command_env_install_no_arg/snapshots.toml | 2 ++ .../command_env_install_standalone_npm_fallback.md | 2 +- 5 files changed, 16 insertions(+), 5 deletions(-) create mode 100644 crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_env_install_no_arg/mock-manifest.json diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/README.md b/crates/vp_cli_snapshots/tests/cli_snapshots/README.md index bba56cf886..b3fc7abf0a 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/README.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/README.md @@ -288,11 +288,16 @@ Snapshots are plain-text screen grids: styling is flattened, and redaction masks paths, durations, versions, UUIDs, thread counts, byte-size numbers (units kept: ` kB`), and content-hash asset suffixes (see `redact.rs`; sizes and hashes because output bytes differ across OSes). If -a case produces nondeterministic -output, fix it with a milestone or a redaction rule; never rerun until -green. Set +a case produces nondeterministic output, fix it with controlled fixture data, +a milestone, or a redaction rule; never rerun until green. Set `formatted-snapshot = true` on a step only when the test is about colors. +For registry fallback tests, use `local-registry = true` and a fixture +`mock-manifest.json` entry such as `"npm/latest"` to control the resolved version. +Keep the CLI input unpinned so the fallback is still tested, and keep exact +version assertions. Unmocked registry requests go upstream, so +`local-registry = true` alone does not freeze dist-tags. + Fixture trees are excluded from repo-wide fmt, lint, typecheck, and vitest (`vite.config.ts`, `tsconfig.json`); recorded snapshots and `snapshots.toml` are runner metadata and never appear inside the staged diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_env_install_no_arg/assert-installed-npm.cjs b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_env_install_no_arg/assert-installed-npm.cjs index 421650a99e..5a9c56cf37 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_env_install_no_arg/assert-installed-npm.cjs +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_env_install_no_arg/assert-installed-npm.cjs @@ -1,11 +1,12 @@ const assert = require('node:assert/strict'); const { execFileSync } = require('node:child_process'); +const manifest = require('./mock-manifest.json'); const installed = JSON.parse( execFileSync('vp', ['env', 'list', 'npm', '--json'], { encoding: 'utf8' }), ).package_managers.npm; assert.equal(installed.length, 1); -assert.match(installed[0].version, /^\d+\.\d+\.\d+/); +assert.equal(installed[0].version, manifest['npm/latest'].version); assert.equal(installed[0].current, false); assert.equal(installed[0].default, false); console.log('Standalone npm is installed but is not current'); diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_env_install_no_arg/mock-manifest.json b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_env_install_no_arg/mock-manifest.json new file mode 100644 index 0000000000..be12a03e2b --- /dev/null +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_env_install_no_arg/mock-manifest.json @@ -0,0 +1,3 @@ +{ + "npm/latest": { "name": "npm", "version": "10.9.4" } +} diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_env_install_no_arg/snapshots.toml b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_env_install_no_arg/snapshots.toml index c4c7bcd9fd..7e754b3679 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_env_install_no_arg/snapshots.toml +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_env_install_no_arg/snapshots.toml @@ -14,6 +14,8 @@ steps = [ name = "command_env_install_standalone_npm_fallback" vp = "global" comment = "Explicit npm installation uses standalone registry npm without installing Node.js." +# Fix the registry's latest response, not the CLI input: this must exercise +# the fallback while remaining independent of future npm releases. local-registry = true skip-platforms = ["windows"] seed-runtime = false diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_env_install_no_arg/snapshots/command_env_install_standalone_npm_fallback.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_env_install_no_arg/snapshots/command_env_install_standalone_npm_fallback.md index 774316077d..9cf93faff7 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_env_install_no_arg/snapshots/command_env_install_standalone_npm_fallback.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_env_install_no_arg/snapshots/command_env_install_standalone_npm_fallback.md @@ -7,7 +7,7 @@ Explicit npm installation uses standalone registry npm without installing Node.j an explicit npm scope exports the standalone npm fallback ``` -export VP_NPM_VERSION=12.1.0 +export VP_NPM_VERSION=10.9.4 Using npm (resolved from registry fallback) ``` From 5a601e0ecd8f4174805dfaffb369b2abe818136f Mon Sep 17 00:00:00 2001 From: MK Date: Wed, 23 Sep 2026 15:48:50 +0800 Subject: [PATCH 3/3] test: use npm 12 in standalone fallback fixture --- .../fixtures/command_env_install_no_arg/mock-manifest.json | 2 +- .../snapshots/command_env_install_standalone_npm_fallback.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_env_install_no_arg/mock-manifest.json b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_env_install_no_arg/mock-manifest.json index be12a03e2b..81697f5eda 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_env_install_no_arg/mock-manifest.json +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_env_install_no_arg/mock-manifest.json @@ -1,3 +1,3 @@ { - "npm/latest": { "name": "npm", "version": "10.9.4" } + "npm/latest": { "name": "npm", "version": "12.1.0" } } diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_env_install_no_arg/snapshots/command_env_install_standalone_npm_fallback.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_env_install_no_arg/snapshots/command_env_install_standalone_npm_fallback.md index 9cf93faff7..774316077d 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_env_install_no_arg/snapshots/command_env_install_standalone_npm_fallback.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_env_install_no_arg/snapshots/command_env_install_standalone_npm_fallback.md @@ -7,7 +7,7 @@ Explicit npm installation uses standalone registry npm without installing Node.j an explicit npm scope exports the standalone npm fallback ``` -export VP_NPM_VERSION=10.9.4 +export VP_NPM_VERSION=12.1.0 Using npm (resolved from registry fallback) ```