Common Filter Patterns¶
Practical examples for typical monorepo scenarios.
Single Package¶
Run task in one package:
Package with Dependencies¶
Build a package and everything it depends on:
Useful for: ensuring all dependencies are built before the target.
Package Dependents¶
Run in all packages that depend on a library:
Useful for: testing consumers after changing a shared package.
Dependents Only (Exclude Target)¶
Test packages that depend on ui, but not ui itself:
Changed Packages¶
Run only in packages with file changes since last commit:
Since a specific branch point:
Changed + Dependents (PR Builds)¶
Run in changed packages AND packages that depend on them:
Or use the shortcut:
Directory-Based¶
Run in all apps:
Run in specific directories:
Scope-Based¶
Run in all packages under a scope:
Exclusions¶
Run in all apps except admin:
Run everywhere except specific packages:
Complex Combinations¶
Apps that changed, plus their dependents:
All packages except docs, but only if changed:
Debugging Filters¶
Use --dry to see what would run without executing:
Use --dry=json for machine-readable output:
CI/CD Patterns¶
PR validation (most common):
Deploy only changed apps:
Full rebuild of specific app and deps: