| 331 | |
| 332 | /** The files of `now` whose digest differs from `was`'s; a stamp alone moved nothing. */ |
| 333 | export 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 |