Live data from Hacker News

Node.js is able to execute TypeScript files without additional configuration

nodejs.org

241–250 of 275 posts

Re: Node.js is able to execute TypeScript files without additional configuration

#241
post #240
post #222

Earlier quoted context omitted.

They added type striping, not full TS support. 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.

> the standard lib still forces you to rely on endless npm dependencies How? We have async/await file access, a async/await test runner, and even async/await sleep built in. What are you missing?

> What are you missing?

Everything else needed to make a backend app.

At the very least, Node should provide fundamental pieces like database drivers. Currently the best PG driver[1] depends on a single guy.

Bun already provides its own PG driver [2] and Jarred has written they will keep investing into more built-in APIs.

[1] https://github.com/porsager/postgres

[2] https://bun.com/docs/api/sql

Re: Node.js is able to execute TypeScript files without additional configuration

#242
post #214

Earlier quoted context omitted.

Bun is still a toddler: it's not ready for primetime. Simple example: you know how at the command line you can type "npm run", and then type a character or two, hit tab, and the appropriate script from your `package.json` will autocomplete? And if you keep going (eg. "npm run knex") you can do the same thing to autocomplete arguments? Bun still hasn't figured out how to do that ( https://github.com/oven-sh/bun/issues…

Your indicator of technology maturity is "is there an autocomplete script for my shell" ? I have autocomplete working on any CLI app I make before it's even functional.

Exactly why it's embarrassing that Bun can't handle something so basic.

Re: Node.js is able to execute TypeScript files without additional configuration

#243
post #241
post #240

Earlier quoted context omitted.

> the standard lib still forces you to rely on endless npm dependencies How? We have async/await file access, a async/await test runner, and even async/await sleep built in. What are you missing?

> What are you missing? Everything else needed to make a backend app. At the very least, Node should provide fundamental pieces like database drivers. Currently the best PG driver[1] depends on a single guy. Bun already provides its own PG driver [2] and Jarred has written they will keep investing into more built-in APIs. [1] https://github.com/porsager/postgres [2] https://bun.com/docs/api/sql

> Currently the best PG driver[1] depends on a single guy.

Definitely a problem, but funding good Postgres/MongoDB/SQLite should be handled by AWS, Microsoft, Google, and other orgs that sell database services.

Re: Node.js is able to execute TypeScript files without additional configuration

#244
post #243
post #241

Earlier quoted context omitted.

> What are you missing? Everything else needed to make a backend app. At the very least, Node should provide fundamental pieces like database drivers. Currently the best PG driver[1] depends on a single guy. Bun already provides its own PG driver [2] and Jarred has written they will keep investing into more built-in APIs. [1] https://github.com/porsager/postgres [2] https://bun.com/docs/api/sql

> Currently the best PG driver[1] depends on a single guy. Definitely a problem, but funding good Postgres/MongoDB/SQLite should be handled by AWS, Microsoft, Google, and other orgs that sell database services.

>> Currently the best PG driver[1] depends on a single guy.

> Definitely a problem, but funding good Postgres/MongoDB/SQLite should be handled by AWS, Microsoft, Google, and other orgs that sell database services.

A good chunk of PG development is done by employees of those companies (*). Of course they could (and probably should) always do more. But even if they invest more, it's not obvious that the marginal effort is best invested in some language's drivers...

Disclaimer: I'm paid by one of those big companies.

Re: Node.js is able to execute TypeScript files without additional configuration

#245
post #243

Earlier quoted context omitted.

> Currently the best PG driver[1] depends on a single guy. Definitely a problem, but funding good Postgres/MongoDB/SQLite should be handled by AWS, Microsoft, Google, and other orgs that sell database services.

>> Currently the best PG driver[1] depends on a single guy. > Definitely a problem, but funding good Postgres/MongoDB/SQLite should be handled by AWS, Microsoft, Google, and other orgs that sell database services. A good chunk of PG development is done by employees of those companies (*). Of course they could (and probably should) always do more. But even if they invest more, it's not obvious that the marginal effort…

I’d argue that JS/TS is more popular than ‘some language’ would suggest. If there’s a problem that affects 19% of customers it should be fixed.

I am not saying this problem exists and 19% is a made up number, the grandparent post seems to think there is some kind of problem.

Re: Node.js is able to execute TypeScript files without additional configuration

#246
post #243
post #241

Earlier quoted context omitted.

> What are you missing? Everything else needed to make a backend app. At the very least, Node should provide fundamental pieces like database drivers. Currently the best PG driver[1] depends on a single guy. Bun already provides its own PG driver [2] and Jarred has written they will keep investing into more built-in APIs. [1] https://github.com/porsager/postgres [2] https://bun.com/docs/api/sql

> Currently the best PG driver[1] depends on a single guy. Definitely a problem, but funding good Postgres/MongoDB/SQLite should be handled by AWS, Microsoft, Google, and other orgs that sell database services.

Maybe. Doesn't change the fact that the problem is there.

Re: Node.js is able to execute TypeScript files without additional configuration

#247
post #245

Earlier quoted context omitted.

>> Currently the best PG driver[1] depends on a single guy. > Definitely a problem, but funding good Postgres/MongoDB/SQLite should be handled by AWS, Microsoft, Google, and other orgs that sell database services. A good chunk of PG development is done by employees of those companies (*). Of course they could (and probably should) always do more. But even if they invest more, it's not obvious that the marginal effort…

I’d argue that JS/TS is more popular than ‘some language’ would suggest. If there’s a problem that affects 19% of customers it should be fixed. I am not saying this problem exists and 19% is a made up number, the grandparent post seems to think there is some kind of problem.

You don't think depending on dozens or even hundreds of NPM packages with a single maintainer is an issue?

Just as an example, Express depends on 25 modules with a single maintainer.

https://npmgraph.js.org/?q=express

Obviously a router is a fraction of what's needed for any non trivial backend project.

Re: Node.js is able to execute TypeScript files without additional configuration

#248
post #213

Earlier quoted context omitted.

> 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 you are choosing from "all backend technologies", Node may or may not count as boring. It's certainly not as boring as Java. 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.

Oh yeah, in that case it's for sure the most boring one.

Re: Node.js is able to execute TypeScript files without additional configuration

#249
post #214

Earlier quoted context omitted.

Your indicator of technology maturity is "is there an autocomplete script for my shell" ? I have autocomplete working on any CLI app I make before it's even functional.

Exactly why it's embarrassing that Bun can't handle something so basic.

Sure, but IMO it's a weird metric to measure.

Re: Node.js is able to execute TypeScript files without additional configuration

#250
post #239

Earlier quoted context omitted.

Deno 2 is (arguably) just as compelling.

You're being downmodded for not providing any supporting arguments, but there's some compelling protection for malicious modules in these other JS implementations.

Am I? My comment was 7 words suggesting consideration for Deno 2, responding to a 7-word comment suggesting to use Bun.
Post reply on HN