docs: fix printers.md claiming a printer is the last pipeline step - #165
Merged
Conversation
A printer runs inside a plugin's generator, well before the pipeline ends: a parser still has to turn the assembled file into source text, storage writes it to disk, and only then do the CLI's formatter, linter, and postGenerate commands run (packages/cli/src/runners/generate/run.ts).
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎯 Changes
snippets/how-to/printers.md(included intodocs/5.x/guide/going-further/printers.md) opened with "A printer is the last step of Kubb's pipeline." That's wrong: a printer turns one schema node into code inside a plugin's generator, well before the pipeline actually ends. Traced the real order inkubb-labs/kubb:plugin-ts/plugin-zod/plugin-faker'sprinter.nodes).FileNodeinto source text (confirmed againstpackages/parser-ts, which uses the TypeScript compiler's own printer internally to stringify the AST — a different, lower-level "printer" than Kubb'sPrinterNodesconcept).postGeneratecommands (packages/cli/src/runners/generate/run.ts'sprocessOutput).Corrected the opening sentence and added the missing steps after printing, so the page no longer implies printing is the final thing that happens to generated code.
✅ Checklist
Generated by Claude Code