(absPath: string)
| 1391 | } |
| 1392 | |
| 1393 | private getNodeModulesAbsModuleId(absPath: string) { |
| 1394 | let absModuleId: string | undefined; |
| 1395 | |
| 1396 | this.nodeModulesPaths.some(path => { |
| 1397 | const relPathWithinNodeModules = pathRelative(path, absPath); |
| 1398 | |
| 1399 | if (relPathWithinNodeModules.startsWith("..")) { |
| 1400 | // absPath is not a subdirectory of path. |
| 1401 | return false; |
| 1402 | } |
| 1403 | |
| 1404 | // Install the module into the local node_modules directory within |
| 1405 | // this app or package. |
| 1406 | absModuleId = pathJoin( |
| 1407 | "node_modules", |
| 1408 | relPathWithinNodeModules |
| 1409 | ); |
| 1410 | return true; |
| 1411 | }); |
| 1412 | |
| 1413 | return absModuleId && ensureLeadingSlash(absModuleId); |
| 1414 | } |
| 1415 | |
| 1416 | private getSourceRootAbsModuleId(absPath: string) { |
| 1417 | const relPath = pathRelative(this.sourceRoot, absPath); |
no test coverage detected