hoeck / simple-runtypes

Small, efficient and extendable runtype library for Typescript
MIT License
114 stars 5 forks source link

Migrate away from TSDX #63

Closed hoeck closed 11 months ago

hoeck commented 2 years ago

As TSDX seems rather unmaintained and its future unclear.

Replace it preferably with something that takes care with packaging and supports the same features as TSDX (minifying, sourcemaps, dts files, esm, cjs).

TSUP looks like a good candidate (shoutout to @remnantkevin for the suggestion).

remnantkevin commented 1 year ago

Once the nonStrict modifier work (#90) has been finished (whether or not it "lands" is a different question 🙃), I would like to give this a look, if that's okay. I've been working with esbuild at work, and have used tsup on small personal projects. From my research, tsup seems to still be a good option as a replacement for tsdx, and it is still being actively developed and maintained. In my very limited experience, tsup seems to also be a better option than vite for the simple-runtypes use case: while vite can do more and has a substantial community of plugins, etc., most of that is not relevant for simple-runtypes, as far as I understand. tsup does more (of what is needed in this use case) with less configuration and simpler options. I can do more of a direct comparison between tsdx and tsup (for the simple-runtypes use case) once I've had a chance to play around with it locally with simple-runtypes. (Side note: Under the hood, tsup, like vite, is using a combination of esbuild and rollup. And a slight difference is that tsup is specifically aimed at TypeScript projects, which has some benefits.)

As part of moving to tsup, the configuration options that are used could also addresses another, related, issue (#86).

hoeck commented 1 year ago

@remnantkevin thanks for looking into this (BTW glad seeing you're still here).

Sounds like tsup is what I have been looking for. It also seems to support both, cjs and esm.