(
url: string,
importer?: string,
)
| 217 | } |
| 218 | |
| 219 | private async cachedModule( |
| 220 | url: string, |
| 221 | importer?: string, |
| 222 | ): Promise<EvaluatedModuleNode> { |
| 223 | let cached = this.concurrentModuleNodePromises.get(url) |
| 224 | if (!cached) { |
| 225 | const cachedModule = this.evaluatedModules.getModuleByUrl(url) |
| 226 | cached = this.getModuleInformation(url, importer, cachedModule).finally( |
| 227 | () => { |
| 228 | this.concurrentModuleNodePromises.delete(url) |
| 229 | }, |
| 230 | ) |
| 231 | this.concurrentModuleNodePromises.set(url, cached) |
| 232 | } else { |
| 233 | this.debug?.(class="st">'[module runner] using cached module info for', url) |
| 234 | } |
| 235 | |
| 236 | return cached |
| 237 | } |
| 238 | |
| 239 | private ensureBuiltins(): Promise<void> | undefined { |
| 240 | if (this.isBuiltin) return |
no test coverage detected