You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is problematic because even if we don't use a schema containing z.string().emoji(), the regex is instantiated immediately as the object is imported. The fix in Zod was to lazily instantiate the regex:
Unicode regexes are not supported in all environments - React Native in particular. One is used here:
https://github.com/StefanTerdell/zod-to-json-schema/blob/master/src/parsers/string.ts#L26
This is problematic because even if we don't use a schema containing
z.string().emoji()
, the regex is instantiated immediately as the object is imported. The fix in Zod was to lazily instantiate the regex:colinhacks/zod@9340fd5
With this, the rest of the library is usable in such environments (though
.emoji()
still won't be).I'll open a PR with a similar fix.
The text was updated successfully, but these errors were encountered: