Last month on 30th May 2017, almost after one month’s delay, Node.Js has released Node.Js 8 that comes with many new and exclusive range of features, small improvements and enormous opportunities for developers.
The latest version of Node.js is going by the codename “Carbon” that will go into Long Term Support (LTS) in October 2017 and it will be maintained till December 31st, 2019.
The highlighted updates and features of Node.Js 8 comprise Node.js API for native module developers, async_hooks, JS bindings for the inspector, zero-filling Buffers, util.promisify, etc.
So, what’s more it offers?
The Most Exciting Features of Node.js 8
The latest node.js version comes with npm5 that can be easily used by the users as it will be saved by default now. In npm 5, package-lock.json will be automatically developed unless an npm-shrinkwrap.json exists. Also, if there is no internet connectivity, you don’t have to retry network requests.
Another major change is that npm 5 will install the packages from the latest registry you have switched to. Let’s take one example, if you have made your package lock against registry A, and switch to Registry B, npm will pick Registry B to install the packages, not Registry A.
In Node.js 8.0, the WHATWG URL implementation is a fully supported, non-experimental API within Node.js. The benefit of using the new URL implementation is that it matches with the URL implementation and API that are obtainable in modern web browsers like Firefox, Chrome, Safari and Edge. So, code that contains URLs can be easily shared across environments.
The zero-filling Buffer (num) and a new Buffer (num) are both added by default. Using zero-filling Buffer, you can get help in security and privacy to prevent information leaks. It is suggested for Node.js users that they use this function only if they are aware of the risks and know to avoid those issues. Moreover, the problem with this bugger is that the folks using it will take performance hits; however, it can be avoided by migrating to buffer.allocUnsafe().
When it comes to TurboFan & Ignition, it is one of the biggest changes in Node.Js that users can experience in the latest release Node.js 8. TurboFan is the optimizing compiler, whereas Ignition is V8’s interpreter. TurboFan and Ignition compiler pipeline leads to lower memory consumption and faster startup across Node.js apps.
This latest pipeline enhances the technical debt of the V8 team, and gives a lot of improvements that were not feasible earlier.
If you wanted to make it simpler to comprehend users of Buffer num within an application while developing time or within CI testing environments, a new pending deprecation command-line flag and matching Node_Pending_Deprecation=1 environment variable have been added, which will allow Node.js to release DeprecationWarning process warnings when Buffer (num) are used. To keep these deprecations from impacting production applications, these are off by default. In the below given example, you can see pending deprecations.
$ ./node –pending-deprecation
> (node:2896) [DEP0005] DeprecationWarning: The Buffer() and new Buffer() constructors are not recommended for use due to security and usability concerns. Please use the new Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() construction methods instead.
Node.js 8.0 has the legacy command line debugger. With the direct integration of node-inspect into the Node.js runtime is mainly meant for command line replacement. Along with this, the V8 Inspector debugger has been upgraded to a completely supported feature.
The Node.js app would crash because of the errors that are occurring while trying to write console output to the underlying stream. But With the all new Node.js 8.0, such errors and issues will be eliminated like suppressing the error events emitting while using console methods. This feature will also make other APIs more safe and secure.
Node.js 8 is not a silver-bullet new platform that will rule the web development world, but it is a platform that fills particular needs.
While developing fast, scalable networking application, Node.js 8 can be used as it can handle a huge number of simultaneous connections with the high amount that equates to high scalability.
When it compares to traditional web-serving techniques, where each connection request spawns a new thread, Node.js 8 is known for operating on a single-thread, using non-blocking I/O call, allowing it to support tens of thousands of concurrent connections.
However, the major improvement in Node.js 8 is N-API which is considered as an excellent replacement over the existing Native Abstractions for Node.js (nan). This new API allows native add-ons to be compiled once on a system and used on different versions of Node.js.
Watch this video
So, these new features of Node.js 8 are the most prominent that are meant to give the platform a fresh look and eliminate the previous drawbacks that were affecting its performance. Still, it is extremely popular among big companies like Microsoft, IBM, Yahoo, Netflix, and LinkedIn. With the constant upgrades and improvements, the future of Node.js is bright and bigger.
If you want to learn about Node.js and its related technologies from the beginning, you can read these top node.js books that can help you to update your skills and get the required information about it.
Moreover, you can also share your views about Node.js 8 and its latest features. Still, if you have any confusion related to Node.js development, feel free to get in touch with our Node.js developers. You just need to fill the contact us form and our team of Node.js developers will get back to you and solve your queries.This page was last edited on September 13th, 2017, at 0:33.
Get your free consultation now