(dir: string, out: string[])
| 34 | } |
| 35 | |
| 36 | function scanFiles(dir: string, out: string[]): void { |
| 37 | if (!existsSync(dir)) return |
| 38 | for (const entry of readdirSync(dir, { withFileTypes: true })) { |
| 39 | const fullPath = join(dir, entry.name) |
| 40 | if (entry.isDirectory()) { |
| 41 | scanFiles(fullPath, out) |
| 42 | continue |
| 43 | } |
| 44 | if (['.ts', '.tsx', '.js', '.jsx', '.mjs', '.cjs'].includes(extname(entry.name))) { |
| 45 | out.push(fullPath) |
| 46 | } |
| 47 | } |
| 48 | } |
| 49 | |
| 50 | function hasResolvableTarget(basePath: string): boolean { |
| 51 | const withoutJs = basePath.replace(/\.js$/u, '') |
no test coverage detected