Skip to content

Commit f4c3c75

Browse files
fix(affected): include dependants in affected filter
1 parent 33bef9e commit f4c3c75

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

crates/turborepo-lib/src/run/scope/filter.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ impl<'a, T: GitChangeDetector> FilterResolver<'a, T> {
201201
include_uncommitted: true,
202202
allow_unknown_objects: true,
203203
}),
204+
include_dependents: true,
204205
..Default::default()
205206
});
206207
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Setup
2+
$ . ${TESTDIR}/../../helpers/setup_integration_test.sh
3+
4+
Create a new branch
5+
$ git checkout -b my-branch
6+
Switched to a new branch 'my-branch'
7+
8+
Edit a file that affects `util` package
9+
$ echo "foo" >> packages/util/index.js
10+
Commit the change
11+
$ git add .
12+
$ git commit -m "add foo" --quiet
13+
14+
Validate that we run `util#build` and all rdeps
15+
$ ${TURBO} run build --affected --dry=json | jq '.tasks | map(select(.command != "<NONEXISTENT>")) | map(.taskId)| sort'
16+
[
17+
"my-app#build",
18+
"util#build"
19+
]

0 commit comments

Comments
 (0)