Identified for its pace, simplicity, and stability, Node.js doesn’t introduce too many novelties. Even when it does, they sometimes enter the discharge schedule as experimental options. Nonetheless, the mixed contribution of variations 16 by way of 20 provides us sufficient new upgrades to jot down and get enthusiastic about. Find out how you should utilize and profit from these options in your tasks.
In relation to new Node.js options, the OpenJS Basis, which oversees the event of Node.js, opts for comparatively frequent, but modest releases. Final 12 months introduced two variations and the most recent one Node.js 20 was launched on April 18 this 12 months.
Under, you can find an summary of what I take into account an important adjustments launched within the newest Node variations, beginning with the one which got here final – model 20 – all the best way to model 10.
Earlier than we get to that, let’s check out the Node.js launch schedule.
Additionally, take into accout, the article additionally consists of archives of older variations of Node.js. Use the left-hand sidebar to scroll to the precise model you have an interest in. The newest coated model is 20.

Node.js releases defined
Together with the most recent one, there are 18 Node.js variations. Every one has a launch standing assigned to it. Crucial sorts embody:
- Present – since new variations are sometimes launched each 6 months, every new model enters the Present standing for half a 12 months from the day of its launch. After this era, odd-numbered releases turn into unsupported.
- Lively LTS – even-numbered releases as a substitute transfer to the Lively LTS standing. They’re now prepared for basic use. You may count on assist, together with important bug fixes, all through 30 months.
- Upkeep LTS – just one even-numbered model at a time carries the Lively LTS standing. As soon as a brand new one reveals up and completes the Present standing, the earlier one strikes to the Upkeep LTS. It is going to proceed to obtain updates till its end-of-life date.
What in regards to the standing of the most recent Node.js releases?
Node.js 16 is now the Lively LTS model. The odd-numbered model 17 has simply misplaced its Present standing and its end-of-life is coming this June. Node.js 18 is now the Present model and is anticipated to turn into the brand new Lively LTS model this October.

