James M Snell, Colin Ihrig
Node 8 is a major release with a lot of exciting features and is is the next release line to enter Long Term Support (LTS). In this post, we want to give you a quick summary of what it includes. For a more extensive description, please see our announcement post.
V8 5.8 has major improvements in performance and developer facing APIs.It is guaranteed to have forwards ABI compatibility with V8 5.9 and V8 6.0. It also helps set up a pending transition to the new TurboFan + Ignition compiler pipeline.
Node.js API (N-API)
For Node.js developers who use or create native add-ons, the new experimental Node.js API (N-API) will allow native add-ons to be compiled once on a system and used across multiple versions of Node.js. The new virtual machine agnostic Application Binary Interface (ABI) also enables native addons to work against Microsoft’s Chakra-Core.
The experimental async_hooks module diagnostics API allows developers a means of monitoring the operation of the Node.js event loop, tracking asynchronous requests and handles through their complete lifecycle.
- Buffer changes – A number of important changes have been made to the Buffer API within Node.js.
- Improved support for Promises – Node.js 8.0.0 includes a new util.promisify() API.
- Console changes – Making the use of console.log() and the other APIs safer.
- Static Error Codes – We have started the process of assigning static error codes to all errors generated by Node.js.
- Redirecting Process Warnings – Processing warnings such as deprecations may now to redirected to a file
- Stream API improvements – For users of the Stream API, new standard mechanisms for destroying and finalising Stream instances have been added
- Debugger changes – node-inspect has been integrated directly into the Node.js runtime. Additionally, the V8 Inspector debugger is a fully supported feature