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/npm/resolvers/common.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'cli/npm/resolvers/common.rs') diff --git a/cli/npm/resolvers/common.rs b/cli/npm/resolvers/common.rs index 3f1c2a704..a8e822bb9 100644 --- a/cli/npm/resolvers/common.rs +++ b/cli/npm/resolvers/common.rs @@ -23,6 +23,9 @@ pub trait NpmPackageFsResolver: Send + Sync { /// Specifier for the root directory. fn root_dir_url(&self) -> &Url; + /// The local node_modules folder if it is applicable to the implementation. + fn node_modules_path(&self) -> Option; + fn resolve_package_folder_from_deno_module( &self, id: &NpmPackageId, -- cgit v1.2.3