(jsOutputFilesMap)
| 1494 | } |
| 1495 | |
| 1496 | static _watchOutputFiles(jsOutputFilesMap) { |
| 1497 | // Watch all output files produced by computeJsOutputFilesMap. |
| 1498 | jsOutputFilesMap.forEach(entry => { |
| 1499 | entry.files.forEach(file => { |
| 1500 | const { |
| 1501 | sourcePath, |
| 1502 | absPath = sourcePath && |
| 1503 | files.pathJoin(entry.batch.sourceRoot, sourcePath), |
| 1504 | } = file; |
| 1505 | const { importScannerWatchSet } = entry; |
| 1506 | if ( |
| 1507 | typeof absPath === "string" && |
| 1508 | // Blindly calling importScannerWatchSet.addFile would be |
| 1509 | // logically correct here, but we can save the cost of calling |
| 1510 | // optimisticHashOrNull(absPath) if the importScannerWatchSet |
| 1511 | // already knows about the file and it has not been marked as |
| 1512 | // potentially unused. |
| 1513 | ! importScannerWatchSet.isDefinitelyUsed(absPath) |
| 1514 | ) { |
| 1515 | // If this file was previously added to the importScannerWatchSet |
| 1516 | // using the addPotentiallyUnusedFile method (see compileUnibuild), |
| 1517 | // calling addFile here will update its usage status to reflect that |
| 1518 | // the ImportScanner did, in fact, end up "using" the file. |
| 1519 | importScannerWatchSet.addFile(absPath, optimisticHashOrNull(absPath)); |
| 1520 | } |
| 1521 | }); |
| 1522 | }); |
| 1523 | return jsOutputFilesMap; |
| 1524 | } |
| 1525 | |
| 1526 | static _warnAboutMissingModules(missingModules) { |
| 1527 | const topLevelMissingIDs = {}; |
no test coverage detected