fix(check): should bust check cache when json module or npm resolution changes (#19941)

A small part of #19928.
This commit is contained in:
David Sherret 2023-07-26 17:23:07 -04:00 committed by GitHub
parent 53e077133f
commit cf16df00d9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 223 additions and 58 deletions

View file

@ -4,6 +4,7 @@ mod common;
mod global;
mod local;
use std::collections::HashMap;
use std::path::Path;
use std::path::PathBuf;
use std::sync::Arc;
@ -153,7 +154,7 @@ impl CliNpmResolver {
let Some(cache_folder_id) = self
.fs_resolver
.resolve_package_cache_folder_id_from_specifier(specifier)? else {
return Ok(None);
return Ok(None);
};
Ok(Some(
self
@ -229,6 +230,10 @@ return Ok(None);
.unwrap()
}
pub fn package_reqs(&self) -> HashMap<NpmPackageReq, NpmPackageNv> {
self.resolution.package_reqs()
}
pub fn snapshot(&self) -> NpmResolutionSnapshot {
self.resolution.snapshot()
}