moltar / typescript-runtime-type-benchmarks

📊 Benchmark Comparison of Packages with Runtime Validation and TypeScript Support
https://moltar.github.io/typescript-runtime-type-benchmarks/
644 stars 63 forks source link

Add `@gapstack/light-type` #1032

Open moltar opened 1 year ago

moltar commented 1 year ago

https://github.com/Nick-Lucas/gapstack/blob/main/packages/light-type/README.md

Mentioned here: https://dev.to/nicklucas/typescript-runtime-validators-and-dx-a-type-checking-performance-analysis-of-zodsuperstructyuptypebox-5416

Ping @Nick-Lucas

Nick-Lucas commented 1 year ago

Hey @moltar, added this out of interest last night so I've opened a PR.

The tests are just a copy & paste of zod's test, since drop-in compat is a core goal of the project

It's fascinating how the type-checkers which require extra plugins/transpilation blow everyone else away though.

Nick-Lucas commented 1 year ago

One frustrating thing, is I added strict/passthrough support and updated the library, but even after blowing out node_modules ts-node seems to be caching the old version from somewhere, so I can't actually run the benchmarks locally anymore. Have you come across this?

moltar commented 1 year ago

Have you come across this?

Hm, no, sorry. 🤔

I think CI environment should be pristine, so it will run fine there. I just approved the run.

Nick-Lucas commented 1 year ago

Very weird, it's failing to check the .d.ts files from light-type in CI. Since a lot of libs are not having issues there I assume it's a legit problem, so I'll need to have a look at the build 😄