Setting the file. One moment.
Subchapter 9.5
references/boundaries/RULE.mdMarkdown2 KBView on GitHub
Experimental feature - See RFC
Boundaries enforce package isolation by detecting:
package.json dependenciesturbo boundariesRun this to check for workspace violations across your monorepo.
Tags allow you to create rules for which packages can depend on each other.
// packages/ui/turbo.json
{
"tags": ["internal"]
}Rules go in root turbo.json:
// turbo.json
{
"boundaries": {
"tags": {
"public": {
"dependencies": {
"deny": ["internal"]
}
}
}
}
}This prevents public-tagged packages from importing internal-tagged packages.
Allow-list approach (only allow specific tags):
{
"boundaries": {
"tags": {
"public": {
"dependencies": {
"allow": ["public"]
}
}
}
}
}Deny-list approach (block specific tags):
{
"boundaries": {
"tags": {
"public": {
"dependencies": {
"deny": ["internal"]
}
}
}
}
}Restrict dependents (who can import this package):
{
"boundaries": {
"tags": {
"private": {
"dependents": {
"deny": ["public"]
}
}
}
}
}Package names work in place of tags:
{
"boundaries": {
"tags": {
"private": {
"dependents": {
"deny": ["@repo/my-pkg"]
}
}
}
}
}