A curated roundup of Node.js links: TermDOM, a library for building terminal UIs with HTML and CSS as an alternative to Ink; a course on building agent harnesses for AI models; a TypeScript debugging story about a middleware bug that collapsed a return type to {}; five useful npx helper tools; an outbox pattern approach to the dual-write problem in Node.js; a deep dive into Hono's internals; unbash, a zero-dependency bash parsing library extracted from Knip; and njsscan 1.0, a semantic-aware SAST security scanner for Node apps.

2m read timeFrom nodeweekly.com
Post cover image

Questions this post answers

How can I build a terminal UI in Node.js using HTML and CSS instead of React?

TermDOM is a pure JavaScript library that implements a DOM, CSS cascade, and layout engine which paints directly to the terminal, letting you write TUIs with HTML and CSS instead of React like Ink requires. It has no native or WASM dependency, and its official TodoMVC example runs with just a stylesheet swap, though the project is still early days. Developers weighing terminal UI frameworks can track new tools like this one on daily.dev.

Why did adding a second middleware in my TypeScript app collapse my return type to an empty object?

This happens because a widely used key-filtering idiom leaks undefined when object properties are optional, and when a second middleware is chained, TypeScript's type inference collapses the combined return type down to an empty object type ({}) instead of the expected merged shape. The fix involves rethinking how the key-filtering utility types handle optional properties. Developers debugging tricky TypeScript inference issues can find similar deep dives on daily.dev.

What is njsscan and what kind of vulnerabilities does it detect in Node.js apps?

njsscan 1.0 is a pip-installable, zero-config static analysis security testing (SAST) tool for Node.js applications that uses roughly 70 semgrep-powered rules to detect insecure patterns including XSS, SSRF, unsafe eval usage, JWT issues, and NoSQL injection vulnerabilities. Teams evaluating Node.js security scanners can compare tooling options like this via daily.dev.

2K Impressions