* Distinct file paths that `filePath` DEPENDS ON — the inverse of * getDependentFilePaths: every file containing a symbol that a * symbol of this file has a cross-file edge into. Same edge-kind rules * (all kinds except `contains`); same reason imports-only is insufficient.
(filePath: string)
| 3666 | * (all kinds except `contains`); same reason imports-only is insufficient. |
| 3667 | */ |
| 3668 | getDependencyFilePaths(filePath: string): string[] { |
| 3669 | const sql = `SELECT DISTINCT tgt.file_path AS fp |
| 3670 | FROM edges e |
| 3671 | JOIN nodes src ON src.id = e.source |
| 3672 | JOIN nodes tgt ON tgt.id = e.target |
| 3673 | WHERE src.file_path = ? |
| 3674 | AND e.kind != 'contains' |
| 3675 | AND tgt.file_path != ?`; |
| 3676 | const rows = this.db.prepare(sql).all(filePath, filePath) as Array<{ fp: string }>; |
| 3677 | return rows.map((r) => r.fp); |
| 3678 | } |
| 3679 | |
| 3680 | /** |
| 3681 | * Cross-file edges whose TARGET is a node in `filePath` and whose SOURCE is a |
no test coverage detected