Archilyzer · Source

archilyzer

Archilyzer
git clone https://archilyzer.pages.dev/source/archilyzer.git
Log | Files | Refs | README | LICENSE

commit e142cad80a0e3453425fe4d8f3650284eed8c5e2
parent 9e1301b69ad4972f43ede5479477710d31964bed
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Fri, 13 Nov 2026 21:38:46 -0500

clip kit: batch.json through writeFileAtomic (the temp-name sweep)

Co-Authored-By: Claude <noreply@anthropic.com>

Diffstat:
Mumtool/lib/report/shortsCli.mjs | 9+++------
1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/umtool/lib/report/shortsCli.mjs b/umtool/lib/report/shortsCli.mjs @@ -10,7 +10,8 @@ // One command, one record: each build takes the heavy slot as `umtool vertical` does (another job may run between // two clips); a clip that fails is recorded with its error, the rest go on, and the command exits 1 at the end. import { existsSync } from "node:fs"; -import { readFile, rename, writeFile } from "node:fs/promises"; +import { readFile, rename } from "node:fs/promises"; +import { writeFileAtomic } from "yt-dlp-transcript-common/lib/atomicFile.mjs"; import path from "node:path"; import { REPORTS_ROOT, resolveProject } from "../projects/core.mjs"; import { kindMakesTakes } from "../projects/kinds.mjs"; @@ -62,11 +63,7 @@ const readJson = (file) => readFile(file, "utf8").then((t) => JSON.parse(t), () const isObj = (v) => v !== null && typeof v === "object" && !Array.isArray(v); /** Write a file through a rename (a reader never sees half of it). */ -async function writeJson(file, doc) { - const tmp = `${file}.tmp-${process.pid}`; - await writeFile(tmp, JSON.stringify(doc, null, 2) + "\n", "utf8"); - await rename(tmp, file); -} +const writeJson = (file, doc) => writeFileAtomic(file, JSON.stringify(doc, null, 2) + "\n", "utf8"); /** * `umtool shorts …`