Loading...
Loading...
pnpm workspace monorepo management with filtering, catalogs, and shared configs. Use when setting up monorepos, managing workspace dependencies, filtering package commands, or sharing configuration across packages.
npx skill4agent add oakoss/agent-skills pnpm-workspacepnpm-workspace.yamlworkspace:| Pattern | API / Config | Key Points |
|---|---|---|
| Define workspace | | Globs match directories containing |
| Link local package | | Always resolves to local workspace package |
| Link with version range | | Fails install if local version does not satisfy range |
| Default catalog | | Single source of truth for dependency versions |
| Named catalog | | Multiple version sets (e.g., |
| Use catalog in package | | Resolved to actual version on |
| Filter by name | | Exact name or glob pattern ( |
| Filter with dependencies | | Package and all its dependencies |
| Filter with dependents | | Package and all packages that depend on it |
| Filter by directory | | All packages under a directory path |
| Filter by git changes | | Packages changed since a commit or branch |
| Exclude from filter | | Remove matching packages from selection |
| Run script in package | | Runs script only in matched packages |
| Recursive run | | Runs script in all workspace packages |
| Install all | | Single lockfile for entire workspace |
| Publish workspace pkg | | Replaces |
| Inject workspace deps | | Hard-links instead of symlinks; required for deploy |
| Script security (v10+) | | Lifecycle scripts blocked by default; opt-in per dep |
| Mistake | Correct Pattern |
|---|---|
Using | pnpm automatically replaces |
Forgetting to list directory in | Every package directory must match a glob in |
Using | Always use |
| Hardcoding versions duplicated across packages | Use |
Running | Run from workspace root; use |
Expecting | |
Not escaping | Use |
Using | |
| Lifecycle scripts failing after pnpm 10 upgrade | pnpm 10 blocks scripts by default; add deps to |
Using | Set |
ExploreTaskIf theskill is available, delegate build orchestration, task caching, and CI optimization to it. If theturboreposkill is available, delegate versioning, changelog generation, and npm publishing to it.changesets