mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 02:48:24 +00:00
refactor: use deno_graph for npm specifiers (#17858)
This changes npm specifiers to be handled by deno_graph and resolved to an npm package name and version when the specifier is encountered. It also slightly changes how npm specifier resolution occurs—previously it would collect all the npm specifiers and resolve them all at once, but now it resolves them on the fly as they are encountered in the module graph. https://github.com/denoland/deno_graph/pull/232 --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
This commit is contained in:
parent
0f9daaeacb
commit
a6ca4d0d61
55 changed files with 1340 additions and 1731 deletions
|
@ -937,6 +937,8 @@ impl Inner {
|
|||
self.documents.update_config(
|
||||
self.maybe_import_map.clone(),
|
||||
self.maybe_config_file.as_ref(),
|
||||
self.npm_resolver.api().clone(),
|
||||
self.npm_resolver.resolution().clone(),
|
||||
);
|
||||
|
||||
self.assets.intitialize(self.snapshot()).await;
|
||||
|
@ -1124,6 +1126,8 @@ impl Inner {
|
|||
self.documents.update_config(
|
||||
self.maybe_import_map.clone(),
|
||||
self.maybe_config_file.as_ref(),
|
||||
self.npm_resolver.api().clone(),
|
||||
self.npm_resolver.resolution().clone(),
|
||||
);
|
||||
|
||||
self.send_diagnostics_update();
|
||||
|
@ -1170,6 +1174,8 @@ impl Inner {
|
|||
self.documents.update_config(
|
||||
self.maybe_import_map.clone(),
|
||||
self.maybe_config_file.as_ref(),
|
||||
self.npm_resolver.api().clone(),
|
||||
self.npm_resolver.resolution().clone(),
|
||||
);
|
||||
self.refresh_npm_specifiers().await;
|
||||
self.diagnostics_server.invalidate_all();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue