addWorkspaceMember
addWorkspaceMember(
workspaceYaml,member):WorkspaceYamlEdit
Defined in: pnpm-workspace.ts:117
Add member as the first entry of the packages: list, unless the list already has it. A targeted
line-based edit, not a YAML round-trip: the file routinely carries a catalog:/catalogs:/overrides:
block after packages:, and a parser would reformat content nobody asked to touch. It only ever adds a
line, quoted like "docs", and changes nothing when there is no packages: key or it is not the plain
block-list form.
Parameters
Section titled “Parameters”workspaceYaml
Section titled “workspaceYaml”string
member
Section titled “member”string