(importSource: string, importingFile: string, line: number = 1)
| 50 | private exports: Map<string, string[]> = new Map(); |
| 51 | |
| 52 | trackImport(importSource: string, importingFile: string, line: number = 1): void { |
| 53 | // Normalize |
| 54 | const normalized = this.normalizeSource(importSource); |
| 55 | if (!normalized) return; |
| 56 | |
| 57 | const existing = this.usages.get(normalized) || []; |
| 58 | const relPath = this.toRelativePath(importingFile); |
| 59 | |
| 60 | // Avoid duplicates |
| 61 | if (!existing.some((u) => u.file === relPath && u.line === line)) { |
| 62 | existing.push({ file: relPath, line }); |
| 63 | this.usages.set(normalized, existing); |
| 64 | } |
| 65 | } |
| 66 | |
| 67 | trackExport(filePath: string, exportName: string): void { |
| 68 | const relPath = this.toRelativePath(filePath); |
no test coverage detected