Skip to content
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 check for blob should check for a file instead of a string #1400

Merged
merged 3 commits into from
Nov 17, 2024

Conversation

ekaradon
Copy link
Contributor

I've continued working with zod and got an error when using it to parse a response from the backend service where it tries to match a blob with a string. I suppose that z.instanceOf(File) would be the best approach here?

KUBB-70 Zod generation is considering blob as a string
#1399

Copy link

changeset-bot bot commented Nov 15, 2024

🦋 Changeset detected

Latest commit: ecba81c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 23 packages
Name Type
@kubb/plugin-zod Minor
@kubb/plugin-client Minor
@kubb/plugin-react-query Minor
@kubb/plugin-solid-query Minor
@kubb/plugin-svelte-query Minor
@kubb/plugin-swr Minor
@kubb/plugin-vue-query Minor
@kubb/cli Minor
@kubb/config-biome Minor
@kubb/config-ts Minor
@kubb/config-tsup Minor
@kubb/core Minor
@kubb/fs Minor
@kubb/oas Minor
@kubb/parser-ts Minor
@kubb/plugin-faker Minor
@kubb/plugin-msw Minor
@kubb/plugin-oas Minor
@kubb/plugin-redoc Minor
@kubb/plugin-ts Minor
@kubb/react Minor
@kubb/types Minor
kubb Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@stijnvanhulle
Copy link
Collaborator

@all-contributors please add @ekaradon for code

Copy link
Contributor

@stijnvanhulle

I've put up a pull request to add @ekaradon! 🎉

@stijnvanhulle
Copy link
Collaborator

@ekaradon hmm I was not aware off that could use z.instance so seems more than logical to use z.instanceOf(File) here. Not sure if that would have an impact on people using strings for Blobs.

Copy link
Collaborator

@stijnvanhulle stijnvanhulle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you just update the test cases, pnpm test -u to update the snapshots

@ekaradon
Copy link
Contributor Author

I'm not used to workspace, so I may have missed a step but when I try to run tests after installing with pnpm I get this error message:

Error: Failed to resolve entry for package "@kubb/fs". The package may have incorrect main/module/exports specified in its package.json.
  Plugin: vite:import-analysis
  File: ~/projects/kubb/packages/core/src/utils/parser.ts

Not sure what I should do to get it working?

@stijnvanhulle stijnvanhulle merged commit 569cff0 into kubb-labs:main Nov 17, 2024
5 of 6 checks passed
This was referenced Nov 17, 2024
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.

2 participants