Skip to content

pnpm commands (e.g. pnpm update) do not preserve pnpm-workspace.yaml formatting #10425

@stefreak

Description

@stefreak

Verify latest release

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

pnpm version

10.27.0

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

CLI

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

No response

Reproduction steps

  1. ensure package.json
% cat package.json
{
  "dependencies": {
    "zod": "catalog:default"
  }
}
  1. ensure pnpm-workspace.yaml
% cat pnpm-workspace.yaml
catalog:
  'zod': '4.3.4'
  1. run pnpm update
% pnpm update
Already up to date
Progress: resolved 1, reused 0, downloaded 0, added 0, done
Done in 170ms using pnpm v10.27.0

Describe the Bug

Observed behaviour (Bug) – Formatting is not preserved:

catalog:
  zod: 4.3.4

Expected Behavior

Expected formatting is preserved after pnpm update:

catalog:
  'zod': '4.3.4'

Which Node.js version are you using?

v24.11.1

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)

No response

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