summaryrefslogtreecommitdiff
path: root/cli/npm/resolvers/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/npm/resolvers/mod.rs')
-rw-r--r--cli/npm/resolvers/mod.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/cli/npm/resolvers/mod.rs b/cli/npm/resolvers/mod.rs
index a2638a15b..3ac373a54 100644
--- a/cli/npm/resolvers/mod.rs
+++ b/cli/npm/resolvers/mod.rs
@@ -30,9 +30,9 @@ use crate::util::fs::canonicalize_path_maybe_not_exists;
use self::common::InnerNpmPackageResolver;
use self::local::LocalNpmPackageResolver;
use super::NpmCache;
-use super::NpmPackageNodeId;
+use super::NpmPackageId;
+use super::NpmRegistryApi;
use super::NpmResolutionSnapshot;
-use super::RealNpmRegistryApi;
/// State provided to the process via an environment variable.
#[derive(Clone, Debug, Serialize, Deserialize)]
@@ -46,7 +46,7 @@ pub struct NpmPackageResolver {
no_npm: bool,
inner: Arc<dyn InnerNpmPackageResolver>,
local_node_modules_path: Option<PathBuf>,
- api: RealNpmRegistryApi,
+ api: NpmRegistryApi,
cache: NpmCache,
maybe_lockfile: Option<Arc<Mutex<Lockfile>>>,
}
@@ -62,13 +62,13 @@ impl std::fmt::Debug for NpmPackageResolver {
}
impl NpmPackageResolver {
- pub fn new(cache: NpmCache, api: RealNpmRegistryApi) -> Self {
+ pub fn new(cache: NpmCache, api: NpmRegistryApi) -> Self {
Self::new_inner(cache, api, false, None, None, None)
}
pub async fn new_with_maybe_lockfile(
cache: NpmCache,
- api: RealNpmRegistryApi,
+ api: NpmRegistryApi,
no_npm: bool,
local_node_modules_path: Option<PathBuf>,
initial_snapshot: Option<NpmResolutionSnapshot>,
@@ -105,7 +105,7 @@ impl NpmPackageResolver {
fn new_inner(
cache: NpmCache,
- api: RealNpmRegistryApi,
+ api: NpmRegistryApi,
no_npm: bool,
local_node_modules_path: Option<PathBuf>,
maybe_snapshot: Option<NpmResolutionSnapshot>,
@@ -187,7 +187,7 @@ impl NpmPackageResolver {
/// Attempts to get the package size in bytes.
pub fn package_size(
&self,
- package_id: &NpmPackageNodeId,
+ package_id: &NpmPackageId,
) -> Result<u64, AnyError> {
self.inner.package_size(package_id)
}