Fix typo in hashing parsed Cargo.lock (#159)

This simple mistake caused the entire `Cargo.lock` to be ignored (JS
treats having no return as `false`).

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2023-08-11 03:50:14 +10:00 committed by GitHub
parent b919e1427f
commit 4e0f4b19dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 9 deletions

View File

@ -67048,9 +67048,7 @@ class CacheConfig {
}
// Package without `[[package]].source` and `[[package]].checksum`
// are the one with `path = "..."` to crates within the workspace.
const packages = parsed.package.filter((p) => {
"source" in p || "checksum" in p;
});
const packages = parsed.package.filter((p) => "source" in p || "checksum" in p);
hasher.update(JSON.stringify(packages));
parsedKeyFiles.push(cargo_lock);
}

4
dist/save/index.js vendored
View File

@ -67048,9 +67048,7 @@ class CacheConfig {
}
// Package without `[[package]].source` and `[[package]].checksum`
// are the one with `path = "..."` to crates within the workspace.
const packages = parsed.package.filter((p) => {
"source" in p || "checksum" in p;
});
const packages = parsed.package.filter((p) => "source" in p || "checksum" in p);
hasher.update(JSON.stringify(packages));
parsedKeyFiles.push(cargo_lock);
}

View File

@ -198,9 +198,7 @@ export class CacheConfig {
// Package without `[[package]].source` and `[[package]].checksum`
// are the one with `path = "..."` to crates within the workspace.
const packages = parsed.package.filter((p: any) => {
"source" in p || "checksum" in p;
});
const packages = parsed.package.filter((p: any) => "source" in p || "checksum" in p);
hasher.update(JSON.stringify(packages));