fix(packaging): serialize packs when the docs map is already generated (#130538)

This commit is contained in:
Peter Steinberger
2026-08-26 18:01:28 -07:00
committed by GitHub
parent de70b00d95
commit 2d386c2ea6
2 changed files with 29 additions and 36 deletions
+2 -4
View File
@@ -77,10 +77,8 @@ export async function preparePackageDocsMap(cwd = process.cwd()) {
const mapPath = path.join(cwd, DOCS_MAP_PATH);
const content = renderDocsHeadingMap(path.join(cwd, "docs"));
const original = existsSync(mapPath) ? await readFile(mapPath, "utf8") : null;
if (original === content) {
return false;
}
// The receipt owns every source-mutating pack step, even when the map is
// already generated; skipping it lets another pack restore our prepared files.
await mkdir(path.dirname(receiptPath), { recursive: true });
try {
await writeFile(