Adopt pnpm catalogs for devDependencies#93071
Merged
Merged
Conversation
Contributor
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
bgw
approved these changes
Apr 20, 2026
Extends pnpm catalog adoption to jest, eslint, and prettier. Same motivation as typescript: packages that invoke these binaries in their scripts but do not declare them in their own devDependencies rely on hoisted installs, which leaves Turborepo's package hash without a lockfile edge to invalidate on version bumps. - pnpm-workspace.yaml: add catalog entries for eslint, jest, prettier. - Root package.json: migrate the three pins to catalog:. - next-codemod: add jest: catalog: (invokes jest in 'test' script). - apps/bundle-analyzer: add eslint: catalog: (invokes eslint in 'lint'). - create-next-app: add prettier: catalog: (invokes prettier in 'lint-fix'). - next-codemod, apps/bundle-analyzer: their existing literal typescript pins also move to catalog: for consistency with the first pass.
06d6fc4 to
8e2af10
Compare
00d0672 to
8e2af10
Compare
Contributor
Author
Merge activity
|
This was referenced Apr 24, 2026
lukesandberg
added a commit
that referenced
this pull request
Apr 24, 2026
Reverts #93071 This breaks our use of lerna, lerna uses npm-package-arg to parse package.json files and cannot resolve `catalog` references
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What?
Adopt pnpm catalogs for shared hoisted devDependencies:
typescript,jest,eslint, andprettier. Each is pinned once inpnpm-workspace.yamland referenced as"<name>": "catalog:"by every consumer.Also adds the missing
dom.iterablelib to@next/routing's tsconfig, required byURLSearchParams.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'stypestask 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), andprettier(create-next-app).How?
pnpm-workspace.yamldefinescatalog:entries for each tool."<name>": "catalog:". pnpm still hoists one copy, but each consumer now has a real lockfile edge to the resolved version.package.jsonmigrates 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/nodeis 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.