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

Add typebox support. #8

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

HamishWHC
Copy link

@HamishWHC HamishWHC commented Apr 12, 2024

Adds support for TypeBox. I feel like the tests need to be expanded, at least for Zod and Typebox (haven't used Yup and Arktype yet) due to the potential issues with preprocessing/transform types, but I wanted to contribute something before I think about investigating that.

@leandro-lugaresi
Copy link
Owner

Hey! Thanks for this contribution!
About the tests, yes I agree. It would be nicer to have more tests using complex schemas but would be great to have them almost as examples, using the createConfig function.

About your PR, It looks great, nothing to change except "fix" the lint error.
It's complaining about the version, but It's not because your part.
Jest uses the version 0.27.8:

    "node_modules/@jest/schemas": {
      "version": "29.6.3",
      "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz",
      "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==",
      "dev": true,
      "dependencies": {
        "@sinclair/typebox": "^0.27.8"
      },
      "engines": {
        "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
      }
    },

The lint uses that version to check. I'm thinking on removing this linter but for now, can you add the @sinclair/typebox package inside the ignoredDependencies(packages/core/.eslintrc.json#L44)?

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

Successfully merging this pull request may close these issues.

2 participants