Live data from Hacker News

Show HN: Nub – A Bun-like all-in-one toolkit for Node.js

github.com

61–70 of 85 posts

Re: Show HN: Nub – A Bun-like all-in-one toolkit for Node.js

#61
post #55

Hasn't Node been able to run TypeScript for a couple of versions? Why's the transpiler needed?

Node's built-in Typescript support is just for type stripping. That works for a massive amount of TypeScript syntax, but not all of it. It also doesn't bother actually checking the types, just removing them so it runs. You also lose things like tsconfig.

This looks to support both the built-in stripping as well as actual TypeScript.

Re: Show HN: Nub – A Bun-like all-in-one toolkit for Node.js

#62

Very smart. You can't lose all your customers for vibe-coding a migration to Rust if you are already written in Rust ;)

“If you are already vibe-coded in Rust”, probably is better, Nub has a strong smell all the way (which is ok, just funny to compare with Bun).

P.S. The entire Bun’s anti-AI hysteria makes me very sad, sometimes it feels like a directed campaign

Re: Show HN: Nub – A Bun-like all-in-one toolkit for Node.js

#63
post #55

Hasn't Node been able to run TypeScript for a couple of versions? Why's the transpiler needed?

Node's built-in Typescript support is just for type stripping. That works for a massive amount of TypeScript syntax, but not all of it. It also doesn't bother actually checking the types, just removing them so it runs. You also lose things like tsconfig. This looks to support both the built-in stripping as well as actual TypeScript.

Exactly this. TypeScript also ended up being many users' entrypoint to JSX, decorators, etc as it became a catchall transpiler surface so respecting tsconfig is vital here (Node understandably has a policy against this). Plus there are extensionless imports, the "phantom" .js imports (pointing to .ts files), etc. List goes on. Type stripping ends up working out of the box for virtually no real world projects sadly.

https://nubjs.com/docs/runtime/typescript

Re: Show HN: Nub – A Bun-like all-in-one toolkit for Node.js

#68

This looks fantastic. One suggestion, for package management you should just wrap pnpm, my desire to move to anything else is nil.

You can continue using pnpm if you want. Nub is a la carte. Nub's runtime or script runner functionality will work with any package manager that uses node_modules (actually Yarn PnP is also supported out of the box).

You can also move over to Nub from pnpm incrementally if you want the performance or security wins. It has complete pnpm compatibility: flag for flag identical CLI, reads and writes from your pnpm-lock.yaml, and respects your expecting configs completely. Nub and pnpm can be used simultaneously by different teammates without lockfile churn. This is a key design goal, and its what I mean by "incrementally adoptable". But yeah `nub install` will almost certainly work in your repo out of the box. (File an issue otherwise.)

https://nubjs.com/docs/install/pnpm

Same is true for npm, yarn, and bun as well. It detects your current package manager (based on package.json#packageManager or lockfile existence) and runs in "compatibility mode" for that specific package manager.

https://nubjs.com/docs/install#config-it-reads

Re: Show HN: Nub – A Bun-like all-in-one toolkit for Node.js

#69
The readme says Websockets support is native from Node 22, except Node does not have a native Websockets library. Their link for Websockets standard goes to MDN, which is fine except that only describes the WHATWG user interface and nothing about the protocol or how Websockets works.

It feels like this is missing something or using a nonnative library as a supplemental addition.

Post reply on HN