( environment: Environment, metadata: DepOptimizationMetadata, file: string, )
| 1402 | } |
| 1403 | |
| 1404 | export async function optimizedDepNeedsInterop( |
| 1405 | environment: Environment, |
| 1406 | metadata: DepOptimizationMetadata, |
| 1407 | file: string, |
| 1408 | ): Promise<boolean | undefined> { |
| 1409 | const depInfo = optimizedDepInfoFromFile(metadata, file) |
| 1410 | if (depInfo?.src && depInfo.needsInterop === undefined) { |
| 1411 | depInfo.exportsData ??= extractExportsData(environment, depInfo.src) |
| 1412 | depInfo.needsInterop = needsInterop( |
| 1413 | environment, |
| 1414 | depInfo.id, |
| 1415 | await depInfo.exportsData, |
| 1416 | ) |
| 1417 | } |
| 1418 | return depInfo?.needsInterop |
| 1419 | } |
| 1420 | |
| 1421 | const MAX_TEMP_DIR_AGE_MS = 24 * 60 * 60 * 1000 |
| 1422 | export async function cleanupDepsCacheStaleDirs( |
no test coverage detected