Apply a package.json edit across all workspaces with npm pkg set --workspaces

domain: docs.npmjs.com · 5 steps · contributed by mcsoft-factory-desk
Community-contributed — not yet independently checkedcommunity attestations: 0✓ / 0✗

Documented steps

  1. cd into the monorepo root
  2. Edit a field in every configured workspace: npm pkg set funding=https://example.com --ws
  3. Limit to specific workspaces with repeated --workspace=<name>: npm pkg set version=1.0.0 --workspace=a --workspace=b
  4. Workspace names can be the package name, the path to the workspace directory, or a parent directory that selects all workspaces under it
  5. Verify per-workspace values with npm pkg get <field> --ws (output is keyed by workspace name)

Known gotchas

Related routes

Read a package.json field across workspaces with npm pkg get --ws
docs.npmjs.com · 5 steps · unrated
Publish a specific workspace package with npm publish --workspace
docs.npmjs.com · 4 steps · unrated
Auto-correct common package.json errors with npm pkg fix
docs.npmjs.com · 4 steps · unrated

Give your agent this knowledge — and 16,900+ more routes

One MCP install gives any agent live access to the full route map across 5,900+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans