This article is more than 1 year old

Node.js 16 released with Apple Silicon binaries, JavaScript V8 engine turned up to nine

All supported releases will now support ECMAScript modules - but progress on moving away from CommonJS is slow

Node.js 16 has been released with prebuilt Apple Silicon binaries and version 9.0 of the V8 JavaScript engine.

Node.js releases appear every six months or so. A new version becomes the current release, and odd numbered releases are supported for only six months, but even numbered releases become long-term support (LTS) releases. The last three LTS releases were therefore 10, 12 and 14 (or Dubnium, Erbium and Fermium), while version 16, once it has had six months to mature, will be known as Gallium.

This release is based on version 9.0 of the V8 JavaScript engine, and therefore supports new language features added since version 8.6, used in Node.js 15. There is nothing dramatic in this respect, but developers can look forward to the Timers Promises API, RegExp Match indices and other goodies. Version 9.0 was released in mid-March and the details of what is new are documented here.

This is the first Node.js release to have prebuilt binaries for Apple Silicon, and the Mac installer will be shipped as a fat binary with both Intel and ARM architectures included.

mouse dirty

It's 2020 so not only is your mouse config tool a Node.JS Electron app, it's also pwnable by an evil webpage

READ MORE

We asked the Node.js team about progress towards supporting ES6 modules. One of the issues with JavaScript development is that some libraries and tools use CommonJS, which import modules with the require statement, and others the more recent ES6, or ESM (ECMAScript) standard, which uses the import statement. The two systems behave differently at runtime. ESM modules are supported by web browsers, whereas CommonJS is not.

Bethany Griggs, senior software engineer and member of the Node.js TSC (Technical Steering Committee) at Red Hat, told us that "Node.js is moving towards ES6 modules. The project has also started to update code samples across the API documentation to include ESM examples. But CommonJS, and the interoperability thereof, will also remain important for the foreseeable future."

"The Node.js project had a Modules Team focused on driving the implementation of ECMAScript modules (ESM) in Node.js. The work of this team resulted in the ESM implementation in Node.js being promoted to stable status in November 2020 (in v15.3.0)," Griggs explained.

"Recently, pull requests have also been opened to promote the ESM implementation to stable in both Node.js 12 and 14. Once Node.js 10 goes End-of-Life at the end of this month, and the next set of LTS updates are released, the underlying ESM implementation is likely to be stable in all supported release lines of Node.js."

In this respect then Node.js 16 is something of a landmark. However, Griggs also noted that "some specific ESM APIs remain experimental. This includes the Loaders API which is currently being redesigned with use cases such as instrumentation and mocking in mind. And while still experimental, Top-Level Await is supported in ESM in Node.js 14 upwards.

"One of the barriers to adoption that remains is the availability of Application Performance Management/Monitoring (APM) solutions for ESM. But I’m hopeful that with the ESM implementation soon to be considered stable in all supported versions of Node.js, and the efforts to redesign the Loaders API, will help lead to solutions in this space," she concluded. ®

More about

More about

More about

TIP US OFF

Send us news


Other stories you might like