Software-update: Node.js 16.0

Node.js logo (75 pix) Node.js is open source en platformonafhankelijk, en is gericht op het ontwikkelen van server-sidewebapplicaties. Die applicaties worden geschreven in JavaScript en uitgevoerd binnen de Node.js runtime op de server. Het biedt een event-gedreven omgeving aan waarbij non-blocking i/o een belangrijk uitgangspunt is geweest. Voor meer informatie over Node.js verwijzen we naar deze pagina. Het ontwikkelteam heeft versie 16.0 vrijgegeven en de release notes daarvan zijn hieronder voor je neergezet.

Node.js 16 available now

We are excited to announce the release of Node.js 16 today! Highlights include the update of the V8 JavaScript engine to 9.0, prebuilt Apple Silicon binaries, and additional stable APIs.

You can download the latest release from https://nodejs.org/en/download/current/, or use Node Version Manager on UNIX to install with nvm install 16. The Node.js blog post containing the changelog is available at https://nodejs.org/en/blog/release/v16.0.0.

Initially, Node.js 16 will replace Node.js 15 as our ‘Current’ release line. As per the release schedule, Node.js 16 will be the ‘Current’ release for the next 6 months and then promoted to Long-term Support (LTS) in October 2021. Once promoted to long-term support the release will be designated the codename ‘Gallium’.

As a reminder — Node.js 12 will remain in long-term support until April 2022, and Node.js 14 will remain in long-term support until April 2023. Node.js 10 will go End-of-Life at the end of this month (April 2021). More details on our release plan/schedule can be found in the Node.js Release Working Group repository.

V8 upgraded to V8 9.0

As always a new version of the V8 JavaScript engine brings performance tweaks and improvements as well as keeping Node.js up to date with JavaScript language features. In Node.js v16.0.0, the V8 engine is updated to V8 9.0 — up from V8 8.6 in Node.js 15.

This update brings the ECMAScript RegExp Match Indices, which provide the start and end indices of the captured string. The indices array is available via the .indices property on match objects when the regular expression has the /d flag.

> const matchObj = /(Java)(Script)/d.exec('JavaScript');undefined> matchObj.indices[ [ 0, 10 ], [ 0, 4 ], [ 4, 10 ], groups: undefined ]> matchObj.indices[0]; // Match[ 0, 10 ]> matchObj.indices[1]; // First capture group[ 0, 4 ]> matchObj.indices[2]; // Second capture group[ 4, 10 ]

For more information about the new features and updates in V8 check out the V8 blog.

Stable Timers Promises API

The Timers Promises API provides an alternative set of timer functions that return Promise objects, removing the need to use util.promisify().

import { setTimeout } from 'timers/promises';async function run() {  await setTimeout(5000);  console.log('Hello, World!');}run();

Added in Node.js v15.0.0 by James Snell (https://github.com/nodejs/node/pull/33950), in this release, they graduate from experimental status to stable.

Other recent features

The nature of our release process means that new features are released in the ‘Current’ release line approximately every two weeks. For this reason, many recent additions have already been made available in the most recent Node.js 15 releases, but are still relatively new to the runtime.

Some of the recently released features in Node.js 15, which will also be available in Node.js 16, include:

  • Experimental implementation of the standard Web Crypto API
  • npm 7 (v7.10.0 in Node.js v16.0.0)
  • Node-API version 8
  • Stable AbortController implementation based on the AbortController Web API
  • Stable Source Maps v3
  • Web platform atob (buffer.atob(data)) and btoa (buffer.btoa(data)) implementations for compatibility with legacy web platform APIs
New compiler and platform minimums

Node.js provides pre-built binaries for several different platforms. For each major release, the minimum toolchains are assessed and raised where appropriate.

Node.js v16.0.0 will be the first release where we ship prebuilt binaries for Apple Silicon. While we’ll be providing separate tarballs for the Intel (darwin-x64) and ARM (darwin-arm64) architectures the macOS installer (.pkg) will be shipped as a ‘fat’ (multi-architecture) binary.

The production of these binaries was made possible thanks to the generosity of MacStadium donating the necessary hardware to the project.

On our Linux-based platforms, the minimum GCC level for building Node.js 16 will be GCC 8.3. Details about the supported toolchains and compilers are documented in the Node.js BUILDING.md file.

Deprecations

As a new major release, it’s also the time where we introduce new runtime deprecations. The Node.js project aims to minimize the disruption to the ecosystem for any breaking changes. The project uses a tool named CITGM (Canary in the Goldmine), to test the impact of any breaking changes (including deprecations) on a large number of the popular ecosystem modules to provide additional insight before landing these changes.

Notable deprecations in Node.js 16 include the runtime deprecation of access to process.binding() for a number of the core modules, such as process.binding(‘http_parser’).

Node.js

Versienummer 16.0
Releasestatus Final
Besturingssystemen Windows 7, Linux, BSD, macOS, Solaris, Windows Server 2012, Windows 8, Windows 10, Windows Server 2016, Windows Server 2019
Website Node.js
Download https://nodejs.org/en/download/
Licentietype GPL

Door Bart van Klaveren

Downloads en Best Buy Guide

21-04-2021 • 11:16

3

Submitter: w3news

Bron: Node.js

Reacties (3)

3
3
3
0
0
0
Wijzig sortering
Heeft nogal wat implicaties als je bijvoorbeeld met WebdriverIO werkt en testautomatisering. Probeer eerst een poc'je voordat je je bestaande project update.
Voor een project updaten naar node.js 16 ben je denk ik erg snel, maar welke implicaties ben je tegengekomen?
Voor projecten kun je het beste eerst even geduld hebben tot alle packages zelf ook testen in de nieuwe node.js versie (WebdriverIO test zelf nu nog niet met node.js 16)

Zelf heb ik gisteren en vandaag ook diverse packages (automatisch in GitHub actions) getest met node.js 16 (naast 14 en 12 en sommige packages ook nog in 10), en tot nu toe werkte alles direct.
WebdriverIO heeft aantrekkelijke sync syntax, maar omdat node-fibers stopt met ondersteuning zal je veel moet herschrijven en wordt je code overladen met await's
zie Linkie

Op dit item kan niet meer gereageerd worden.