Node.js 4.0 released
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
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.