Skip to content

workspace/pnpm-workspace

Ensures pnpm-workspace.yaml declares the workspace globs pnpm needs; in a single-package project it creates the file with only a comment placeholder:

packages:
- 'apps/*'
- 'packages/*'

When the file exists with a packages: list, only missing globs are inserted. Comments, other keys such as catalog: and overrides:, key order, indentation, quote style, and line endings stay untouched. A file without a packages: key is left alone.

Layouts that cannot be edited safely, such as a flow-style packages: list missing a glob, are reported as a conflict.

The task applies only when pnpm is the detected package manager.