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.jsonpackages:
- "apps/*"
- "packages/*" # pnpm-workspace.yamlRelated terms
- monorepo — A single version-control repository that holds several related projects, such as a web app, an API and their shared libraries.
- pnpm — A fast JavaScript package manager that stores each package version once on disk and has strong built-in support for workspaces.
- package.json — The JSON file at the root of every JavaScript package that records its name, version, dependencies, entry points and other settings.
- npm — The package manager that comes with Node.js, plus the public registry where JavaScript packages are published.
Taught in
- Monorepo Architecture: Workspaces & Turborepo — Production Full-Stack Engineering
- End-to-End Type Safety: Shared Schemas & DTOs — Production Full-Stack Engineering
- Unified Build Pipelines: Caching & Dependency Graphs — Production Full-Stack Engineering