Earlier quoted context omitted.
werent one of the js linters part of a supply chain attack recently?
Maybe, are you sure Go dependencies are immune to similar attacks?
Node.js is able to execute TypeScript files without additional configuration
221–230 of 275 posts
Re: Node.js is able to execute TypeScript files without additional configuration
#222Impressed with what Node is doing the last years, deno and bun has really made Node focus and improve. It was stuck for a while
And the biggest issue with Node IMO is that the standard lib still forces you to rely on endless npm dependencies.
Node is still very much stuck.
Re: Node.js is able to execute TypeScript files without additional configuration
#223Earlier quoted context omitted.
> why not use Bun I dislike being on the bleeding edge for things. NodeJS is the most supported in the JS ecosystem. I find it much better to just be on the "default" option for things. You know, choose boring technology.
> You know, choose boring technology. Is it a boring technology? I remember trying Node.js when it just came out, and I don't think all that much improved. Whole node.js always felt one step forward, two steps back. A lot of early design decisions still hurt it. I would call it stagnated before I call it boring.
If, for whatever reason, you need to run JS outside the browser, then Node seems the most boring of all the possible options. Certainly "rewriting all our JS code in Java" sounds a lot less boring.
Re: Node.js is able to execute TypeScript files without additional configuration
#224Earlier quoted context omitted.
Yes, with the difference that Google would have to be compromised in order to poison the go distributable containing fmt tool. With js, it’s enough to poison any single one of the 1400 dependencies of the linter
Use biome, it doesn't have any external dependencies. eslint should have been put to rest a long time ago.
Re: Node.js is able to execute TypeScript files without additional configuration
#225Earlier quoted context omitted.
Compile the packages to JavaScript before publishing. We absolutely should but be publishing TypeScript to npm.
I can understand the argument, since npm has no solution for TypeScript packages, unlike JSR: "You publish TypeScript source, and JSR handles generating API docs, .d.ts files, and transpiling your code for cross-runtime compatibility." Still would have been nice to have this for private packages. This makes Deno/Bun much more attractive alternatives
Re: Node.js is able to execute TypeScript files without additional configuration
#226Even though this should be the way to go, it still leaves a bitter taste. Remember ESM fiasco? Now we have a few years of that all over again, this time with different versions of TypeScript, settings, and tsgo. Good news!
esm actually caused errors so there should not be any issues here
Re: Node.js is able to execute TypeScript files without additional configuration
#227Earlier quoted context omitted.
Node is just inline transpiling the TS into JS, then running the JS.
This is misleading. It is not transpiling TS in JS, it is transpiling a subset of TS into JS. If my normal TS code can not be "executed" by Node, then it is not executing TS per definition but something else. If you are good with Node supporting and "executing" only a subset of TS and lacking useful features, that's fine. But don't tell people it is executing TypeScript. That's like me saying my rudimentary C++ compi…
Re: Node.js is able to execute TypeScript files without additional configuration
#228Re: Node.js is able to execute TypeScript files without additional configuration
#229I think this + node:test makes Node.js a pretty compelling sensible default for most things now. Running things with `tsx` was such a QoL improvement when it happened, but it didn't solve everything. Runtime type assertion at the edges is mostly solved through `zod` and tools like `ts-rest` and `trpc` makes it so much easier to do full-stack Typescript these days.
This. It's 2025 and the node ecosystem is finally usable by default! ESM modules just work with both Node and Typescript, Node can run .ts files, and there's the a good enough test runner built in. --watch. The better built in packages - `node:fs/promises` - are nice with top-level await for easier async loops. It took a while to convince everyone involved to just be pragmatic, but it's nice now.