* Read a file from a .dist-info directory, returning undefined if not found.
( distInfoDir: string, filename: string )
| 96 | * Read a file from a .dist-info directory, returning undefined if not found. |
| 97 | */ |
| 98 | async function readDistInfoFile( |
| 99 | distInfoDir: string, |
| 100 | filename: string |
| 101 | ): Promise<string | undefined> { |
| 102 | try { |
| 103 | return await readFile(join(distInfoDir, filename), 'utf-8'); |
| 104 | } catch { |
| 105 | return undefined; |
| 106 | } |
| 107 | } |
| 108 | |
| 109 | /** |
| 110 | * Scan a site-packages directory for installed distributions. |
no test coverage detected