Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

build: migrate from pnpm overrides to catalogs#14892

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
denolfe wants to merge3 commits intomain
base:main
Choose a base branch
Loading
frombuild/pnpm-catalog-update

Conversation

@denolfe
Copy link
Member

@denolfedenolfe commentedDec 10, 2025
edited
Loading

Overview

Migrates Payload monorepo frompnpm.overrides topnpm catalogs for centralized dependency version management. This is Phase 1 of a two-phase migration, focusing on the 8 dependencies currently in overrides.

Key Changes

  • Add pnpm catalog topnpm-workspace.yaml

    • 8 shared dependencies:copyfiles,cross-env,dotenv,graphql,mongodb-memory-server,react,react-dom,typescript

    Single source of truth for version management across workspace packages.

  • Update 9 package.json files to usecatalog: protocol

    • Root, test, and 7 workspace packages now reference catalog instead of hardcoded versions
    • Removedpnpm.overrides block from root package.json
  • Fix prod test setup for--ignore-workspace

    • setupProd.ts now resolvescatalog: entries to actual versions before runningpnpm i --ignore-workspace

    The--ignore-workspace flag ignores all workspace config including catalogs, so entries must be resolved beforehand.

Design Decisions

Catalog over overrides:pnpm.overrides forces versions on all transitive dependencies. Catalogs provide explicit opt-in version sharing viacatalog: protocol - cleaner and more intentional.

Minimal scope (Phase 1): Only migrated the 8 existing override dependencies. Phase 2 will audit and expand to commonly-duplicated deps likenext,drizzle-orm, etc.

peerDependencies unchanged: Packages like@payloadcms/ui keep wide version ranges (e.g.,"react": "^19.0.1 || ^19.1.2 || ^19.2.1") for consumer compatibility.

No external YAML parser:setupProd.ts uses simple string parsing to extract catalog entries, avoiding new dependencies.

Overall Flow

sequenceDiagram    participant Root as pnpm-workspace.yaml    participant Pkg as package.json files    participant Install as pnpm install    participant Pack as pnpm pack    Root->>Root: Define catalog versions    Pkg->>Pkg: Reference via "catalog:"    Install->>Root: Resolve catalog: to versions    Install->>Pkg: Install resolved versions    Pack->>Pkg: Replace catalog: with actual versions in tarball
Loading

References / Links

- Add catalog section to pnpm-workspace.yaml with 8 shared deps- Update 9 package.json files to use catalog: protocol- Remove pnpm.overrides from root package.json- Deps: copyfiles, cross-env, dotenv, graphql, mongodb-memory-server,  react, react-dom, typescript
@github-actions
Copy link
Contributor

github-actionsbot commentedDec 10, 2025
edited
Loading

📦 esbuild Bundle Analysis for payload

This analysis was generated byesbuild-bundle-analyzer. 🤖
This PR introduced no changes to the esbuild bundle! 🙌

--ignore-workspace ignores all workspace config including catalogs.Replace catalog: entries with actual versions in test/package.jsonduring setupProd so pnpm install succeeds without workspace context.
Re-introduce pnpm.overrides using catalog: protocol to forcetransitive dependencies to catalog versions while keepingcatalog as single source of truth.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@AlessioGrAlessioGrAwaiting requested review from AlessioGrAlessioGr will be requested when the pull request is marked ready for reviewAlessioGr is a code owner

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

@denolfe

[8]ページ先頭

©2009-2025 Movatter.jp