Sort cache entries

This commit is contained in:
Stéphan Kochen
2022-10-22 21:40:07 +02:00
parent b336cee164
commit 26d88f0295
+2 -1
View File
@@ -109,7 +109,8 @@ export default async (project: Project, cache: Cache, report: Report) => {
} }
let cacheEntriesCode = `cacheEntries = {\n`; let cacheEntriesCode = `cacheEntries = {\n`;
for (const [locatorStr, entry] of cacheEntries) { for (const locatorStr of [...cacheEntries.keys()].sort()) {
const entry = cacheEntries.get(locatorStr)!;
cacheEntriesCode += `${json(locatorStr)} = { ${[ cacheEntriesCode += `${json(locatorStr)} = { ${[
`filename = ${json(entry.filename)};`, `filename = ${json(entry.filename)};`,
`sha512 = ${json(entry.sha512)};`, `sha512 = ${json(entry.sha512)};`,