Adopt pnpm catalogs for devDependencies (#93071)
### What? Adopt pnpm [catalogs](https://pnpm.io/catalogs) for shared hoisted devDependencies: `typescript`, `jest`, `eslint`, and `prettier`. Each is pinned once in `pnpm-workspace.yaml` and referenced as `"<name>": "catalog:"` by every consumer. Also adds the missing `dom.iterable` lib to `@next/routing`'s tsconfig, required by `URLSearchParams.entries()` in TypeScript 6. ### Why? Several packages invoke these binaries in their build, test, or lint scripts but do not declare them in their own `devDependencies` — they rely on the hoisted root install. This breaks Turborepo's cache invalidation: without a declared dep, a package has no lockfile edge to the tool, so bumping its version (e.g. #91257's TypeScript 5 → 6 upgrade) does not invalidate that package's task hash. `@next/routing`'s `types` task has been a remote-cache hit on canary since the TS 6 bump, even though it now fails locally on a cold cache — CI is replaying a stale pre-bump success. The same latent hazard exists for `jest` (`@next/codemod`), `eslint` (`@next/bundle-analyzer-ui`), and `prettier` (`create-next-app`). ### How? - `pnpm-workspace.yaml` defines `catalog:` entries for each tool. - Consumer packages declare `"<name>": "catalog:"`. pnpm still hoists one copy, but each consumer now has a real lockfile edge to the resolved version. - Root `package.json` migrates each pin to `"catalog:"` so the workspace file is the single source of truth. Turborepo needs no changes — its existing per-package hashing picks up lockfile edge changes automatically. Future catalog bumps will invalidate every consumer's cache. `@types/node` is a deliberate omission from this round: several packages intentionally pin different majors (`^22`, `^20`, `20.14.2`), so migrating it needs per-package intent review rather than bulk conversion. <!-- NEXT_JS_LLM_PR -->
Showing
| ... | @@ -198,7 +198,7 @@ | ... | @@ -198,7 +198,7 @@ |
| "dd-trace": "4.12.0", | "dd-trace": "4.12.0", | ||
| "es5-ext": "0.10.53", | "es5-ext": "0.10.53", | ||
| "escape-string-regexp": "2.0.0", | "escape-string-regexp": "2.0.0", | ||
| "eslint": "9.37.0", | "eslint": "catalog:", | ||
| "eslint-config-next": "workspace:*", | "eslint-config-next": "workspace:*", | ||
| "eslint-formatter-codeframe": "7.32.1", | "eslint-formatter-codeframe": "7.32.1", | ||
| "eslint-plugin-eslint-plugin": "5.2.1", | "eslint-plugin-eslint-plugin": "5.2.1", | ||
| ... | @@ -230,7 +230,7 @@ | ... | @@ -230,7 +230,7 @@ |
| "image-size": "1.2.1", | "image-size": "1.2.1", | ||
| "is-animated": "2.0.2", | "is-animated": "2.0.2", | ||
| "isomorphic-unfetch": "3.0.0", | "isomorphic-unfetch": "3.0.0", | ||
| "jest": "29.7.0", | "jest": "catalog:", | ||
| "jest-diff": "29.7.0", | "jest-diff": "29.7.0", | ||
| "jest-environment-jsdom": "29.7.0", | "jest-environment-jsdom": "29.7.0", | ||
| "jest-extended": "4.0.2", | "jest-extended": "4.0.2", | ||
| ... | @@ -262,7 +262,7 @@ | ... | @@ -262,7 +262,7 @@ |
| "postcss-pseudoelements": "5.0.0", | "postcss-pseudoelements": "5.0.0", | ||
| "postcss-short-size": "4.0.0", | "postcss-short-size": "4.0.0", | ||
| "postcss-trolling": "0.1.7", | "postcss-trolling": "0.1.7", | ||
| "prettier": "3.6.2", | "prettier": "catalog:", | ||
| "pretty-bytes": "5.3.0", | "pretty-bytes": "5.3.0", | ||
| "pretty-ms": "7.0.0", | "pretty-ms": "7.0.0", | ||
| "random-seed": "0.3.0", | "random-seed": "0.3.0", | ||
| ... | @@ -302,7 +302,7 @@ | ... | @@ -302,7 +302,7 @@ |
| "tsec": "0.2.1", | "tsec": "0.2.1", | ||
| "tsx": "4.19.2", | "tsx": "4.19.2", | ||
| "turbo": "2.9.4", | "turbo": "2.9.4", | ||
| "typescript": "6.0.2", | "typescript": "catalog:", | ||
| "typescript-eslint": "8.46.0", | "typescript-eslint": "8.46.0", | ||
| "unfetch": "4.2.0", | "unfetch": "4.2.0", | ||
| "wait-port": "0.2.2", | "wait-port": "0.2.2", | ||
| ... | ... |
This diff is collapsed.
Please
register
or
sign in
to comment