AITMONDO

Node.js 27 alpha adds child-process timeout detection and merges concurrent DNS lookups

Ryan Dahl, wearing glasses and a dark shirt, speaks at a wooden lectern.
File photo, 8 November 2010. Node.js creator Ryan Dahl speaks at YUIConf 2010 in Sunnyvale, California. David Calhoun / CC BY 2.0. Resized and converted to WebP.

On 12 November, the Node.js project released 27.0.0-alpha.0.1.0, a development version of the JavaScript runtime. The release adds a way to detect when a child process has timed out and combines simultaneous name lookups with identical parameters into a single lookup.

The alpha can distinguish child-process timeouts, combines simultaneous DNS lookups with identical parameters and generates a compilation cache for modules in a standalone executable’s virtual file system.
AITMONDO graphic based on primary sources.

Distinguishing timeouts from other causes of termination

The functions that start child processes now expose `subprocess.timedOut`. Previously a caller could not distinguish a process that received a termination signal after a timeout from one that received the same signal for another reason. When `dns.lookup()` receives simultaneous calls with the same hostname and other parameters, Node.js now performs one underlying lookup and shares its result with the callers.

Compile caching extends to modules in the virtual file system

The feature that packages code with Node.js as a standalone executable now generates a compilation cache for modules in the virtual file system. The release notes also list a change to preload stream functionality in the snapshot used to start worker threads.

Primary sources