()
| 557 | let cleaned = false |
| 558 | let committed = false |
| 559 | const cleanUp = () => { |
| 560 | // If commit was already called, ignore the clean up even if a cancel was requested |
| 561 | // This minimizes the chances of leaving the deps cache in a corrupted state |
| 562 | if (!cleaned && !committed) { |
| 563 | cleaned = true |
| 564 | // No need to wait, we can clean up in the background because temp folders |
| 565 | // are unique per run |
| 566 | debug?.(colors.green(`removing cache dir ${processingCacheDir}`)) |
| 567 | try { |
| 568 | // When exiting the process, `fsp.rm` may not take effect, so we use `fs.rmSync` |
| 569 | fs.rmSync(processingCacheDir, { recursive: true, force: true }) |
| 570 | } catch { |
| 571 | // Ignore errors |
| 572 | } |
| 573 | } |
| 574 | } |
| 575 | |
| 576 | const successfulResult: DepOptimizationResult = { |
| 577 | metadata, |
no outgoing calls
no test coverage detected