fix: include target names in build/ and .fingerprint/ cleanup (#317)

This commit is contained in:
eitsupi
2026-03-15 00:23:14 +09:00
committed by GitHub
parent d7ac6f694d
commit bc1860267c
3 changed files with 291 additions and 291 deletions

View File

@@ -58,7 +58,7 @@ async function cleanProfileTarget(profileDir: string, packages: Packages, checkT
let keepProfile = new Set(["build", ".fingerprint", "deps"]);
await rmExcept(profileDir, keepProfile);
const keepPkg = new Set(packages.map((p) => p.name));
const keepPkg = new Set(packages.flatMap((p) => [p.name, ...p.targets.map((t) => t.replace(/-/g, "_"))]));
await rmExcept(path.join(profileDir, "build"), keepPkg, checkTimestamp);
await rmExcept(path.join(profileDir, ".fingerprint"), keepPkg, checkTimestamp);