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

Method getFileDependents

src/graph/queries.ts:134–143  ·  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

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

Callers 2

handleFileViewMethod · 0.45
mainFunction · 0.45

Calls 1

getDependentFilePathsMethod · 0.80

Tested by

no test coverage detected