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

refactor: use ZodString.min(1) instead of deprecated ZodString.nonempty() #33

Merged

Conversation

roushou
Copy link
Contributor

@roushou roushou commented Dec 16, 2024

What changed? Why?

Hello, ZodString.nonempty() is deprecated since awhile as per this discussion colinhacks/zod#2847 and ZodString.min(1) should be used instead.

It also pops up on the LSP.

image

So this PR basically replaces all nonempty() by min(1) and still preserves error initial error messages.

@roushou roushou changed the title fix: use ZodString.min(1) instead of deprecated ZodString.nonempty() refactor: use ZodString.min(1) instead of deprecated ZodString.nonempty() Dec 16, 2024
@John-peterson-coinbase
Copy link
Contributor

Thanks for the update @roushou !

Can you please add a line item under Unreleased in CHANGELOG.md.

We will be happy to accept this.

@roushou roushou force-pushed the fix-deprecated-string-nonempty branch from 1be5b51 to 6857a14 Compare December 16, 2024 17:34
@roushou
Copy link
Contributor Author

roushou commented Dec 16, 2024

Thanks! Updated @John-peterson-coinbase

@John-peterson-coinbase
Copy link
Contributor

@roushou - We require all commits to be signed. Please follow Learn more about signing commits. to set up GPG commit signing and rebase with signed commits please.

@roushou roushou force-pushed the fix-deprecated-string-nonempty branch from 6857a14 to 759166e Compare December 17, 2024 06:38
@roushou
Copy link
Contributor Author

roushou commented Dec 17, 2024

Should be good now @John-peterson-coinbase

@John-peterson-coinbase John-peterson-coinbase merged commit 6b41b13 into coinbase:master Dec 17, 2024
5 checks passed
@roushou roushou deleted the fix-deprecated-string-nonempty branch December 17, 2024 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants