summaryrefslogtreecommitdiff
path: root/cli/npm/registry.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2023-04-12 18:04:45 -0400
committerGitHub <noreply@github.com>2023-04-12 18:04:45 -0400
commit17e4782140a602043c4f92e643c1908c521ae017 (patch)
treec9e3cc979bbde41aec9c2615ee5d13a7d6784aab /cli/npm/registry.rs
parenta3c5193a2e7d15bbfac390b220982561376e7322 (diff)
fix(npm): eagerly reload package information when version from lockfile not found locally (#18673)
Closes #18624
Diffstat (limited to 'cli/npm/registry.rs')
-rw-r--r--cli/npm/registry.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/cli/npm/registry.rs b/cli/npm/registry.rs
index b38cfa898..798cb17dd 100644
--- a/cli/npm/registry.rs
+++ b/cli/npm/registry.rs
@@ -112,7 +112,12 @@ impl CliNpmRegistryApi {
) {
return false;
}
- self.inner().force_reload_flag.raise()
+ if self.inner().force_reload_flag.raise() {
+ self.clear_memory_cache(); // clear the memory cache to force reloading
+ true
+ } else {
+ false
+ }
}
fn inner(&self) -> &Arc<CliNpmRegistryApiInner> {