Node.js follows a release schedule and adopts a Long-Term Support (LTS) policy. The release schedule is based on the Semantic Versioning (https://semver.org/) standard.
The Node.js release policy states that there are two major releases of Node.js per year, one in April and one in October. Major releases include breaking or incompatible API changes, although the Node.js project does try to minimize the number and impact of breaking changes to reduce disruption to users.
Even-numbered major releases of Node.js are promoted to LTS after 6 months. Even-numbered releases are scheduled for release in April and promoted to LTS in October. LTS releases are supported for 30 months. It is recommended to use LTS versions of Node.js for production applications. The purpose of the LTS policy is to provide stability to end users and also to provide a predictable timeline of releases so that users can appropriately manage their upgrades. All LTS versions of...
Installing Node.js 14 with nvm
This book will be using Node.js 14 throughout, as it is the latest LTS release at the time of writing. Node.js 14 was released in April 2020, was promoted to LTS in October 2020 and will continue to be supported until April 2023. This recipe will cover how to install Node.js 14 using node version manager (nvm). At the time of writing,
nvm is an incubation project of the OpenJS Foundation and provides an easy way to install and update Node.js versions.
You will need to have the appropriate permissions on your device to install
nvm. This recipe assumes you're on a UNIX-like platform. If you're on Windows, it should be run under Windows Subsystem for Linux (WSL).
How to do it…
In this recipe, we're going to be installing Node.js 14 using
- First, we need to install
nvmprovides a script that handles the download and installation of
nvm. Enter the following command in your Terminal to execute...
Accessing the Node.js API documentation
The Node.js project provides comprehensive API reference documentation. The Node.js API documentation is a critical resource for understanding which APIs are available in the version of Node.js that you're using. The Node.js documentation also describes how to interact with APIs, including which arguments a method accepts and the method's return value.
This recipe will show how to access and navigate the Node.js API documentation.
You will need access to a browser of your choice and an internet connection to access the Node.js API documentation.
How to do it…
- First, navigate to https://nodejs.org/api/ in your browser.
Expect to see the Node.js API documentation for the most recent version of Node.js:
- Hover over the View another version link and expect...
New major versions of Node.js tend to include a significant upgrade to the V8 engine. Node.js version 14.0.0 was released with V8 version 8.1. But at the time of writing, Node.js 14 has already been updated to include V8 version 8.4.
You will need to have Node.js 14 installed. You will also need to have access to a Terminal.
How to do it…
In this recipe...