Commit b554bd7
committed
fix(@angular/build): add temporary directory cleanup for Vitest executor
The Vitest-based unit test builder created temporary output directories within `dist/test-out` for each run but did not remove them upon completion. This led to an accumulation of orphaned directories, consuming unnecessary disk space. This commit introduces robust cleanup logic to the `VitestExecutor` by: - Deleting the temporary output directory during graceful shutdown using the `asyncDispose` method. - Registering a `SIGINT` process handler to ensure the directory is also removed during forceful interruptions, such as when a user presses `Ctrl-C` in watch mode.1 parent abf0032 commit b554bd7
File tree
1 file changed
+11
-1
lines changed- packages/angular/build/src/builders/unit-test/runners/vitest
1 file changed
+11
-1
lines changedLines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
33 | 40 | | |
34 | 41 | | |
35 | 42 | | |
36 | 43 | | |
| 44 | + | |
37 | 45 | | |
38 | 46 | | |
39 | 47 | | |
| |||
78 | 86 | | |
79 | 87 | | |
80 | 88 | | |
| 89 | + | |
81 | 90 | | |
| 91 | + | |
82 | 92 | | |
83 | 93 | | |
84 | 94 | | |
| |||
0 commit comments