Node JS 19 is now available!
The latest version of Node JS – 19 has been published on October 18, 2022. The main feature of the current version is that `node –watch` is now introduced. Also other features such as
'HTTP(S)/1.1 KeepAlive by default‘
, ‘Stable WebCrypto‘, ‘Custom ESM Resolution Adjustments’ etc. are also implemented in the new release.
node –watch (experimental)
An exciting recent feature addition to the runtime is support for running in ‘watch’ mode using the
node --watch option. Running in ‘watch’ mode restarts the process when an imported file is changed.
$ node --watch index.js
This feature is available in v19.0.0 and v18.11.0+.
Contributed by Moshe Atlow in #44366
HTTP(S)/1.1 KeepAlive by default
Starting with this release, Node.js sets
keepAlive to true by default. This means that any outgoing HTTP(s) connection will automatically use HTTP 1.1 Keep-Alive. The default keep-alive duration is 5 seconds.
Enable keep-alive will deliver better throughput as connections are reused by default.
Additionally, the agent is now able to parse the response
Keep-Alive which the servers might send. This header instructs the client on how much to stay connected. On the other side, the Node.js HTTP server will now automatically disconnect idle clients (which are using HTTP Keep-Alive to reuse the connection) when
close() is invoked).
Node.js HTTP(S)/1.1 requests may experience a better throughput/performance by default.
Contributed by Paolo Insogna in #43522
The WebCrypto API is now stable (with the exception of the following algorithms: Ed25519, Ed448, X25519, and X448)
require('node:crypto').webcrypto to access this module.
Contributed by Filip Skokan in #44897
Custom ESM Resolution Adjustments
Node.js has removed the
--experimental-specifier-resolution flag. Its functionality can now be achieved via custom loaders.
Contributed by Geoffrey Booth in #44859
Support for DTrace/SystemTap/ETW was removed in v19.0.0. The main reason is the prioritization of resources. The complexity to keep the support up-to-date has proved not worth it without a clear plan to support these tools.
If you are interested in helping to bring DTrace back, an issue has been opened here: https://github.com/nodejs/node/issues/44550.