(root: string, path: string)
| 59 | * "/_node/d3-array@3.2.4/src/index.js", returning a set of node import paths. |
| 60 | */ |
| 61 | export async function resolveNodeImports(root: string, path: string): Promise<ImportReference[]> { |
| 62 | if (!path.startsWith("/_node/")) throw new Error(`invalid node path: ${path}`); |
| 63 | return parseImports(join(root, ".observablehq", "cache"), path); |
| 64 | } |
| 65 | |
| 66 | /** |
| 67 | * Given a local npm path such as "/_node/d3-array@3.2.4/src/index.js", returns |
no test coverage detected