feat!: validator-agnostic Hono middleware via Standard Schema, idempotent output - #20
Merged
Conversation
hono-valibot.ts becomes hono.ts: the generated middleware validates through schema['~standard'].validate() and reports failures with PublicValidationError from @block65/rest-client v14, so the Hono integration no longer imports valibot and the schema engine is swappable behind a single import. BREAKING CHANGE: the generated file is now hono.ts (was hono-valibot.ts) and requires @block65/rest-client >= 14, which replaces PublicValibotHonoError with PublicValidationError. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The banner now carries a hash of the raw emitter output alongside the date; when a rebuild produces output hashing to the stamp already in the file, the write is skipped entirely. The comparison never sees the formatted text, so downstream formatters can't defeat it, and the 'Generated on' date only moves when the content does. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
What
hono.ts(washono-valibot.ts): middleware validates throughschema['~standard'].validate()and reports failures withPublicValidationError.fromIssues()from@block65/rest-clientv14. The generated file no longer imports valibot — the schema engine is swappable behind a single import.Generated on <date> (rev <hash>)). Regeneration skips files whose fresh output hashes to the existing stamp, so unchanged files stay byte-identical — no more "Generated on" date churn, and downstream formatters can't defeat the check since it never compares formatted text.PublicValibotHonoError.tspetstore fixture.Breaking
hono-valibot.ts→hono.ts.@block65/rest-client>= 14, which replacesPublicValibotHonoErrorwithPublicValidationError.Verified
tscclean, 19/19 tests against published@block65/rest-client@14.0.0.make fixturestwice in a row: second run is a byte-for-byte no-op.🤖 Generated with Claude Code