-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: --only now applies to package dependencies (#8163)
### Description Change `--only` so it behaves in a more sensible way. It still shouldn't be widely used, but now it at least does what it says it does. Previously `--only` would still follow package dependencies resulting additional tasks getting run that weren't expected. e.g. for task definition `"test": {"dependsOn": ["build", "^test"]}` and package `a` depending on `b`, then `turbo test --filter=a --only` would result in both `a#test` and `b#test` being run. With this PR now only `a#test` will be run. I changed the `--only` logic so now it will limit tasks in the graph to exactly those that are in the product of the packages implied by `--filter` and the tasks specified in the run args. This should make `--only` a far more sensible flag. ### Testing Instructions Added unit tests for testing the trimming of package dependencies and task id style dependencies e.g. `"dependsOn": ["a#test"]`
- Loading branch information
1 parent
55f052d
commit 0f08755
Showing
1 changed file
with
115 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters