-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(tui): avoid panic on restarting tasks during watch (#9032)
### Description Fixes #9016 Crash was caused by two issues: - Mistakenly calling `update_tasks` instead of `restart_tasks` when handling a restart event 🙃 . This meant if a package changed that did not matter (a package in scope, but that didn't have a task definited) we would "restart" no tasks, but this would end up clearing out the entire task list. - The watch client can declare it is restarting a task that is not in the current list. This happens if a `build` script is added to a workspace `package.json` after `turbo watch build` is run. ### Testing Instructions Added unit tests that test we no longer crash when: - updating task list to nothing (TUI cannot display this) - restarting tasks that were not in original list
- Loading branch information
1 parent
15ebd22
commit 21b6269
Showing
4 changed files
with
50 additions
and
3 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
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
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
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