Replies: 4 comments 4 replies
-
Yeah, I’d love to see better integration for mock data and Zod. It’ll take a while and probably doesn’t need to live in the Faker repo itself, but I’m happy to keep this discussion open. |
Beta Was this translation helpful? Give feedback.
-
You are writing that zod is the defacto standard, but what if one day e.g. https://github.com/fabian-hiller/valibot will take the lead? Do we, the Faker Team, also need to maintain this as well? Are you interested in that the core maintainers of Faker maintain these cross libs? (Then actually no, sorry) But if second: what is holding you back from releasing just your own lib? Like |
Beta Was this translation helpful? Give feedback.
-
In order for me to come up with an alternative I would have to see what's missing myself. I have experience building my own libraries this year. I have not had to do anything complicated when it comes to testing. I'll use the Zod Mock library in my own projects and let you know if I do create my own version. If you want to do this then I can help set up the project repo and even help with TS. I'm pretty sure I know it better than you. I regret using the Zod is trending as an argument. That pissed them that guy off. To be honest I don't think Zod is going to die anytime soon. |
Beta Was this translation helpful? Give feedback.
-
Other projects that make use of Faker.js are definitely a good thing. I think we could do things that help third-party projects without directly writing code like:
i like the unix philosophy of Do One Thing And Do It Well - we should make the absolute best faking library we can, and make it easy for other open source projects, e.g. mocking libraries, to use Faker, while remaining "neutral" to what other tools people choose to use. |
Beta Was this translation helpful? Give feedback.
-
Motivation
I'm here to ask for an alternative to a library called Zod Mock. Due to the recent popularity of Zod as a universal validation library.
Someone decided to create a Mocking library that is built on top of faker and Zod called Zod Mock. While it's a good library developers can't be sure that it will update along with faker or that it will evolve with better features.
Concerns
I did go on discord to talk about this but it seems like the faker team is busy with the main library. Time dedicated to learning Zod seems to be too much. I don't know what to do to help but Zod is becoming the standard finding someone who can understand it shouldn't be too difficult. I believe that that most of the understanding of this library is mostly important before initial release.
Benefits
The benefit of creating this library is more downloads which means better reliance and support for faker.
Developers have a mock library that is updated when faker is.
Overall I believe that supporting zod will also boost faker.
Beta Was this translation helpful? Give feedback.
All reactions