This commit is contained in:
2025-12-12 23:49:56 +01:00
parent cae81b1088
commit 8f1db21fb1
29 changed files with 879 additions and 399 deletions

View File

@@ -75,13 +75,13 @@ function extractImportModule(line: string): string | null {
// Handle: import ... from 'x';
const fromMatch = trimmed.match(/from\s+['"](.*)['"]/);
if (fromMatch) {
return fromMatch[1];
return fromMatch[1] || null;
}
// Handle: import 'x';
const sideEffectMatch = trimmed.match(/^import\s+['"](.*)['"]\s*;?$/);
if (sideEffectMatch) {
return sideEffectMatch[1];
return sideEffectMatch[1] || null;
}
return null;