Let’s get to the overview of options!
Node.js 20
The Node.js model 20 got here out on April 18. Since that is an even-numbered launch, it’s going to obtain long-term assist and can enter energetic LTS standing in October.
Node.js 20 remains to be solely being rolled out however you possibly can be taught rather a lot about what’s new and improved on this model. To sum issues up:
- The Permission Mannequin is a brand new experimental function that makes it doable to limit entry to particular sources throughout program execution, together with file system operations. It’s going to turn out to be useful for shielding delicate info. It’s behind a flag –experimental-permission.
- ESM hooks equipped by way of loaders at the moment are on a devoted thread.
- The V8 engine is now raised to model 11.3, a part of Chromium 113.
- The Check Runner is now steady (!).
- The newest model of the Ada URL parser is added.
- Assist for ARM64 Home windows.
- New tweaks and enhancements for Internet Crypto API.
We’re going to develop the part as we proceed to experiment and be taught extra about Node.js 20!
Node.js 19
Node.js 19 was solely launched again in October 2022, however as an odd-numbered model it’s already on the verge of changing into unsupported. Nonetheless, it affords some very fascinating new options. Listed below are our favorites.
node –watch (experimental)
The newly supported watch mode restarts a course of at a time when a change happens to an imported file. You may flip it on with the next command:
$ node --watch index.js
The Software program Home’s senior Node.js developer Rafał Gołubowicz may be very keen on this addition:
Most Node.js builders acquired used to putting in dev dependencies that allowed them to auto-restart the server when any adjustments within the code appeared. Nodemon is one such answer. The brand new –watch flag is one thing that the Node.js neighborhood has been speaking about and advocating for years. It permits for eliminating exterior dependencies to live-reload. That’s a terrific adjustment.
HTTP(S)/1.1 KeepAlive by default
The Hold-Alive instruction permits a single TCP connection to remain open for a large number of HTTP requests. Beginning with Node.js 19, it’s going to be true by default. Any outgoing HTTP(S) connection will use it. The default length is 5 seconds.
Ought to the function turn into steady, it should positively enhance throughput as all of the accessible connections will now be reused by default.
Secure Internet Crypto API
Node.js 19 brings a steady model of the WebCrypto API. The globalThis.crypto class accesses the module that gives a wide range of low-level cryptographic capabilities.
That is positively excellent news for security-oriented Node.js customers. The third-party high-level JavaScript cryptographic libraries are a frequent goal of complaints relating to their effectivity and safety. Their lack of entry to {hardware} options and multi-threading was a significant challenge as properly.
Hopefully, this modification will make the Internet Crypto API extra in style than it has been to date throughout the Node.js neighborhood.
What sort of tasks did we develop with Node.js?
Take a look at the portfolio and check out our Node.js-related success tales.
Node.js model 18 & earlier
Variations 16-18 introduced a variety of fascinating developments. Let’s begin with model 18, which as of March 27 2023 remains to be the energetic LTS model.
New globally accessible browser-compatible APIs
Fetch API
The node-fetch module has at all times been very useful as a straightforward solution to fetch knowledge to and from exterior net servers or APIs. Now, utilizing it should turn into much more environment friendly. Node 18 options an experimental international fetch API, which permits the identical strategies with out having to depend on exterior packages.
The brand new implementation comes from undici and is impressed by node-fetch. The implementation tries to be as specification-compliant as doable, making the native browser fetch API suitable with NodeJS. With that change, the browser globals fetch, FormData, Headers, Request, and Response at the moment are accessible in Node.js.
Right here’s how the brand new API works:
The brand new function will definitely make the Node index extra highly effective.
Internet Streams API
This API is all about streaming — that’s — breaking a useful resource into small chunks and processing it little by little. The method has its advantages by way of each efficiency and person expertise on the net. The Internet Streams API consists of quite a lot of stream interfaces that work alone or in live performance to course of varied sorts of sources.
With Node.js 18, the experimental implementation of Internet Stream is uncovered to the worldwide scope, making all the assorted stream interfaces globally accessible.
Different APIs
There are another APIs that acquired vital consideration within the newest Node.js launch. Each Blob and BroadcastChannel are not experimental. As well as, they’re now accessible globally. Blob makes it simpler to share knowledge throughout employee threads, whereas BroadcastChannel simplifies sure features of asynchronous communication.
Check runner module (experimental)
The Node.js workforce is actively attempting to introduce new out-of-the-box options that may exchange varied third-party modules and frameworks. When achieved properly, such adjustments can:
- lower the complexity of an surroundings,
- enhance CI/CD workflows,
- take away upkeep overhead.
Till now, Node.js hasn’t had an out-of-the-box check runner. As builders, we relied on exterior instruments comparable to Jest. The brand new check runner facilitates JavaScript assessments within the in style TAP format, which decouples the error reporting half and the presentation half. The general objective of the brand new runner is to supply a light-weight check runner that covers a lot of the key options of different extra sturdy testing frameworks.
Right here is an instance of how you should utilize the brand new check runner in your mission:
OpenSSL 3.0 assist
OpenSSL is a well-liked library used to safe communications over pc networks. It was initially written in C, however builders can use wrappers in an effort to profit from this library in a wide range of programming languages and environments, together with Node.js.
Beginning with model 17, Node.js builders can now use OpenSSL 3.0. Essentially the most notable enchancment within the new OpenSSL model is assist for QUIC – a transport layer community protocol designed by Google to enhance web/community latency.
Secure timers guarantees API
A brand new steady model of the timers guarantees API has been made accessible beginning with Node.js 16. It was initially launched as an experimental function within the earlier launch.
Guarantees-based timer capabilities are useful for lots of issues. You should use them to make your Node.js scripts anticipate different duties/programs to complete their job. It was doable earlier than, however with the brand new API, it takes a lot much less code to realize.
The timers guarantees API features a whole of three minor APIs:
- setImmediate fulfills a promise instantly.
- setTimeout delays quite a lot of milliseconds earlier than it strikes to satisfy the promise.
- setInterval returns an async iterator. It generates values in an interval of delayed milliseconds.
Modifications to the toolchain & compiler
Node.js offers pre-built binaries for a wide range of platforms. They make it simpler to shortly arrange your surroundings. Node.js 16 introduced a few new ones:
- The macOS installer ‘fats’ (multi-architecture) binary.
- Particular person tarballs for Intel (darwin-x64) and ARM (darwin-arm64).
- The prebuilt binaries for Apple Silicon.
Let’s check out another factor that considerations the entire releases on this part.
V8 JavaScript engine improve
Variations 16-18 of of Node.js additionally noticed the V8 JavaScript engine go from model 8.6 to 10.1. Numerous updates and enhancements have been made to V8 by the Chromium Undertaking. The JS engine used not solely by Node.js but additionally by the Google Chrome browser and plenty of different in style tasks now consists of:
- Sooner tremendous property entry primarily by making use of an inline cache system.
- New RegExp options from ECMAScript 2022, together with match indices.
- Upgrades for the Intl.DisplayNames, Intl.DateTimeFormat, and Intl.Locale APIs, specifically, it is best to take a look at the brand new timeZoneName choices.
- Improved efficiency of sophistication fields and personal class strategies (sooner initialization).
- New array strategies: findLast() and findLastIndex().
That’s it for the 16-18 Node.js replace!
Node.js model 15 & earlier
NPM 7 – what’s new?
Node.js was not a significant launch, however it’s nonetheless very fascinating. With Node 15 , we’re getting npm 7.
That is one more huge step for the entire Node.js net improvement neighborhood, with some very fascinating JavaScript language options added.
Workspaces are probably the most fascinating ones. Yep, npm is getting what yarn has been identified for. For those who’re utilizing lerna or was interested by monorepo to your packages, that is what you had been searching for. Learn extra about this on the npm repository web page.
The second can also be by some means associated to yarn. With npm 7, the yarn.lock file is not ignored. Npm goes to learn yarn lock for bundle metadata and determination steerage after which create its personal package-lock.json.
Bundle-lock has additionally modified. With npm 7, we’re launched to a totally new format of that file. The brand new model (V2) comprises every little thing that’s needed for deterministically reproducible builds. That is the distinction between npm and yarn. Yarn deterministic builds are based mostly on a yarn.lock and a model of yarn. So if we used a special model, then we’re going to get a special set of packages.
For npm, that is going to be constant even between completely different variations.
Unhandled rejections change
For typical synchronous circulation, Node.js closes its course of as quickly as error code is thrown. Nonetheless, it’s a special story in terms of asynchronous operations.
For years, we had so as to add two necessary occasion handlers to safe our apps – uncaughtException and unhandledRejection.
Node 15 introduces an enormous replace on how unhandled promise rejections are dealt with. The default mode was modified from warn to throw.
In Node 14, an unhandled rejection printed a warning to the console. In Node 15, these will likely be dealt with as uncaught exceptions and can trigger your app to exit.
This can be a good change!
V8 new model
As normal, a brand new Node is shipped with the brand new model of V8. This time, we’re getting 4 new options:
The primary one is assist for Promise.any. That is one thing much like Promise.race. Nonetheless, the decision is a bit completely different. Promise.any is resolved as quickly as at the very least one promise is fulfilled and rejected solely when all guarantees are rejected – be taught extra.
The following one is said to error aggregation. With V8 8.6, we’re getting a brand new error kind – AggregateError. It takes an array of errors. An excellent instance is an error from Promise.any. As a substitute of throwing an array of errors, it throws a single one containing an array of errors.
The third one is a assist for String.prototype.replaceAll. Because the title says, it’s about changing all occurrences of a selected string or sample. For instance:
The final one are new logical operators – &&=, ||=, ??=. It’s simpler to see them in motion than to elucidate it, so let’s see the code:
All of it comes on high of the adjustments and enhancements launched again in Node 14 with V8 8.1:
- Entry to the personal area.
- Awaits ought to work a lot sooner, as ought to JS parsing.
- Our apps ought to load faster and asyncs ought to be a lot simpler to debug, as a result of we’re lastly getting stack traces for them.
- The heap dimension is getting modified. Till now, it was both 700MB (for 32bit programs) or 1400MB (for 64bit). With new adjustments, it’s based mostly on the accessible reminiscence!
With the most recent Node model 14, we’re gaining access to the latest V8. Which means we’re getting some in style options of the JavaScript engine.
For those who’re utilizing TypeScript, you in all probability work with nullish coalescing and non-obligatory chaining. Each of these are natively beginning with Node 14.
We’re additionally getting just a few updates to Intl. The primary one is assist for Intl.DisplayNames and the second is assist for calendar and numberingSystem for Intl.DateTimeFormat.
New experimental options
Node 15 additionally brings some new experimental options.
The primary one is a assist for QUIC – a brand new UDP-based transport protocol that’s utilized in HTTP/3. You will discover extra details about this right here.
If you wish to play with it, keep in mind to run node with –experimental-quic.
The second is AbortController. The principle use case is signalling the promise cancellation. Proper now the implementation is experimental, however nonetheless, we’re ready for extra!
Node + Internet Meeting = <3
Internet Meeting is slowly gaining in recognition. An increasing number of Node modules are experimenting with this language and so is Node itself! With the Node 15 launch, we achieve entry to the experimental Internet Meeting System Interface – WASI.
The principle concept behind that is to supply us with a neater solution to entry the underlying working system. I’m actually trying ahead to seeing extra Internet Meeting in Node.
* Under, you can find info on Node.js ver. 12 and earlier. *
The right way to use TypeScript with Node.js effectively? Discover out from this text.
- TypeScript Node.js is a match made in net improvement heaven! Discover ways to migrate to TypeScript with this tutorial
Want assist with top-class Node.js programming?
? Discover out what you possibly can obtain with Poland’s largest Node workforce that builds performance-driven apps for hundreds of thousands of customers.
Node.js model 12 & earlier
Secure Diagnostic Reviews
In Node 12, we’ve acquired a brand new experimental function known as Diagnostic Reviews. By utilizing it, we might simply get a report that comprises details about the present system. What’s extra, we are able to generate it not solely on demand but additionally after a sure occasion.
When you have any manufacturing working a Node app, then that is one thing try to be trying out.
Threads are nearly steady!
With the final LTS we’ve acquired entry to threads. In fact, it was an experimental function and required a particular flag known as –experimental-worker for it to work.
With Node 12 it’s nonetheless experimental, however gained’t require a flag anymore. We’re getting nearer to a steady model!
ES modules assist
Let’s face it, ES modules are at the moment the best way to go in JavaScript improvement. We’re utilizing it in our frontend apps. We’re utilizing it on our desktop and even cell apps. And but, in case of Node we had been caught with widespread.js modules.
In fact, we might use Babel or Typescript, however since Node.js is a backend expertise, the one factor we should always care about is the model of the Node set up on the server. We don’t must care about a number of completely different browsers and assist for them, so what’s the purpose of putting in a device that was made exactly with that in thoughts (Babel/Webpack and so on.)?
With Node 10, we might lastly play somewhat with ES modules (present LTS has experimental implementation for modules), but it surely required us to make use of particular file extension – .mjs (module javascript).
With Node 12, it’s getting somewhat bit simpler to work with. Very like it’s with net apps, we get a particular property kind known as that can outline if code ought to be handled like widespread.js or es module.
The one factor you might want to do to deal with all of your recordsdata as a module is so as to add the property kind with the worth module to your bundle.json.
Any longer, if this bundle.json is the closest to our .js file, it will likely be handled like a module. No extra mjs (we are able to nonetheless use it if we need to)!
So, what if we wished to make use of some widespread.js code?
So long as the closest bundle.json doesn’t include a module kind property, it will likely be handled like widespread.js code.
What’s extra, we’re getting new an extension known as cjs – a standard.js file.
Each mjs file is handled as a module and each cjs as a standard.js file.
For those who didn’t have an opportunity to attempt it out, now’s the time!
JS and personal variables
In relation to JavaScript, we’ve got at all times struggled to guard some knowledge in our lessons/capabilities from the surface.
JS is known for its monkey patching, which means we might at all times by some means entry nearly every little thing.
We tried with closures, symbols and extra to simulate private-like variables. Node 12 ships with the brand new V8 and so we’ve acquired entry to 1 cool function – personal properties within the class.
I’m positive you all keep in mind the outdated strategy to privates in Node:
Everyone knows it’s not likely a personal – we’re nonetheless in a position to entry it anyway, however most of IDEs handled it like a personal area and most of Node devs knew about this conference. Lastly, we are able to all neglect about it.
Are you able to see the distinction? Sure, we use # character to inform Node that this variable is personal and we wish it to be accessible solely from the within of this class.
Attempt to entry it instantly, you’ll get an error that this variable doesn’t exists.
Sadly some IDE don’t acknowledge them as correct variables but.
Flat and flatMap
With Node 12, we’re gaining access to new JavaScript options.
To start with, we’re gaining access to new array strategies – flat and flatMap. The primary one is much like Lodash’s flattenDepth methodology.
If we move a nested arrays to it, we are going to get a flatten array consequently.
As you possibly can see, it additionally has a particular parameter – depth. By utilizing it, you possibly can determine what number of ranges down you need to flatten.
The second – flatMap – works similar to map, adopted by flat ?
Optionally available catch binding
One other new function is non-obligatory catch binding. Till now we at all times needed to outline an error variable for attempt – catch.
With Node 12 we are able to’t skip all the catch clause, however we are able to skip the variable at the very least.
Object.fromEntries
One other new JavaScript function is the Object.fromEntries methodology. It’s primary utilization is to create an object both from Map or from a key/worth array.
The brand new Node.js is all about threads!
If there may be one factor we are able to all agree on, it’s that each programming language has its professionals and cons. Hottest applied sciences have discovered their very own area of interest on this planet of expertise. Node.js is not any exception.
We’ve been instructed for years that Node.js is nice for API gateways and real-time dashboards (e.g. with websockets). As a matter of truth, its design itself compelled us to rely on the microservice structure to beat a few of its widespread obstacles.
On the finish of the day, we knew that Node.js was merely not meant for time-consuming, CPU-heavy computation or blocking operations as a result of its single-threaded design. That is the character of the occasion loop itself.
If we block the loop with a posh synchronous operation, it gained’t be capable to do something till it’s achieved. That’s the very purpose we use async so closely or transfer time-consuming logic to a separate microservice.
This workaround might not be needed because of new Node.js options that debuted in its 10 model. The device that can make the distinction are employee threads. Lastly, Node.js will be capable to excel in fields the place usually we’d use a special language.
An excellent instance might be AI, machine studying or huge knowledge processing. Beforehand, all of these required CPU-heavy computation, which left us no alternative, however to construct one other service or decide a better-suited language. No extra.
Threads!? However how?
This new Node.js function remains to be experimental – it’s not meant for use in a manufacturing surroundings simply but. Nonetheless, we’re free to play with it. So the place can we begin?
Ranging from Node 12+ we not want to make use of particular function flag –experimental-worker. Staff are on by default!
node index.js
Now we are able to take full benefit of the worker_threads module. Let’s begin with a easy HTTP server with two strategies:
- GET /whats up (returning JSON object with “Hiya World” message),
- GET /compute (loading a giant JSON file a number of instances utilizing a synchronous methodology).
The outcomes are simple to foretell. When GET /compute and /whats up are known as concurrently, we’ve got to attend for the compute path to complete earlier than we are able to get a response from our whats up path. The Occasion loop is blocked till file loading is finished.
Let’s repair it with threads!
As you possibly can see, the syntax is similar to what we all know from Node.js scaling with Cluster. However the fascinating half begins right here.
Attempt to name each paths on the similar time. Observed one thing? Certainly, the occasion loop is not blocked so we are able to name /whats up throughout file loading.
Now, that is one thing we’ve got all been ready for! All that’s left is to attend for a steady API.
Need much more new Node.js options? Right here is an N-API for constructing C/C++ modules!
The uncooked pace of Node.js is among the purpose we select this expertise. Employee threads are the following step to enhance it. However is it actually sufficient?
Node.js is a C-based expertise. Naturally, we use JavaScript as a primary programming language. However what if we might use C for extra advanced computation?
Node.js 10 provides us a steady N-API. It’s a standardized API for native modules, making it doable to construct modules in C/C++ and even Rust. Sounds cool, doesn’t it?

