MCPcopy Create free account
hub / github.com/TanStack/devtools / getSourceFiles

Function getSourceFiles

packages/devtools/tests/import-meta-compat.test.ts:13–25  ·  view source on GitHub ↗
(dir: string)

Source from the content-addressed store, hash-verified

11]
12
13const 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
27describe('import.meta compatibility', () => {
28 it('avoids direct import.meta access that breaks Rspack parsing', () => {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected