diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2024-05-23 22:26:23 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-23 23:26:23 +0200 |
commit | 959739f609dddacde3bbe9ecede2f409214fb34c (patch) | |
tree | 04d1776efbd3561205829f78288d26b6e14c3429 /cli/npm/managed/resolvers/common.rs | |
parent | 5de30c53239ac74843725d981afc0bb8c45bdf16 (diff) |
FUTURE: initial support for .npmrc file (#23560)
This commit adds initial support for ".npmrc" files.
Currently we only discover ".npmrc" files next to "package.json" files
and discovering these files in user home dir is left for a follow up.
This pass supports "_authToken" and "_auth" configuration
for providing authentication.
LSP support has been left for a follow up PR.
Towards https://github.com/denoland/deno/issues/16105
Diffstat (limited to 'cli/npm/managed/resolvers/common.rs')
-rw-r--r-- | cli/npm/managed/resolvers/common.rs | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/cli/npm/managed/resolvers/common.rs b/cli/npm/managed/resolvers/common.rs index a326b562b..b010bdd7c 100644 --- a/cli/npm/managed/resolvers/common.rs +++ b/cli/npm/managed/resolvers/common.rs @@ -44,11 +44,6 @@ pub trait NpmPackageFsResolver: Send + Sync { mode: NodeResolutionMode, ) -> Result<PathBuf, AnyError>; - fn resolve_package_folder_from_specifier( - &self, - specifier: &ModuleSpecifier, - ) -> Result<Option<PathBuf>, AnyError>; - fn resolve_package_cache_folder_id_from_specifier( &self, specifier: &ModuleSpecifier, @@ -132,16 +127,12 @@ impl RegistryReadPermissionChecker { pub async fn cache_packages( packages: Vec<NpmResolutionPackage>, cache: &Arc<NpmCache>, - registry_url: &Url, ) -> Result<(), AnyError> { let mut handles = Vec::with_capacity(packages.len()); for package in packages { let cache = cache.clone(); - let registry_url = registry_url.clone(); let handle = spawn(async move { - cache - .ensure_package(&package.id.nv, &package.dist, ®istry_url) - .await + cache.ensure_package(&package.id.nv, &package.dist).await }); handles.push(handle); } |