Skip to content

Commit c0b57f7

Browse files
Mark safeWriteText internal now that nothing in production calls it
With safeWriteJson on main's replacement protocol, the only production consumers of src/services/file-safety/safeWriteText.ts are resolvePublishTarget and resolveLockKey; the write entry point itself is exercised only by its own specs. knip --production - the step CI runs - reported it as an unused export, so it is tagged @internal rather than adding an ignore entry or editing knip.json: one mechanism, with the reason written next to the tag. Whether main should carry two publish primitives at all is Zoo-Code-Org#2350's question, not this branch's. The tag states today's fact without deciding it, and the tag is on this branch's copy of the file, which is one of four copies now. Verification, pinned node v22.23.4 (box node is 25.9.0): knip --production exit 0, previously exit 1 with this single finding; tsc -p src/tsconfig.json exit 0; prettier --check clean on the file. Refs: Zoo-Code-Org#1375, Zoo-Code-Org#1991, Zoo-Code-Org#2019, Zoo-Code-Org#2350.
1 parent 279e77d commit c0b57f7

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎src/services/file-safety/safeWriteText.ts‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,14 @@ export async function resolveLockKey(absoluteFilePath: string): Promise<string>
288288
}
289289
}
290290

291+
/**
292+
* Publish text by staging beside the resolved target and committing with a rename.
293+
*
294+
* @internal Production callers of this file use resolvePublishTarget and
295+
* resolveLockKey; the write entry point itself has no production caller while #2350
296+
* decides which primitive main keeps, so it is tagged internal instead of being
297+
* reported as an unused export.
298+
*/
291299
export async function safeWriteText(
292300
filePath: string,
293301
content: string | Uint8Array,

0 commit comments

Comments
 (0)