(dir: string)
| 337 | * /tmp → /private/tmp on macOS) resolve to the same project directory. |
| 338 | */ |
| 339 | export async function canonicalizePath(dir: string): Promise<string> { |
| 340 | try { |
| 341 | return (await realpath(dir)).normalize('NFC') |
| 342 | } catch { |
| 343 | return dir.normalize('NFC') |
| 344 | } |
| 345 | } |
| 346 | |
| 347 | /** |
| 348 | * Finds the project directory for a given path, tolerating hash mismatches |
no outgoing calls
no test coverage detected