Each of `files` (absolute) as the project sees it now, keyed by its project-relative path.
(projectRoot: string, files: Iterable<string>, previous: ModuleConfigSnapshot)
| 277 | |
| 278 | /** Each of `files` (absolute) as the project sees it now, keyed by its project-relative path. */ |
| 279 | function moduleConfigSnapshot(projectRoot: string, files: Iterable<string>, previous: ModuleConfigSnapshot): ModuleConfigSnapshot { |
| 280 | const snapshot: ModuleConfigSnapshot = {}; |
| 281 | for (const abs of files) { |
| 282 | const rel = path.relative(projectRoot, abs).replace(/\\/g, '/'); |
| 283 | // A config outside the project (an `extends` into node_modules or a parent |
| 284 | // folder) is read where it is; the key stays relative so the index moves. |
| 285 | snapshot[rel] = moduleConfigEntry(abs, previous[rel], projectRoot); |
| 286 | } |
| 287 | return snapshot; |
| 288 | } |
| 289 | |
| 290 | /** |
| 291 | * One file's snapshot entry. Every sync looks at these files, so one whose |
no test coverage detected