* Distinct file paths that DEPEND ON `filePath`: every file containing a * symbol with a cross-file edge (any kind except `contains`) into a symbol * of this file. This is the file-level projection of the symbol dependency * graph and the basis for blast-radius / `affected` test selection.
(filePath: string, opts: { skipTiers?: boolean } = {})
| 3758 | * so a backend change doesn't affect them (#3320). |
| 3759 | */ |
| 3760 | getDependentFilePaths(filePath: string, opts: { skipTiers?: boolean } = {}): string[] { |
| 3761 | const sql = `SELECT DISTINCT src.file_path AS fp |
| 3762 | FROM edges e |
| 3763 | JOIN nodes tgt ON tgt.id = e.target |
| 3764 | JOIN nodes src ON src.id = e.source |
| 3765 | WHERE tgt.file_path = ? |
| 3766 | AND e.kind != 'contains' |
| 3767 | AND src.file_path != ?${opts.skipTiers ? ` |
| 3768 | AND (e.metadata IS NULL OR json_extract(e.metadata, '$.tier') IS NULL)` : ''}`; |
| 3769 | const rows = this.db.prepare(sql).all(filePath, filePath) as Array<{ fp: string }>; |
| 3770 | return rows.map((r) => r.fp); |
| 3771 | } |
| 3772 | |
| 3773 | /** |
| 3774 | * Distinct file paths that `filePath` DEPENDS ON — the inverse of |
no test coverage detected