by nikeee · 2y ago · 0 comments
You don't need source maps. You don't have to map printed stack traces to the source. Debugging just works. You don't need to configure directories because src/ is different than dist/ for DB migrations. You don't have to build a `tsc --watch & node --watch` pipeline to get hot reloading. You don't need cross-env. No more issues with cjs/esm interop. Maybe you don't even need a multi-stage Dockerfile.
That's for bun. Deno might have a similar story. We did not opt-in to the Bun-specific APIs, so we can migrate back if Bun fails. Maybe we could even migrate to something like ts-node. Shouldn't be that hard in that case.
IMHO the API of Bun, as well as the package manager, sometimes tries to be _too_ convenient or is too permissive.
Then you'll use bun build and run node in production, only to find that sourcemaps don't actually work at all: https://github.com/oven-sh/bun/issues/7427
So you'll switch to esbuild + node in production :)
Definitely excited for the promise of bun, but it's not quite baked yet.
We’ve been so busy with adding Windows support that it’s been hard to prioritize much else
The big ones for me are continual prisma issues. Mainly due to poor decisions on their side it seems…
Vite crashing. Because I’m using remix.
And then the worst one I don’t see a way around: sentry profiling which requires v8.
I can’t wait for the day everything can be on bun. Everything else sucks and is so slow or requires really bad configuration to make it work.
Can’t believe node itself and TS are so terrible with module compatibility. Bun solves all of this and is 20000x faster when I can use it!
Running tsc with noEmit is pretty much the standard in the frontend as well, as the TS is bundled by esbuild/rollup directly.
node --import tsx ./file.ts
Now you have to compile stuff.
In my case I’ve had apps use certain ts config options, and then another library has a start script which is incompatible.
So you’re stuck needing a different TS config for both things. These annoyances are solved with bun
I've been hesitant to move to TypeScript because I'm unsure how well the debugger works in practice.
My current platform is Node.js + WebStorm IDE as a debugger. I can debug the JavaScript and I can modify it while stopping at a breakpoint or debugger-statement. It is a huge time-saver that I don't have to see something wrong with my code while in the debugger and then find the original source-file to modify and recompile and then restart.
Just curious, do Deno and Bun support edit-while-debug, out of the box? Or do I need to install some dependencies to make that work?
not everyone likes typescript or finds it useful. e.g svelte dropping typescript ?
not to take away the amazing work people at bun have done.
$ time bun hello.ts
real 0m0.015s
user 0m0.008s
sys 0m0.008s
$ time ts-node hello.ts
real 0m0.727s
user 0m1.534s
sys 0m0.077sSo why doesn't any major runtime run Java natively? Or C++ natively? Or Rust natively?
Why is this such a cool unlock that hasn't been done for any other language?
---
85% of this are people tired/bored of Node.js.
TypeScript is entirely metadata, so it just doesn't make sense to need to compile it.
The java runtime runs java.
And C++ and Rust are compiled and have no runtime.
Java bytecode is compiled from Java (javac), Scala (scalac), etc
JS is the TS's bytecode but it has been designed to be a language to be developed in, which causes impedance mismatches as tools and people get confused about the usage context.