Node.js 14 highlights diagnostics, WebAssembly

Latest upgrade to the JavaScript runtime will become a long-term support version in October

Node.js 14 highlights diagnostics, WebAssembly
Thinkstock

Node.js 14, the latest version of the popular asynchronous, event-driven JavaScript runtime, was released April 21, with improved diagnostics and a WebAssembly interface. 

Replacing Node.js 13 in the current release line, Node.js 14 will be promoted to Long Term Support (LTS) status in October. The release is downloadable from the Node.js website.

New features in Node.js 14 include:

  • A diagnostic report capability, added as an experimental feature in Node.js 12, moves to stable status. With this feature, JSON-based diagnostic reports can be generated on demand or when events occur. With these reports, problems can be diagnosed such as high CPU usage, memory crashes, and slow performance.
  • An experimental implementation of the WebAssembly System Interface (WASI) debuts. Packages written in the WebAssembly for Node.js format can offer better performance and cross-platform support for some use cases. WASI provides sandboxed applications based on the WebAssembly binary format to access the underlying operating system via POSIX-like functions.
  • Version 8.1 of V8, the JavaScript engine underlying Node.js, is featured, with capabilities such as an optional chaining operator, ?., for reading the value of a property that is deep within a chain of connected objects without having to expressly validate each reference in the chain. Also featured is an Intl.DisplayNames API for displaying transplanted names of languages, regions, and scripts.
  • An experimental async local storage API. Async local storage is also known as continuation local storage. Node developers have been working on APIs to manage context across asynchronous calls over a number of releases.
  • Improvements to consistency of the Streams APIs, to remove ambiguities and streamline behaviors across parts of Node.js core.
  • The experimental modules warning has been removed. In Node.js 13, the warning displayed when running ECMAScript Modules, noting that the ESM module loader was experimental. Altough the ESM implementation remains experimental in Node.js 14, the warning will no longer appear. Users are advised to be cautious when using ESM in production.
  • MacOS binaries now are being compiled on MacOS 10.15 (Catalina) with Xcode 11 to support package notarization. On Linux platforms, the minimum GCC level remains at GCC 6, but binaries for some platforms will move to GCC 8. Node.js 14 will not run on end-of-life Windows distributions.

While in the “current” release phase, Node.js 14 will receive most new features contributed to the platform. Node.js 12 and Node.js 10 will remain in long-term support until April 2022 and April 2021, respectively.

This story, "Node.js 14 highlights diagnostics, WebAssembly" was originally published by InfoWorld.

  
Shop Tech Products at Amazon