(text)
| 113 | } |
| 114 | |
| 115 | function relativeRuntimeSpecifiers(text) { |
| 116 | const specifiers = new Set(); |
| 117 | for (const match of text.matchAll(/\brequire\(\s*["'](\.[^"']+)["']\s*\)/g)) { |
| 118 | specifiers.add(match[1]); |
| 119 | } |
| 120 | for (const match of text.matchAll(/(?<![.\w])import\(\s*["'](\.[^"']+)["']\s*\)/g)) { |
| 121 | specifiers.add(match[1]); |
| 122 | } |
| 123 | for (const match of text.matchAll(/\bfrom\s+["'](\.[^"']+)["']/g)) { |
| 124 | specifiers.add(match[1]); |
| 125 | } |
| 126 | return [...specifiers]; |
| 127 | } |
| 128 | |
| 129 | async function addRuntimeDependencyFiles(packageRoot, filePath, selected) { |
| 130 | const extension = extname(filePath); |
no test coverage detected