Commit 899bf25
committed
test(snap): add pnpm v11 snap tests for command adaptation coverage (#1289)
Add 26 snap test cases for `pnpm@11.0.6` (latest stable v11), mirroring the existing pnpm10 test suite, to validate `vp`'s command-adaptation layer against pnpm v11.
## Coverage
New `snap-tests-global/*-pnpm11` fixtures for: add, cache, config, dedupe, dlx, link, list, outdated, owner, pack, prune, publish, remove, unlink, update, view, vpx, why, dev-engines-runtime — plus workspace variants for add/list/outdated/pack/remove/update/why.
## pnpm v11 compatibility findings
- **`cache`,** **`dlx`,** **`owner`,** **`view`,** **`vpx`** — output identical to pnpm v10.
- **`add`,** **`install`,** **`link`** — now report `packageManagerDependencies` (`@pnpm/exe`, `pnpm`) as part of install output; captured in snapshots.
- **`why`** — output format restructured from tree-based to flat; captured in snapshots.
- **`publish --dry-run`** — pnpm v11 no longer delegates to npm; minor output diff captured.
- **`unlink`** **(workaround applied)** — pnpm v11 now runs a reconciling install after removing the override from `pnpm-workspace.yaml`. Under `CI=true` this defaults to `--frozen-lockfile` and fails with `ERR_PNPM_LOCKFILE_CONFIG_MISMATCH`. Fix: snap tests pass `-- --no-frozen-lockfile` to `vp unlink`.
- **`config`** **at project scope (workaround applied)** — pnpm v11 moved project config from `.npmrc` into `pnpm-workspace.yaml`, which only accepts camelCase keys. Test key renamed to `vitePlusPmConfigTestKey`.
- **`dev-engines-runtime`** — bumped pinned Node.js to `22.22.2` to satisfy vp's current minimum (`^20.19.0 || >=22.12.0`).
- **`prune`** — skipped on `win32` (platform-specific output instability, matches other tests).
Global install is not affected — `vp install -g` already forces npm.
## RFC updates
pnpm v11 is now stable, so the support matrix in 7 RFCs (`add-remove`, `dedupe`, `install`, `link-unlink`, `outdated`, `update`, `why`) lists `pnpm@11.x` as supported (no WIP marker). The `link-unlink` entry retains the `-- --no-frozen-lockfile` note for CI usage.
## Test plan
- [x] `pnpm -F vite-plus snap-test-global pnpm11` — all 26 cases pass with clean exit codes
- [x] `cargo test -p vite_install --lib commands::unlink` — unit tests still pass
- [x] CI green on all platforms1 parent 0901785 commit 899bf25
106 files changed
Lines changed: 3367 additions & 0 deletions
File tree
- packages/cli/snap-tests-global
- command-add-pnpm11-with-workspace
- packages
- app
- utils
- command-add-pnpm11
- command-cache-pnpm11
- command-config-pnpm11
- command-dedupe-pnpm11
- command-dlx-pnpm11
- command-link-pnpm11
- command-list-pnpm11-with-workspace
- packages
- app
- utils
- command-list-pnpm11
- command-outdated-pnpm11-with-workspace
- packages
- app
- utils
- command-outdated-pnpm11
- command-owner-pnpm11
- command-pack-pnpm11-with-workspace
- packages
- app
- utils
- command-pack-pnpm11
- command-prune-pnpm11
- command-publish-pnpm11
- command-remove-pnpm11-with-workspace
- packages
- app
- utils
- command-remove-pnpm11
- command-unlink-pnpm11
- command-update-pnpm11-with-workspace
- packages
- app
- utils
- command-update-pnpm11
- command-view-pnpm11
- command-vpx-pnpm11
- command-why-pnpm11-with-workspace
- packages
- app
- utils
- command-why-pnpm11
- dev-engines-runtime-pnpm11
- rfcs
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
Lines changed: 215 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
0 commit comments