A quite simple native module can appear to be this:
When you have a primary data of C++, it’s not too laborious to jot down a customized module. The one factor you might want to keep in mind is to transform C++ sorts to Node.js on the finish of your module.
Subsequent factor we want is binding:
This straightforward configuration permits us to construct *.cpp recordsdata, so we are able to later use them in Node.js apps.
Earlier than we are able to make use of it in our JavaScript code, we’ve got to construct it and configure our bundle.json to search for gypfile (binding file).
As soon as the module is nice to go, we are able to use the node-gyp rebuild command to construct after which require it in our code. Identical to any in style module we use!
Along with employee threads, N-API provides us a fairly good set of instruments to construct high-performance apps. Neglect APIs or dashboards – even advanced knowledge processing or machine studying programs are removed from unattainable. Superior!
Full assist for HTTP/2 in Node.js? Certain, why not!
We’re in a position to compute sooner. We’re in a position to compute in parallel. So how about belongings and pages serving?
For years, we had been caught with the great outdated http module and HTTP/1.1. As an increasing number of belongings are being served by our servers, we more and more wrestle with loading instances. Each browser has a most variety of simultaneous persistent connections per server/proxy, particularly for HTTP/1.1. With HTTP/2 assist, we are able to lastly kiss this downside goodbye.
So the place can we begin? Do you keep in mind this primary Node.js server instance from each tutorial on net ever? Yep, this one:
With Node.js 10, we get a brand new http2 module permitting us to make use of HTTP/2.0! Lastly!

What does the longer term maintain for Node.js net improvement?
When Node.js first hit the market again in 2009, it shook all the world of software program improvement. It helped flip JavaScript from a considerably peculiar client-based scripting language into a robust backend answer even for giant purposes. It made severe skilled builders take JavaScript severely. It grew to become a key expertise for The Software program Home as properly.
At present, Node.js doesn’t should be revolutionary. And it’s not attempting to be. It took an evolutionary strategy and steadily improves its core performance – the flexibility to run JavaScript on the server.
In Node.js 18, the workforce is attempting to make the surroundings much more complete, whereas conserving it moderately light-weight. The most effective examples of which can be the brand new fetch and check runner updates. They add out-of-the-box assist for options that was solely accessible by way of third-party instruments, focusing solely on their most important, core functionalities. Consequently, Node.js is getting more and more sturdy, with out changing into overly advanced – a feat made doable partially as a result of its modular nature.
Node.js continues to develop. The accessible knowledge reveals that software program firms are usually not going to get fed up with Node.js builders anytime quickly – the utilization share of Node.js throughout the net rose to nearly 2 % during the last 12 months.

? Learn extra
For those who made all of it the best way right here, you have to be actually keen about Node.js! So is The Software program Home. Actually, Node.js providers are the most important a part of our expertise stack.
In case you are searching for Node.js job openings, take a look at our profession web page. And in case you are trying to find expert Node.js specialists that will help you create a superb product, contact us immediately and schedule free consultations.