(dir: string)
| 11 | ] |
| 12 | |
| 13 | const getSourceFiles = (dir: string): Array<string> => { |
| 14 | const entries = readdirSync(dir, { withFileTypes: true }) |
| 15 | return entries.flatMap((entry) => { |
| 16 | const path = join(dir, entry.name) |
| 17 | if (entry.isDirectory()) { |
| 18 | return getSourceFiles(path) |
| 19 | } |
| 20 | if (sourceExtensions.has(extname(path))) { |
| 21 | return [path] |
| 22 | } |
| 23 | return [] |
| 24 | }) |
| 25 | } |
| 26 | |
| 27 | describe('import.meta compatibility', () => { |
| 28 | it('avoids direct import.meta access that breaks Rspack parsing', () => { |
no outgoing calls
no test coverage detected