()
| 100 | }; |
| 101 | |
| 102 | const resolveJsoncPath = (): string | null => { |
| 103 | if (resolvedJsoncPath) return resolvedJsoncPath; |
| 104 | const candidates = options.jsoncPath ? [options.jsoncPath] : DEFAULT_JSONC_CANDIDATES; |
| 105 | for (const candidate of candidates) { |
| 106 | const abs = isAbsolute(candidate) ? candidate : resolvePath(projectRoot, candidate); |
| 107 | if (existsSync(abs)) { |
| 108 | resolvedJsoncPath = abs; |
| 109 | return abs; |
| 110 | } |
| 111 | } |
| 112 | return null; |
| 113 | }; |
| 114 | |
| 115 | const loadVirtualSource = async (): Promise<string> => { |
| 116 | if (cachedSource !== null) return cachedSource; |
no outgoing calls
no test coverage detected