BlogsIBMNode.js Rejection Handling and N-API Enhancements

Node.js Rejection Handling and N-API Enhancements

Node.js Rejection Handling and N-API Enhancements

2
posts
2019–2020

Node.js 15 introduces significant changes to how unhandled promise rejections are handled, defaulting to termination rather than warnings to improve debugging. It also includes N-API Version 7 with new methods for array buffer manipulation, and refinements to the experimental Async Local Storage APIs. npm 7 is integrated with default peer dependency installation. The release also updates V8 to version 8.6. This post details the integration of TLS 1.3 support into Node.js, requiring an update to OpenSSL 1.1.1 and addressing protocol-level differences in handshake, session tickets, and event timing. TLS 1.3 offers improved security through simplified cipher suites, assured forward secrecy, and AEAD cipher modes.

2020

Node.js 15 release: Updated handling of rejections, npm 7, N-API Version 7, and more

10/19/2020

Node.js 15 updates the default behavior for unhandled promise rejections to terminate the process, aligning with community expectations and improving debuggability. It introduces `--unhandled-rejections` flag for configuration. N-API Version 7 adds `napi_detach_arraybuffer` and `napi_is_detached_arraybuffer` for array buffer management. The Async Local Storage API is refined and remains experimental. npm 7 is included with default peer dependency installation, with a `--legacy-peer-deps` workaround.

2019

TLS1.3 in Node.js

3/18/2019

This post details the integration of TLS 1.3 support into Node.js. It explains the prerequisite of updating to OpenSSL 1.1.1 and the subsequent work required to handle protocol-level differences in TLS 1.3, such as handshake variations, session ticket handling, and event timing. The post also highlights the security improvements of TLS 1.3, including assured forward secrecy, removal of RSA key agreement, a reduced and safer set of cipher suites, and the mandatory use of AEAD cipher modes.