-
-
Notifications
You must be signed in to change notification settings - Fork 501
fix(hono): zValidator wrapper doesn't typecheck with 0.7.4 #2468
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(hono): zValidator wrapper doesn't typecheck with 0.7.4 #2468
Conversation
|
might have to run |
Update the zValidator wrapper with the latest polymorphic/backwards compatible types from `@hono/zod-validator` 0.7.4. Try hard to not rely on `any`. Type check the code with `tsc` during linting to catch errors. I'm not personally a fan of how `@hono/zod-validator` is typed. This may be a situation, however, where TypeScript's verifier can't exhaustively check things because of the lack of higher-kinded types. I think the solution is for them to provide overloads for v3 and v4 zod schemata and make the innards of the function very vague about types. Signed-off-by: Alexandra Parker <alexandra.i.parker.civ@us.navy.mil>
5dedddf to
cf4d2b3
Compare
|
i did and can't get any diffs to happen :/ |
|
@melloware I dug into this. The content of the files triggering the diff check is JSON stored as Base64-encoded DEFLATE streams:
For instance: window.hierarchyData = 'eJyrVirKzy8pVrKKjtVRKkpNy0lNLsnMzwMKVNfWAgCbHgqm';The DEFLATE streams can be subtly different from platform to platform so this isn't surprising. Typedoc generates these files, so I don't think Orval codegen has any influence whether they change or not |
|
hmm so you think its a flaw in our check ? |
|
yes since the check is enforcing the output of zlib to be consistent across all machines |
|
@snebjorn i am thinking of pulling this check out of the build? |
|
I think it's still a useful check, but files that don't pertain to Orval shouldn't be enforced |
|
I opened this ticket: nickcharlton/diff-check#12 |
|
@xandris do you mind reviewing these two hono tickets? https://github.com/orval-labs/orval/issues?q=is%3Aissue%20state%3Aopen%20label%3Ahono |
…s#2468) Update the zValidator wrapper with the latest polymorphic/backwards compatible types from `@hono/zod-validator` 0.7.4. Try hard to not rely on `any`. Type check the code with `tsc` during linting to catch errors. I'm not personally a fan of how `@hono/zod-validator` is typed. This may be a situation, however, where TypeScript's verifier can't exhaustively check things because of the lack of higher-kinded types. I think the solution is for them to provide overloads for v3 and v4 zod schemata and make the innards of the function very vague about types. Signed-off-by: Alexandra Parker <alexandra.i.parker.civ@us.navy.mil> Co-authored-by: Alexandra Parker <alexandra.i.parker.civ@us.navy.mil>
validator.tsdoesn't type check in client code if you update to@hono/zod-validator0.7.4.Update the zValidator wrapper with the latest polymorphic/backwards compatible types from 0.7.4. Try hard to not rely on
any. Type check the code withtscduring linting to catch errors.I'm not personally a fan of how
@hono/zod-validatoris typed. This may be a situation, however, where TypeScript's verifier can't exhaustively check things because of the lack of higher-kinded types. I think the solution is for them to provide overloads for v3 and v4 zod schemata and make the innards of the function very vague about types.