diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2022-09-22 16:39:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-22 10:39:58 -0400 |
commit | 9a216806d514b5f41c73c777010572cdf3c51eab (patch) | |
tree | 3bc96c287936bc75b37add644944507c0f8ccf6b /cli/npm/registry.rs | |
parent | 06c77a30f9c00a562ff2a34b96fe828e0d29a33f (diff) |
feat(npm): add support for --reload=npm: and --reload=npm:<package> (#15972)
Diffstat (limited to 'cli/npm/registry.rs')
-rw-r--r-- | cli/npm/registry.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/cli/npm/registry.rs b/cli/npm/registry.rs index 4fb926287..a0ffd0544 100644 --- a/cli/npm/registry.rs +++ b/cli/npm/registry.rs @@ -105,7 +105,6 @@ pub struct NpmRegistryApi { base_url: Url, cache: NpmCache, mem_cache: Arc<Mutex<HashMap<String, Option<NpmPackageInfo>>>>, - reload: bool, cache_setting: CacheSetting, progress_bar: ProgressBar, } @@ -133,7 +132,6 @@ impl NpmRegistryApi { pub fn new( base_url: Url, cache: NpmCache, - reload: bool, cache_setting: CacheSetting, progress_bar: ProgressBar, ) -> Self { @@ -141,7 +139,6 @@ impl NpmRegistryApi { base_url, cache, mem_cache: Default::default(), - reload, cache_setting, progress_bar, } @@ -171,7 +168,7 @@ impl NpmRegistryApi { Ok(info) } else { let mut maybe_package_info = None; - if !self.reload { + if self.cache_setting.should_use_for_npm_package(name) { // attempt to load from the file cache maybe_package_info = self.load_file_cached_package_info(name); } |