pnpm
Content-addressable store, strict deps, workspace protocol, catalogs.
When to Use
- Installing/managing npm packages
- Monorepo workspace setup with catalogs
- Overriding transitive dependencies
- Patching third-party packages
- CI/CD configuration for pnpm projects
- Supply chain security hardening
Quick Start
pnpm install # Install deps
pnpm add <pkg> # Add dep
pnpm add -D <pkg> # Dev dep
pnpm -r run build # Run in all packages
pnpm --filter @myorg/app build # Run in specific package
Workspace Setup
# pnpm-workspace.yaml
packages:
- 'packages/*'
- 'apps/*'
# Catalogs for centralized version management
catalog:
react: ^18.2.0
typescript: ~5.3.0
// package.json - Use workspace protocol and catalogs
{
"packageManager": "pnpm@10.28.2",
"dependencies": {
"@myorg/utils": "workspace:^",
"react": "catalog:"
}
}
Reference Files
| Task |
File |
| Commands, scripts, filtering |
cli.md |
| Workspaces, catalogs, config |
workspaces.md |
| Overrides, patches, hooks, store |
features.md |
| CI/CD, Docker, migration |
ci.md |
Loading Files
Consider loading these reference files based on your task:
DO NOT load all files at once. Load only what's relevant to your current task.
Verify Setup
After configuring a workspace, verify it works:
pnpm install # Install all deps
pnpm ls --depth 0 # Verify workspace links
pnpm -r run build # Build all packages
Cross-Skill References
- TypeScript libs → Use
ts-library skill for library patterns
- Build tooling → Use
tsdown or vite skills
1---2name: pnpm-23description: Use when managing Node.js dependencies with pnpm - install packages, configure monorepo workspaces, set up pnpm catalogs, resolve dependency conflicts with overrides, patch third-party packages, and configure CI pipelines for pnpm projects4license: MIT5---67# pnpm89Content-addressable store, strict deps, workspace protocol, catalogs.1011## When to Use1213- Installing/managing npm packages14- Monorepo workspace setup with catalogs15- Overriding transitive dependencies16- Patching third-party packages17- CI/CD configuration for pnpm projects18- Supply chain security hardening1920## Quick Start2122```bash23pnpm install # Install deps24pnpm add <pkg> # Add dep25pnpm add -D <pkg> # Dev dep26pnpm -r run build # Run in all packages27pnpm --filter @myorg/app build # Run in specific package28```2930## Workspace Setup3132```yaml33# pnpm-workspace.yaml34packages:35 - 'packages/*'36 - 'apps/*'3738# Catalogs for centralized version management39catalog:40 react: ^18.2.041 typescript: ~5.3.042```4344```json45// package.json - Use workspace protocol and catalogs46{47 "packageManager": "pnpm@10.28.2",48 "dependencies": {49 "@myorg/utils": "workspace:^",50 "react": "catalog:"51 }52}53```5455## Reference Files5657| Task | File |58| -------------------------------- | ----------------------------------------- |59| Commands, scripts, filtering | [cli.md](references/cli.md) |60| Workspaces, catalogs, config | [workspaces.md](references/workspaces.md) |61| Overrides, patches, hooks, store | [features.md](references/features.md) |62| CI/CD, Docker, migration | [ci.md](references/ci.md) |6364## Loading Files6566**Consider loading these reference files based on your task:**6768- [ ] [references/cli.md](references/cli.md) - if using pnpm commands, scripts, or filtering69- [ ] [references/workspaces.md](references/workspaces.md) - if setting up monorepo, catalogs, or workspace config70- [ ] [references/features.md](references/features.md) - if using overrides, patches, hooks, or managing store71- [ ] [references/ci.md](references/ci.md) - if configuring CI/CD, Docker, or migrating from npm/yarn7273**DO NOT load all files at once.** Load only what's relevant to your current task.7475## Verify Setup7677After configuring a workspace, verify it works:7879```bash80pnpm install # Install all deps81pnpm ls --depth 0 # Verify workspace links82pnpm -r run build # Build all packages83```8485## Cross-Skill References8687- **TypeScript libs** → Use `ts-library` skill for library patterns88- **Build tooling** → Use `tsdown` or `vite` skills