Repository navigation
Switch workspace to pnpm catalog specifiers - #3943
Conversation
Replace explicit external package versions with pnpm 'catalog:' specifiers across package.json files to centralize dependency resolution. Add a catalog mapping to pnpm-workspace.yaml and update pnpm-lock.yaml accordingly. Also add AGENTS.md (symlink to CLAUDE.md). Files touched: apps/extension, apps/web, root package.json, packages/shared, packages/trpc, packages/ui, pnpm-workspace.yaml, pnpm-lock.yaml, and AGENTS.md.
There was a problem hiding this comment.
Code Review
This pull request effectively transitions the workspace to use pnpm's catalog: specifiers, centralizing dependency versions. This is a great improvement for dependency management and consistency across the monorepo. The changes in package.json files and the addition of the catalog to pnpm-workspace.yaml are well-executed. I have one point of feedback regarding the removal of the onlyBuiltDependencies configuration in pnpm-workspace.yaml, which could have unintended side effects on the build process for packages with native addons.
I am having trouble creating individual review comments. Click here to see my feedback.
pnpm-workspace.yaml (4-11)
The onlyBuiltDependencies configuration has been removed without explanation. This setting was likely forcing specific packages with native addons, like sharp and esbuild, to be built from source. Removing this configuration will cause pnpm to fall back to its default behavior, which is typically to use pre-built binaries. While this can speed up installation, it may lead to runtime errors if the pre-built binaries are not compatible with the target environment, which might have been the original reason for this configuration. Please either restore this configuration or provide a justification for its removal in the pull request description.
Replace explicit external package versions with pnpm 'catalog:' specifiers across package.json files to centralize dependency resolution. Add a catalog mapping to pnpm-workspace.yaml and update pnpm-lock.yaml accordingly. Also add AGENTS.md (symlink to CLAUDE.md). Files touched: apps/extension, apps/web, root package.json, packages/shared, packages/trpc, packages/ui, pnpm-workspace.yaml, pnpm-lock.yaml, and AGENTS.md.
Check if the Pull Request fulfils these requirements
Greptile Summary
This PR centralizes all external dependency version management by migrating explicit version strings to pnpm
catalog:specifiers across all 7 workspace packages, introducing a 63-entry catalog inpnpm-workspace.yaml. The migration is thorough and correct — everycatalog:reference in everypackage.jsonhas a corresponding entry in the workspace catalog, and thecatalogMode: strictsetting will enforce this going forward.Key findings:
apps/extension,apps/web,packages/shared,packages/trpc,packages/ui,packages/configs, and the rootpackage.jsonnow usecatalog:specifiers, with every entry properly defined inpnpm-workspace.yaml.onlyBuiltDependenciesremoval: TheonlyBuiltDependenciesallowlist (@firebase/util,@vercel/speed-insights,esbuild,protobufjs,sharp,spawn-sync,unrs-resolver) was silently removed frompnpm-workspace.yamlas part of this change. This setting controlled which packages were allowed to execute lifecycle scripts during install; its removal is unrelated to the catalog migration goal and may affect security posture or native package builds.AGENTS.md: Noted as a symlink toCLAUDE.mdper the PR description.Confidence Score: 3/5
onlyBuiltDependencieswarrants clarification before merging.onlyBuiltDependenciesinpnpm-workspace.yaml, which previously restricted lifecycle script execution to 7 known packages. This is a potential security regression or could break native package builds (e.g.,sharp,esbuild) depending on pnpm 10's default behavior when the field is absent.onlyBuiltDependenciesneeds to be verified as intentional.Prompt To Fix All With AI
Last reviewed commit: c912ca7