diff options
Diffstat (limited to 'cli/npm/managed/mod.rs')
-rw-r--r-- | cli/npm/managed/mod.rs | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/cli/npm/managed/mod.rs b/cli/npm/managed/mod.rs index d59b81912..6cf7e6a32 100644 --- a/cli/npm/managed/mod.rs +++ b/cli/npm/managed/mod.rs @@ -492,6 +492,23 @@ impl ManagedCliNpmResolver { } impl NpmResolver for ManagedCliNpmResolver { + /// Gets the state of npm for the process. + fn get_npm_process_state(&self) -> String { + serde_json::to_string(&NpmProcessState { + kind: NpmProcessStateKind::Snapshot( + self + .resolution + .serialized_valid_snapshot() + .into_serialized(), + ), + local_node_modules_path: self + .fs_resolver + .node_modules_path() + .map(|p| p.to_string_lossy().to_string()), + }) + .unwrap() + } + fn resolve_package_folder_from_package( &self, name: &str, @@ -571,23 +588,6 @@ impl CliNpmResolver for ManagedCliNpmResolver { self.resolve_pkg_folder_from_pkg_id(&pkg_id) } - /// Gets the state of npm for the process. - fn get_npm_process_state(&self) -> String { - serde_json::to_string(&NpmProcessState { - kind: NpmProcessStateKind::Snapshot( - self - .resolution - .serialized_valid_snapshot() - .into_serialized(), - ), - local_node_modules_path: self - .fs_resolver - .node_modules_path() - .map(|p| p.to_string_lossy().to_string()), - }) - .unwrap() - } - fn check_state_hash(&self) -> Option<u64> { // We could go further and check all the individual // npm packages, but that's probably overkill. |