Commit 6523ce9
authored
feat: support pnpm v11 by downloading from GitHub releases (#12)
## What
Lowers the supported floor to **pnpm v11** and switches the download source from the npm registry to **pnpm's GitHub releases**.
## Why the source changed
The original README claimed v11 couldn't be used because it "isn't a standalone executable." Investigating (and CI) showed the real situation is subtler:
- pnpm's **npm** per-platform packages differ by major, and for **v11** (`@pnpm/<os>-<arch>`) they are only **Node-SEA launchers** that `require` the JS `dist/` shipped separately in the main `@pnpm/exe` package. Downloading a single npm package yields a broken install (`Cannot find module dist/pnpm.mjs`) — caught by CI.
- pnpm's **GitHub release** archives (`pnpm-<os>-<arch>.tar.gz`, `pnpm-win32-<arch>.zip`) bundle the launcher **and** its `dist/` together as one self-contained download, for **both v11 and v12**, under one consistent naming scheme.
So downloading from GitHub releases unifies v11 and v12 under a single code path and Just Works.
## Changes
- `src/install-pnpm/download.ts`: resolve version against npm (exact/range/dist-tag), then download the matching self-contained archive from GitHub releases and extract it whole. Integrity is verified against the **SHA-256 `digest`** GitHub publishes per asset (replacing the previous npm sha512 check). `MIN_SUPPORTED_MAJOR` 12 → 11. Clear error when a resolved version has no GitHub release (some prereleases are npm-only).
- New `token` input (default `${{ github.token }}`) authenticates the release API lookup to avoid the anonymous rate limit.
- `README.md` / `action.yml`: describe the GitHub-releases flow; document the `token` input; note v11 has no Intel-macOS (`darwin-x64`) binary.
- `.github/workflows/test.yaml`: add v11 coverage — a cross-OS `smoke-v11` job (ubuntu x64/arm64, macOS arm64, Windows) and a `runtime-node-pnpm11` job (runtime install + `pnpm install` on v11). Repin v12 test versions from `alpha.19` (no GitHub release) to `alpha.21`.
- Rebuilt `dist/index.js`.1 parent 6bfbb82 commit 6523ce9
7 files changed
Lines changed: 421 additions & 245 deletions
File tree
- .github/workflows
- dist
- src
- inputs
- install-pnpm
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
56 | 56 | | |
57 | 57 | | |
58 | 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 | + | |
59 | 157 | | |
60 | 158 | | |
61 | 159 | | |
| |||
127 | 225 | | |
128 | 226 | | |
129 | 227 | | |
130 | | - | |
| 228 | + | |
131 | 229 | | |
132 | 230 | | |
133 | 231 | | |
| |||
168 | 266 | | |
169 | 267 | | |
170 | 268 | | |
171 | | - | |
| 269 | + | |
172 | 270 | | |
173 | 271 | | |
174 | 272 | | |
| |||
184 | 282 | | |
185 | 283 | | |
186 | 284 | | |
187 | | - | |
| 285 | + | |
188 | 286 | | |
189 | 287 | | |
190 | 288 | | |
| |||
209 | 307 | | |
210 | 308 | | |
211 | 309 | | |
212 | | - | |
| 310 | + | |
213 | 311 | | |
214 | 312 | | |
215 | 313 | | |
| |||
266 | 364 | | |
267 | 365 | | |
268 | 366 | | |
269 | | - | |
| 367 | + | |
270 | 368 | | |
271 | 369 | | |
272 | 370 | | |
| |||
311 | 409 | | |
312 | 410 | | |
313 | 411 | | |
314 | | - | |
| 412 | + | |
315 | 413 | | |
316 | 414 | | |
317 | 415 | | |
| |||
348 | 446 | | |
349 | 447 | | |
350 | 448 | | |
351 | | - | |
| 449 | + | |
352 | 450 | | |
353 | 451 | | |
354 | 452 | | |
| |||
358 | 456 | | |
359 | 457 | | |
360 | 458 | | |
361 | | - | |
| 459 | + | |
362 | 460 | | |
363 | 461 | | |
364 | 462 | | |
| |||
385 | 483 | | |
386 | 484 | | |
387 | 485 | | |
388 | | - | |
| 486 | + | |
389 | 487 | | |
390 | 488 | | |
391 | 489 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
16 | | - | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
| 25 | + | |
23 | 26 | | |
24 | 27 | | |
25 | 28 | | |
| |||
107 | 110 | | |
108 | 111 | | |
109 | 112 | | |
110 | | - | |
| 113 | + | |
111 | 114 | | |
112 | 115 | | |
113 | 116 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
| 11 | + | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
62 | 69 | | |
63 | 70 | | |
64 | 71 | | |
| |||
0 commit comments