* 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)
| 3777 | * (all kinds except `contains`); same reason imports-only is insufficient. |
| 3778 | */ |
| 3779 | getDependencyFilePaths(filePath: string): string[] { |
| 3780 | const sql = `SELECT DISTINCT tgt.file_path AS fp |
| 3781 | FROM edges e |
| 3782 | JOIN nodes src ON src.id = e.source |
| 3783 | JOIN nodes tgt ON tgt.id = e.target |
| 3784 | WHERE src.file_path = ? |
| 3785 | AND e.kind != 'contains' |
| 3786 | AND tgt.file_path != ?`; |
| 3787 | const rows = this.db.prepare(sql).all(filePath, filePath) as Array<{ fp: string }>; |
| 3788 | return rows.map((r) => r.fp); |
| 3789 | } |
| 3790 | |
| 3791 | /** |
| 3792 | * Cross-file edges whose TARGET is a node in `filePath` and whose SOURCE is a |
no test coverage detected