Skip to content

fix(codegen): write prettier-stable generated manifests - #41343

Merged
kitlangton merged 1 commit into
v2from
manifest-format
Aug 9, 2026
Merged

fix(codegen): write prettier-stable generated manifests#41343
kitlangton merged 1 commit into
v2from
manifest-format

Conversation

@kitlangton

Copy link
Copy Markdown
Contributor

What

Formats the `.httpapi-codegen.json` manifest through prettier (json parser, repo print width) at write time, instead of raw `JSON.stringify(..., null, 2)`.

Why

The last red job on v2 CI. The generate bot (running on v2 since #41207) executes `script/generate.ts`, which ends with a repo-wide prettier pass — collapsing the short manifest arrays to single-line before committing. `check:generated` in `packages/client` regenerates without that pass, producing multi-line manifests, and `git diff --exit-code` fails:

```
-["client-error.ts", "client.ts", "index.ts"]
+[

  • "client-error.ts",
    ...
    ```

Generated `.ts` files were already prettier-formatted at write time; the manifest was the one artifact that wasn't. Making it prettier-stable at the source fixes the check regardless of whether the bot's format pass runs afterward.

Testing

  • `packages/httpapi-codegen`: typecheck green, 87/87 tests (manifest expectation updated to the prettier-stable form).
  • `packages/client`: `bun run check:generated` passes against the committed (bot-formatted) manifests — regeneration is now byte-identical.

@kitlangton
kitlangton merged commit 84fd347 into v2 Aug 9, 2026
10 checks passed
@kitlangton
kitlangton deleted the manifest-format branch August 9, 2026 00:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant