4 ms·
by adding node compatibility it reduces pressure for libs to be written "the deno way". Libraries that could be cleaner! At least that's the theory. To be hone
by rtpg 1y ago
by adding node compatibility it reduces pressure for libs to be written "the deno way". Libraries that could be cleaner!
At least that's the theory. To be honest I don't see Deno's value add. The runtime is like... I mean node works fine at this point? And the capabilities system is both too pedantic and too simplistic, so it's not actually useful.
I don't understand the value add of Bun much either. "Native" Typescript support but at the end of the day I need a bundler that does more than what these tools tend to offer.
Now if one of these basically had "esbuild but built in"....
- int_19h 1y agoBundler is for shipping code, but then you need hacks like tsx to use TS in tests, build scripts etc, and configuring all that can be surprisingly gnarly and prone to breakage (e.g. tsx uses unstable Node APIs). Although now that Node itself has basic TS support with type-stripping, this substantially improves matter. But that's a fairly recent thing, both Deno and Bun predate it by a long time. Also Bun has a built-in bundler? I'm not sure how it compares with esbuild tho.
- rtpg 1y agowhat I've done is run the bundler across test code so that my test suite is also "just" JS, but that precludes certain kind of code flows without some hacks, so I get why people don't like it much.
- int_19h 1y agoI'm also doing this in Node, but it slows things down quite a bit, which for tests in particular can be painful if you have them set up to run automatically in the background. And for build scripts, it's not a usable approach because those are the ones that run the bundler. Now, one can argue that you shouldn't really need static typing for build scripts... and yet I have found valid bugs when switching them from JS to TS in the past. Anyway, Node is rapidly improving its TS integration story, which is probably translating to less interest in Deno (and Bun). Although in case of Bun, the appeal of having a single coherent tool that covers building, testing, and publishing is very enticing after spending a few years in the Node ecosystem duck taping together various third party solutions to all of these.
- rtpg 1y agoYeah, you're right on that, and I do appreciate the value of, well, not bundling. I just have had loads of weirdness with things like "ran my test suite with `tsc`/`node-ts`, bundled with `webpack`, and weird side effects existed downstream of that". I think my complaint is less that these runtimes do nothing, but more that I would expect them to do _even more_. But I'm not trying to make things much better.