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

Make sure zod isn't required if zod params are not being used #450

Merged
merged 1 commit into from
Jan 30, 2025

Conversation

pleek91
Copy link
Contributor

@pleek91 pleek91 commented Jan 30, 2025

Description

#446 introduced experimental support for zod params. However it didn't account for zod not being installed even though its clearly marked as an optional param.

In order to account for this we can use an asyn import and only import actual zod code if we detect that a zod param is being used

Copy link

netlify bot commented Jan 30, 2025

Deploy Preview for kitbag-router ready!

Name Link
🔨 Latest commit e0cc308
🔍 Latest deploy log https://app.netlify.com/sites/kitbag-router/deploys/679bd627ed0e3a00081f3eb8
😎 Deploy Preview https://deploy-preview-450--kitbag-router.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

@stackoverfloweth stackoverfloweth left a comment

Choose a reason for hiding this comment

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

confirmed this works

  • when target project doesn't use zod, zod isn't installed
  • when target project has zod installed, uses zod params work as expected

@pleek91 pleek91 merged commit e628e26 into main Jan 30, 2025
6 checks passed
@pleek91 pleek91 deleted the fix-zod-params branch January 30, 2025 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants