denoland / deno_graph

The module graph logic for Deno CLI
https://docs.rs/deno_graph
MIT License
111 stars 39 forks source link

fix: resolve npm specifiers async and in single batch #496

Closed dsherret closed 3 months ago

dsherret commented 3 months ago

We need to resolve the npm specifiers async because in the CLI we need to wait async on the npm snapshot which might be in use by another worker thread.

I would also guess this is a slight perf improvement when there's a lot of npm specifiers because the shared NpmSnapshot doesn't need to be requested so much in the CLI.

Part of https://github.com/denoland/deno/issues/24063