Node.js version 8.x has now been promoted to LTS¬†with the codename¬†‘Carbon’.¬†¬†This means it is now ready for production use and you should start planning for when/if you want to upgrade.¬† In particular, if you are using version 4.x it is a good time to start planning for an upgrade as version 4.x will go out of service in April 2018 (you only have about 6 months left).
Node.js Version 8 becomes the third LTS release since the move to the¬†Node.js foundation. Having been involved in the early planning and discussions around LTS releases and lifespans, it is nice to see how well they have worked out.¬†With 4, 6, and 8 rolling out at a regular cadence, things seem to be well on track for predictable releases both in terms of schedule and stability. ¬†You can find the latest LTS schedule¬†here.¬† On a note closer to home, it is great to see IBM’s Gibson Fahnestock helping to put out the LTS release.¬† Regular and stable releases are important to our customers and we are happy to be able to help out on this front.
As with any current release,¬†Node.js version 8 supports Linux on P, Linux on Z, and AIX. Make sure to check out the supported¬†platform list in:¬†BUILDING.md¬†as some of the supported platforms and minimum OS levels have been updated.
Version 8 is business as usual with both incremental updates, updates to v8, and some key new features in Node.js itself. Some of the headline changes include:
The ignition+turbofan¬†pipeline does change the overall performance characteristics, therefore,¬†it is good to pay attention to that as part of your upgrade. We’ve been tracking performance through the nightly performance runs and so far it looks like it has been a win.¬†You can look at the results¬†here. You will notice¬†that version 8.x of Node.js shows a significant improvement over version 6.x on the acmemair benchmark (50% for throughput and 33% latency) along with significant gains on node-dc-eis as well.
Version 8 includes firstname.lastname@example.org.X.¬† It has a number of new features and changes you can read about¬†here.
I’ve been involved in the development of this API since the beginning, and it good to see it going out in this release. ¬†A more in depth introduction is covered in this blog that I co-authored:¬†https://medium.com/@nodejs/n-api-next-generation-node-js-apis-for-native-modules-169af5235b06.
If you just want to dive into the details, the documentation is available¬†here.
Debugger protocol/CLI debugger/Chrome developer tools
The previous¬†debug protocol has been dropped with the move up to V8 6.1, replaced by a new protocol. To support this new protocol an updated command line interface (node-inspect) has been adopted by Node.js. ¬†Updated documentation is provided¬†here. ¬†Also cool is that the chrome developer tools now have a dedicated page for connecting to Node.js through this protocol. ¬†You can access this page with¬†about:inspect.
This is an easy and fast way to start debugging your Node.js processes.
Support for the¬†WhatWG URL¬†standard was added as an experimental feature in version 7¬†as an alternative to the existing url.parse() API. In version 8 it graduates out of experimental as a supported API. ¬†This provides standardized URL parsing to Node.js. ¬†You can read more about it¬†here.
util.promisify was added in version 8 as a utility to make it easier and more efficient to use promises with existing Node.js APIs. It takes a function following the common Node.js callback style and returns a version that returns a promise. ¬†If you are a user of promises you should read about it¬†here.
A new tracing feature was added which provides a way to centralize tracing information generated by Node core, v8 and user code. ¬†Right now most of the available events are generated by v8, but we hope to see the adoption/generation of trace events accelerate in future versions. ¬†You can read more about it¬†here.
Version 8 includes an updated¬†¬†AsyncHooks API that will allow better instrumentation by Application Performance Management (APM) vendors, improving the data that can be provided as well as stability of the APM implementations across versions. ¬† The API allows callbacks to be registered which track the lifetime of asynchronous resources within a Node.js application. ¬†Look for the “Async Hooks” section¬† in the Node.js API documentation here.¬†
http2¬†module provides an implementation of the¬†HTTP/2¬†protocol.¬† HTTP/w provide a number of new features and options for improving performance.¬†¬†It is good to see that it is in an LTS release even if it is still experimental.¬† You can check out the current documentation here.
Less exciting but just important is the ongoing work to improve the existing core runtime. This includes bug fixes, improvements to documentation and tests, along with some cleanup and tightening of the API contract. ¬† Ongoing work on this front is a sign of a vibrant and active project.
I hope you are as excited about Node.js version 8 as I am. ¬† It brings all these exciting changes, along with incremental improvements and bug fixes which should make it one of the best releases so far.
If you’d like to read more about IBM’s work on Node.js in general check out our Node.js developer center.¬† For more specific information on what we are doing for¬†version 8.x of Node.js, keep an eye on our blogs page.