Modern Node.js Patterns
ESM, Modules, and “Architecture Astronauts”
- Strong approval for Node finally embracing ESM; some see npm’s CommonJS inertia as “insane” and credit competition (Bun, Deno, jsr) for forcing progress.
- Others dismiss the focus on modules and new syntax as “architecture astronaut” behavior, arguing importing should remain trivial and that Node already solved real problems long ago.
- Dual-publishing CJS+ESM is described by library authors as painful but largely behind them; some now publish ESM-only.
- Persistent friction points: file extensions in imports,
exportscomplexity, and CJS/ESM interop history, though recent work has improved it.
Built-ins: Fetch, Undici, Test Runner, TS, SQLite
- Many highlight built-in
fetch+AbortControlleras the real “killer upgrade,” letting apps drop axios/node-fetch, shrink bundles, and reduce cold-start latency. - Enthusiasm for Undici as the high-performance HTTP engine under
fetch, though direct Undici use can be faster and is still needed for advanced cases (e.g., proxies). - Opinions split on the built-in
node:test: liked for small projects and dependency reduction, but seen as too barebones and awkward for large apps compared to Jest/Vitest. - Native TypeScript stripping/transform is welcomed but criticized as incomplete (enums, parameter properties, import extensions); some recommend treating TS as “erasable syntax” only.
- Built-in SQLite and
node:utilstyling are praised for simplifying small or CLI-style projects.
Streams, Async Patterns, and HTTP Clients
- Strong defense of streams as a higher-level abstraction with backpressure, composability, and lower cognitive load than manual loops; critics argue arrays/buffers plus a custom loop are simpler and more transparent.
- Debate over
fetchergonomics vs axios: axios still valued for interceptors, progress, retries, and ecosystem; others prefer fetch with a thin app-specific wrapper. - Some benchmarks show Undici best locally but axios competitive over real networks; conclusion is “use-case dependent.”
Security and Packaging
- Experimental permission flags for FS/network are seen as a big step (inspired by Deno) but many warn this is hard to get right and should not replace OS-level controls (SELinux/AppArmor, containers).
- Single executable applications (SEA) work but produce large binaries (~70–110 MB); opinions range from “bananas” to “fine in 2025 given bundled runtime.”
Ecosystem, Alternatives, and Meta
- Several note Node catching up with Bun/Deno, convergence via web standards/WinterCG, and Node’s still-strong maturity, tooling, and community.
- Comparisons with .NET: some argue ASP.NET Core remains more performant, feature-complete, and “batteries included”; others value npm’s breadth despite quality issues.
- Multiple commenters suspect the article is heavily LLM-assisted, citing tone and phrasing; some find this off-putting “slop,” others don’t care as long as the technical content is correct.