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

Couple of issues handling and features #11

Open
Muhammad-Altabba opened this issue Feb 24, 2025 · 1 comment
Open

Couple of issues handling and features #11

Muhammad-Altabba opened this issue Feb 24, 2025 · 1 comment

Comments

@Muhammad-Altabba
Copy link

Hi,
Liked this library but faced some issues and needed some enhancements. The changes and can be checked at: main...Muhammad-Altabba:zod2md:multi-modifications.

Almost every commit fixes or enhancing something. Please feel free to cherry-pick the commit you like to merge an some new PR. And let me know if you like my collaboration.

Here is the list of issues and features:

  1. the repos uses prettier to format the code but the prettier config is not published. So, I could infer the config and pushed it at:
    add prettier config allined with the already used styling (to unify styling among the team)

  2. The .description('...') is not rendered for union and intersection. The code for it is here: render Description at union and intersection. And surely you may have another way for rendering.

  3. The type ZodLazy is not handled. I provided an implementation that delays resolving the lazy schemas a bit. Here is the implementation that is good but might be written in a better way: handle ZodLazy

  4. there is a warning when building the project that could be handled as in: fix circular dependency warnings during build.

  5. For some strange reason, the check instance of does not work. At least when linking the project locally and sometimes when normally importing the project (I am using pnpm 10.4.0 and node 20.18.3). This could be handled at: fix an issue: does not always work

  6. The used bundleRequire is not able to import the modules correctly when there is an import inside the provided typescript file that contain the Zod schemas. For this I needed to export more functions and types from zod2md so I can override the place where bundleRequire.

You might check how the library is used at: nucypher/taco-web#622. Where I used a modified version of zod2md that addressed the above.

Thanks for the great library! Keep up the good spirit! And let me know if you need someone to give a hand.

@matejchalk
Copy link
Owner

Hi @Muhammad-Altabba, thanks a lot for your contribution. 👏 I went through the code changes and while I'd like to suggest a few improvements, overall I really like what you've done. 👍 Would you be up for opening a PR? I could give you some feedback during code review and then we can merge in your contributions. 🙂

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

No branches or pull requests

2 participants