Commit 2b67072
chore: migrate v4 to pnpm 11 (#3645)
## What changes
- Bump `packageManager` pnpm@10.24.0 → pnpm@11.0.9 (and the matching
`volta` hint).
- Drop `preinstall: npx only-allow pnpm` (ships in publish tarballs and
breaks downstream npm consumers — see apify/apify-client-js#893;
`only-allow`'s own `node_modules` guard catches the case but the `npx`
bootstrap fails first in `npm install -g` context).
- Add `devEngines.packageManager: { name: pnpm, version: 11.0.9, onFail:
error }`. pnpm v11 reimplemented `pnpm config / version / pkg` as native
subcommands (v10 still shells to npm), so `error` is safe here.
- Migrate `pnpm-workspace.yaml` from `onlyBuiltDependencies` (pnpm 10
list) to `allowBuilds` (pnpm 11 explicit map). Add `strictDepBuilds:
false` so install still proceeds if a new build-requesting dep shows up
without an explicit entry; existing entries all flipped to `true` to
preserve current build behavior.
- `pnpm-lock.yaml`: minor inline of `patchedDependencies` (one-line
hash) — pnpm 11 lockfile reader normalizes the old `hash:` / `path:`
map. Lockfile version stays at 9.0.
## Why on v4 specifically
All v4 packages require Node 22+ (the exception is `stagehand-crawler`
at `>=16`, untouched here). pnpm v11 also requires Node 22+, so v4 is
the natural place to land the upgrade — `master` (still supporting Node
18/20) stays on pnpm 10.
## Verified locally
- `corepack pnpm --version` after the change → `11.0.9` (Corepack picks
it up from `packageManager`).
- `pnpm install --frozen-lockfile` succeeds.
- `pnpm rebuild` runs all builds in the `allowBuilds` map without errors
(better-sqlite3, nx postinstall, puppeteer, etc.).
## CI notes
- All workflows use `apify/workflows/pnpm-install@main`, which corepacks
pnpm from `packageManager` — picks up v11 automatically.
- Releases use `lerna version`, not `pnpm version`, so the v10
npm-shellout trap from apify/apify-client-js#895 doesn't apply.
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: B4nan <615580+B4nan@users.noreply.github.com>1 parent d633c8b commit 2b67072
4 files changed
Lines changed: 32 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | 34 | | |
36 | 35 | | |
37 | 36 | | |
| |||
119 | 118 | | |
120 | 119 | | |
121 | 120 | | |
122 | | - | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
123 | 129 | | |
124 | 130 | | |
125 | | - | |
| 131 | + | |
126 | 132 | | |
127 | 133 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
39 | 46 | | |
40 | 47 | | |
41 | 48 | | |
| |||
0 commit comments