mirror of
https://github.com/denoland/deno.git
synced 2024-12-23 07:44:48 -05:00
fix(check): cache bust when changing nodeModulesDir setting (#23355)
This commit is contained in:
parent
b4257d6990
commit
46c709e52f
1 changed files with 3 additions and 0 deletions
|
@ -604,6 +604,9 @@ impl CliNpmResolver for ManagedCliNpmResolver {
|
|||
.collect::<Vec<_>>();
|
||||
package_reqs.sort_by(|a, b| a.0.cmp(&b.0)); // determinism
|
||||
let mut hasher = FastInsecureHasher::new();
|
||||
// ensure the cache gets busted when turning nodeModulesDir on or off
|
||||
// as this could cause changes in resolution
|
||||
hasher.write_hashable(self.fs_resolver.node_modules_path().is_some());
|
||||
for (pkg_req, pkg_nv) in package_reqs {
|
||||
hasher.write_hashable(&pkg_req);
|
||||
hasher.write_hashable(&pkg_nv);
|
||||
|
|
Loading…
Reference in a new issue