Skip to content

catalogMode: strict creates invalid pnpm-workspace.yaml #10176

@stefanprobst

Description

@stefanprobst

Verify latest release

  • I verified that the issue exists in the latest pnpm release

pnpm version

10.21.1

Which area(s) of pnpm are affected? (leave empty if unsure)

No response

Link to the code that reproduces this issue or a replay of the bug

https://github.com/stefanprobst/issue-pnpm-catalog-strict

Reproduction steps

  • clone the reproduction repo
  • pnpm install
  • see that the catalog in pnpm-workspace.yaml lists react: ^19.2.0
  • cd packages/repro
  • pnpm add react
  • see that now the catalog in pnpm-workspace.yaml lists react: 'catalog:' not react: ^19.2.0

Describe the Bug

pnpm add with catalogMode: strict adds "catalog:" instead of a version range to the catalog in pnpm-workspace.yaml

Expected Behavior

pnpm add with catalogMode: strict should always write actual version ranges to catalog, not catalog: which is circular

Which Node.js version are you using?

24.11.0

Which operating systems have you used?

  • macOS
  • Windows
  • Linux

If your OS is a Linux based, which one it is? (Include the version if relevant)

ubuntu

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions