Skip to content

fix: emit TypeScript clients with stable Vite+ formatting - #172

Merged
adamcavendish merged 1 commit into
mainfrom
adamcavendish/format-vite-plus-output
Nov 9, 2026
Merged

adamcavendish merged 1 commit into
mainfrom
adamcavendish/format-vite-plus-output

Conversation

@adamcavendish

@adamcavendish adamcavendish commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

Generated TypeScript clients now pass full vp check directly after installation. Declarations, imports, unions, and converter expressions receive their layout in the Rust generator, with structural type references retained for import resolution.

Runtime templates, Markdown examples, and JSON configuration follow the same formatting conventions. Golden snapshots are regenerated from the emitters. Generated projects keep the existing single-quote style, exclude dist/ from formatting, and provide a fmt script for manual edits.

Golden and consumer builds run vp install && vp check && vp pack && vp check on freshly generated files. Generation and validation require no formatter preparation step.

Validation:

  • cargo test --locked --workspace: 1323 passed, including 91 TypeScript golden tests.
  • just golden-typescript::build-vp: 8/8 passed on original generated output.
  • TypeScript 7.0.2 compiler checks: 78/78 passed.
  • just golden-typescript-clients::test: preserve/camelCase clients pass full checks, packing, strict declaration checks, and 42 runtime tests.
  • Clippy with warnings denied, Rustfmt, Shellcheck, and whitespace checks passed.

@codecov

codecov Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.46110% with 90 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/generators/typescript/fetch/layout.rs 86.24% 82 Missing ⚠️
src/generators/typescript/fetch/sigil_emit.rs 96.98% 6 Missing ⚠️
src/generators/typescript/fetch/codegen.rs 98.92% 1 Missing ⚠️
src/generators/typescript/fetch/sigil_emit_api.rs 99.20% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

- Lay out declarations, imports, unions, and converter expressions in the
  generator while retaining structural type references and import tracking.
- Emit formatted runtime templates, Markdown examples, and JSON configuration,
  and regenerate the TypeScript golden files from their source emitters.
- Enable full Vite+ checks directly on generated output before and after
  packing, with a fmt script for manual edits and dist excluded from formatting.
@adamcavendish
adamcavendish force-pushed the adamcavendish/format-vite-plus-output branch from 5254d6c to db9691f Compare November 9, 2026 09:30
@adamcavendish adamcavendish changed the title fix: enable full Vite+ formatting checks fix: emit TypeScript clients with stable Vite+ formatting Nov 9, 2026
@adamcavendish
adamcavendish merged commit 3d37af6 into main Nov 9, 2026
31 checks passed
@adamcavendish
adamcavendish deleted the adamcavendish/format-vite-plus-output branch November 9, 2026 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant