Highlights of Node.js 10
Standardised Error Code 😊
- One of the best thing that happened to Node.js since it’s release.
- You no longer have to do inconsistent string matching for catching errors.
- Now you debugging will be more smooth.
- Successor to HTTP, HTTP2 has a lot to offer.
- It was initially released with v8 but it was buggy
- Read more about HTTP2 here: Say Hello to HTTP2 in Node.js
Support for ES Module (ESM) 🎻
- Node.js was initially released with CommonJS module
- With v10, ESM module (import & export) are in high priority now
- You have to use the flag –experimental-modules and .mjs extension for files if you want to try it out.
- Read more about it here: Native ESM in Node.js
Modern Cryptography 🔐
- Upgrade to Open SSL 1.1.0
- Faster handshakes and more security
- ChaCha20 cipher and Poly1035 authenticator (What’s that?)
- The ChaCha20 cipher is 3X times faster compared to the AES (Advanced Encryption Standard)
Promise for File System module (Yay !! 🎉)
- There was a time when I wrote a wrapper for fs module in node.js when I first came to know about Promises and now you can get it out of the box.
- To use this wrapper, write : require(‘fs/promises’)
- *Note: It’s still experimental*
Performance Improvements 🌟
- Node.js is now equipped with V8 v6.6 (I wonder what is V8)
- Better support for array performance and async generators
- Read about the improvements in v8 v6.6
N-API support in Node.js 10 🙇
- Next generation Node.js APIs for native modules is now independent of runtime (V8)
- Write C++ add-ons for Node.js without a deep knowledge of V8 Runtime
- N-API: Next generation Node.js APIs for native modules
Finally NPM 6 👌
- 17x faster compared to what it was a year ago…
- Let’s audit packages using npm audit
- Beyond npm@6: The future of the npm cli
The content for this article is majorly from Brad Traversy’s Youtube video. Watch it here: YouTube
Brad is an essential part of the community whose videos have helped a lot of beginners to come up with good understanding of different web technologies. Do subscribe him. Since a long time I was thinking to thank him and I found this to be a good way to thank him.