(parentId, request)
| 22 | } |
| 23 | |
| 24 | function resolveModule(parentId, request) { |
| 25 | const base = parentId ? path.dirname(path.resolve(ROOT, parentId)) : MODULE_DIR; |
| 26 | const absPath = nodeRequire.resolve(request, { paths: [base] }); |
| 27 | return canonicalId(absPath); |
| 28 | } |
| 29 | |
| 30 | async function readFileCached(filePath) { |
| 31 | return fs.readFile(filePath, 'utf-8'); |
no test coverage detected