From bcb6ee9d0864f490f6da47cbe2593310b21333ff Mon Sep 17 00:00:00 2001 From: David Sherret Date: Sun, 12 Mar 2023 23:32:59 -0400 Subject: refactor(npm): push npm struct creation to a higher level (#18139) This has been bothering me for a while and it became more painful while working on #18136 because injecting the shared progress bar became very verbose. Basically we should move the creation of all these npm structs up to a higher level. This is a stepping stone for a future refactor where we can improve how we create all our structs. --- cli/tsc/mod.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'cli/tsc') diff --git a/cli/tsc/mod.rs b/cli/tsc/mod.rs index fb9eeba0d..2f9b4224c 100644 --- a/cli/tsc/mod.rs +++ b/cli/tsc/mod.rs @@ -734,9 +734,7 @@ fn resolve_non_graph_specifier_types( // we don't need this special code here. // This could occur when resolving npm:@types/node when it is // injected and not part of the graph - let node_id = npm_resolver - .resolution() - .resolve_pkg_id_from_pkg_req(&npm_ref.req)?; + let node_id = npm_resolver.resolve_pkg_id_from_pkg_req(&npm_ref.req)?; let npm_id_ref = NpmPackageNvReference { nv: node_id.nv, sub_path: npm_ref.sub_path, -- cgit v1.2.3