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

Function changedModuleConfigs

src/resolution/index.ts:333–340  ·  view source on GitHub ↗
(was: ModuleConfigSnapshot, now: ModuleConfigSnapshot)

Source from the content-addressed store, hash-verified

331
332/** The files of `now` whose digest differs from `was`'s; a stamp alone moved nothing. */
333export function changedModuleConfigs(was: ModuleConfigSnapshot, now: ModuleConfigSnapshot): string[] {
334 const digest = (entry: string): string => entry.split('@')[0]!;
335 // A snapshot from before manifests and compile databases counted says nothing about them.
336 const buildFilesKnown = 'Cargo.toml' in was;
337 return Object.keys(now).filter((rel) =>
338 (buildFilesKnown || !/(?:^|\/)(?:Cargo\.toml|compile_commands\.json)$/.test(rel)) &&
339 digest(was[rel] ?? 'absent') !== digest(now[rel]!));
340}
341
342/**
343 * The languages whose imports a changed config file governs: the ES-module

Callers 1

syncMethod · 0.85

Calls 1

digestFunction · 0.85

Tested by

no test coverage detected