fix: run prettier on full assembled output in cli transform

Previously prettier was run on the body alone, then the file was reassembled with frontmatter. The final output was never formatted as a complete document, so files could fail prettier --check. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

reggi committed May 22, 2026 at 16:17 UTC 8fd98f9a7bb25c5a044e7df0be09f33f8333a8e9
1 file changed +4 -3
cli/lib/transform.js
+4 -3
@@ -128,10 +128,11 @@ const transform = (data, {release, path, frontmatter, format = s => s}) => {
128 // then do any transformer specific replacements
129 body = format(body)
130
131 - // prettier again now that we've altered the contents
132 - body = prettierFormat(body)
131 + // then do any transformer specific replacements
132 + body = format(body)
133
134 - return `---\n${yaml.stringify(attributes).trim()}\n---\n\n${body}`
134 + // prettier on the final assembled output so the committed file passes prettier --check
135 + return prettierFormat(`---\n${yaml.stringify(attributes).trim()}\n---\n\n${body}`)
136 }
137
138 // copied from minipass-collect. collects all chunks into a single