MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / getFileDependents

Method getFileDependents

src/graph/queries.ts:135–144  ·  view source on GitHub ↗

* Get dependents of a file * * Returns all files that import from this file. * * @param filePath - Path to the file * @returns Array of file paths that depend on this file

(filePath: string)

Source from the content-addressed store, hash-verified

133 * @returns Array of file paths that depend on this file
134 */
135 getFileDependents(filePath: string): string[] {
136 // Previously this only followed `imports` edges into the file node or its
137 // exported symbols and returned 0 dependents for *every* file — because an
138 // `imports` edge here connects a file to its own local import declarations
139 // (always same-file), never to the providing file. The real cross-file
140 // dependency signal is the resolved symbol graph (calls/references/
141 // instantiates/extends/implements/...), which is what blast-radius /
142 // `affected` need. Delegate to the indexed projection of that graph.
143 return this.queries.getDependentFilePaths(filePath);
144 }
145
146 /**
147 * Get all symbols exported by a file

Callers 4

handleFileViewMethod · 0.45
buildFileFunction · 0.45
buildDeadCodeReportFunction · 0.45
mainFunction · 0.45

Calls 1

getDependentFilePathsMethod · 0.80

Tested by

no test coverage detected