grantila / suretype

Typesafe JSON (Schema) validator
508 stars 9 forks source link

Support of CommonJs? #38

Open dbartholomae opened 1 year ago

dbartholomae commented 1 year ago

Hi there!

Do you have plans to support CommonJS, e.g. via a bundler, in the future? Due to Jest and some other parts of the ecosystem which are not there yet, I can't yet fully convert my codebase to ESM, and without fixes like https://github.com/grantila/suretype/commit/80c2b2b2acfd47f875df8cca68b4ba00fecfc0f5 I can't use suretype with current TypeScript versions. So without the ability to use Suretype with CommonJS, I'll have to switch to a different library.

Happy to help with a PR to add a bundler for CommonJS in case you want to support it.