Node + io.js = Node.js 4

Node.js 4.0 released

JAXenter Editorial Team
Four image via Shutterstock

Three months after the Node.js Foundation started work on a new release candidate, Node.js 4.0.0 has been released – now featuring the io.js fork code base for the very first time.

The biggest change brought about by Node.js 4.0.0 is the new support ES6 features, all of which are now available by default. These include ES6 classes, typed arrays, generators, Promises, Symbols, collections, block scoping, template strings and, for the first time, arrow functions. IoT developers can also look forward to the addition of ARM support to the platform. ARMv6, ARMv7 and the new 64-bit ARMv8 processors are now supported.

Since there are no serious breaking (API) changes here, both io.js and Node.js users will have a relatively simple upgrade path to Node.js 4.0.0. However, due to the numerous changes it makes sense to carry out detailed tests before a transition, especially in production environments.

Possible compatibility problems

There’s one area where users may well encounter problems: Node.js has updated the underlying JavaScript engine V8 to version 4.5. On the one hand, that’s a positive, because the dependence on the V8 JavaScript engine had been problematic until now. In fact, the engine, which has now enjoyed significantly faster development, was one of the reasons for the io.js fork.

SEE ALSO: io.js officially joins the Node.js foundation

Because Node.js projects usually rely on modules, and some are bound natively by them to V8, any such update to the engine means that native modules may no longer work without appropriate precautions. This is where the abstraction library NAN comes in, which provides various macros and an API for different V8 versions. In the wake of the new major release, NAN has now undergone a major revision and is currently in version 2.0.9. To work with Node.js 4.0.0, all native modules must be modified so that they are compliant with the 2.x series of NAN.

You’ll find more about Node.js 4.0.0 on the official website or on GitHub.

Inline Feedbacks
View all comments