package workspace

A package-manager feature that treats several folders in one repository as separate packages and links them to each other locally.

In more detail

Each app or library keeps its own package.json, and the package manager installs everything once and links local packages together instead of downloading them. A dependency written as workspace:* always points at the copy in the same repository, so a shared schema change is picked up immediately.

Examples

"@acme/schemas": "workspace:*" in apps/web/package.json
packages:
  - "apps/*"
  - "packages/*"   # pnpm-workspace.yaml

Related terms

Taught in

References