Node.js 8 brings sanity to native module dependencies

From InfoWorld: Node.js, the popular server-side JavaScript platform, has been upgraded with improvements related to the runtime, buffer security, URL parsing, and preserving dependencies on native modules across major Node.js upgrades.

On the module dependencies front, Node.js 8.0.0, released today by the Node.js Foundation, introduces the Node.js API, or N-API, albeit still behind an experimental flag. The N-API is designed to eliminate the breakage of dependencies on native modules that happens between release lines.

Although native modules are a small portion of the modular ecosystem, 30 percent of all JavaScript modules rely indirectly on native modules, which are written in C or C++ and are bound to the Chrome V8 JavaScript engine. “Every time Node.js has a major release update, package maintainers have to update these dependencies,” the foundation said.

The upgrade also features the V8 5.8 JavaScript runtime, improving performance and offering developer-facing APIs. With the V8 5.8 engine, Node is set up for a transition to the Turbofan and Ignition compiler pipeline, enabling lower memory consumption and faster application startup times. The V8 5.8 engine has forward ABI (application binary interface) compatibility with V8 5.9 and the upcoming V8 6.0 release, the foundation said. The Node 8 line is expected to move to V8 5.9 and possibly V8 6.0 at some point. TurboFan and Ignition will be enabled by default with V8 5.9.

View: Article @ Source Site