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

better defaults #32

Merged
merged 5 commits into from
Feb 21, 2024
Merged

better defaults #32

merged 5 commits into from
Feb 21, 2024

Conversation

roodboi
Copy link
Contributor

@roodboi roodboi commented Feb 21, 2024

porting over @jakexia72 pr from the old repo - adding tests - and making sure we just send back the default value right away if available

This will likely need a major.

…aking sure we just send back the default value right away if available
Copy link

changeset-bot bot commented Feb 21, 2024

🦋 Changeset detected

Latest commit: 29ce349

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

This PR includes changesets to release 4 packages
Name Type
schema-stream Major
zod-stream Patch
island-next-demos Patch
stream-hooks 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

Copy link

vercel bot commented Feb 21, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
island-ai-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 21, 2024 8:03pm

…cts and arrays - also not explicitly looking for .default values
jakexia72
jakexia72 previously approved these changes Feb 21, 2024
Copy link
Collaborator

@jakexia72 jakexia72 left a comment

Choose a reason for hiding this comment

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

Looks good to me 🚀

Comment on lines +132 to +133
console.warn(`No explicit default value for type: ${type._def.typeName} - returning null.`)
return null
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice!

@roodboi roodboi merged commit 8fe6182 into main Feb 21, 2024
3 checks passed
@roodboi roodboi deleted the jakexia72-port-and-defaults branch February 21, 2024 20:04
@github-actions github-actions bot mentioned this pull request Feb 21, 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