Skip to content

Couple of issues handling and features #11

Description

@Muhammad-Altabba

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions