Skip to content
← Back to Blog

Tuesday, June 25th 2019

Node.js 10 is Now Available

Posted by

Avatar for styfle

Steven Salat

Software Engineer

With the release of Node.js 10, features like BigInt, a stable API for native addons, and several performance improvements have found their way into production.

Today, we are enabling Node.js 10 support for new serverless Node.js functions and Next.js applications deployed using Vercel.

How to Upgrade

In order to have your code invoked with Node.js 10, you need only to add an engines field to your package.json file as follows:

{
"name": "my-app",
"engines": {
"node": "10.x"
}
}

As you can see, we have configured 10.x as the version, instead of the exact one.

This is possible because the engines property (as per the documentation) supports semantic version ranges in its syntax.

At the moment of writing, this will result in Node.js 10.15.3 being used.

NOTE: The range 10.x will allow new deployments to take advantage of security updates and features released to Node.js 10 LTS. It is not possible to pin a specific version at this time.

Supported Builders

If your deployment uses one of the following Builders, you can opt into Node.js 10:

What Has Changed

Node.js 10 includes several new features, such as a stable API for native addons, BigInt, a better way of creating Buffers, and version 6.0 of npm.

On your serverless function, however, the most noticeable improvement will be in performance (from Node.js 10 including V8 6.6).

As an example, Array.reduce is now much faster for holey double arrays:

array-reduce-big.png

Even a regular Promise will now be faster:

promise-big.png

The performance metrics were retrieved from the v8 release post. For a full list of all changes, take a look at Auth0's release summary.

Conclusion

Our team is working hard to ensure that – every time a new Node.js release occurs – we provide you with the respective runtime for your serverless functions.

Make sure to update your existing deployments to Node.js 10 (as described above) and keep your eyes open for future Node.js updates via our Twitter page.

Should you have any questions, please let us know.