Hosted by This.JavaScript, an online event where developers learn about the latest news in JavaScript, State of Frameworks and Libraries covered all the breaking news in the world of frameworks.
On Feb. 19, State of Frameworks speakers, including many of the best and brightest from the development world, gave us updates on all things frameworks.
Michael Dawson, a Node.js Technical Steering Committee co-chair, Node collaborator, and Community Committee member who works with a number of working groups on Node and on teams in IBM as well, shared his thoughts on what’s coming up at Node.js.
Michael Dawson — TSC Co-Chair, Node.JS — @mhdawson1
Upcoming releases
Node.js follows a regular release cadence meaning there will be some major transitions in April 2019. These will include the following changes.
Node 6.X
6.X is going EOL in April. If you’re not already moved over to 6.X, make sure to do so immediately.
Active LTS releases
Node 8.X, an active LTS release, has been in service for a while. We had to shift from the active to maintenance phase in order to line up with the end of life of OpenSSL 1.0.2. This means changes pulled into 8.x will now focus on only critical fixes and security fixes.
Node 10.X features significant performance improvements and a new version of npm. It also boasts new features like http/2.
Meanwhile, Node 12.X, will release in April, then transition to the next LTS in October.
Finally, the current release is Node 11.X. It has a newer version of V8 and also has workers without a flag, still in its experimental phase. 11.X also features report functionality to help with diagnostic processes.
Key new features in 10.X
Node 10.X has a number of notable new features that improve performance and user experience.
Node 10.X includes N-API, which greatly simplifies and streamlines Node development and deployment. This is a standard API that you can use to build native add-ons. This will be available in all the LTS releases and is already stable in both 8.X and 10.X. In April, it will be stable in all the releases.
Node 10.X also features http/2, which allows for request/response multiplexing, efficient compression, and server push.
Additionally, 10.X has open SSL 1.1.0, while open SSL 1.1.1 has opened in master. TLS 1.3 introduces some wrinkles, however, so it’s not guaranteed. Developers are still working on it in hopes that they can smooth out those issues in the future.
Features in progress
Some of the features currently in progress for Node include Workers, which is experimental in Core.
Node Report is a diagnostic feature that used to be available as a native module, but posed a number of challenges in that it required compilers. To solve this issue, it has been integrated into the core of Node.js..
ES6 Modules are also being continuously developed. Node engineers want to provide an implementation that balances keeping implementations and existing users happy while providing something as ES6-compatible as possible.
Core promises APIs are still in the experimentation phase. A few APIs return promises, but developers are still looking at what these might look like in the future and how they can be best implemented.
Finally, async hooks are also in the works for Node. These are diagnostic features you can use to keep track of what’s going on asynchronously, and they’re also still in the experimental phase.
More on Workers
Node’s Workers are based on Web Workers, though the differences between them aren’t yet called out in the documentation but we are working on that
No flag is yet needed in 11.7 or later for Workers, but it’s still experimental. But this is more of a reflection that the API hasn’t changed much for a while.
In Workers, each thread is a separate JS execution environment. You can exchange data between those environments through messaging. You’ll get object cloning by default. You can also do handoff, where the object is transferred from a main thread to, for example, a Worker thread. In those cases you can only access the object from one thread or the other, but not both at the same time.
Memory sharing, in which you pass SharedArrayBuffers and manage concurrency through Atomics, is also now possible.
Despite the usefulness of this feature, there are a few limitations. You can’t transfer handles yet, for example. And there’s still overhead to starting Worker threads, so re-use and pooling are still recommended at this time.
Report
Node developers have been working tirelessly to improve the diagnostic process. A diagnostic Report feature, still in experimental form, is now integrated into Node Core.
This report will give you important information about your environment. It’s in a lightweight, easy-to-read format and serves as a great first step in your diagnostic process.
Look for more developments on Report in upcoming releases of Node.
Other initiatives
Node isn’t all about features. The community is also actively working to improve many other aspects of the user experience and to troubleshoot problems.
For example, many Node modules are heavily depended on. But module maintainers may have moved on from the project or may not have time to maintain them. Sometimes there’s a mismatch between consumer demand and maintainers’ available time. The community is trying to come up with ways to solve this problem through Package Maintenance initiatives and groups.
Many other community groups, meetups, committees, and projects focus on deepening the Node safety net, growing involvement, and supporting end users through greater convenience and strong decision-making. Security, automation, and management are the name of the game when it comes to Node’s bright future.
Node.js Foundation and JS Foundation collaboration
In October, there was an initiative to bring the JS Foundation and the Node.js Foundation together. The Node.js Bootstrap Committee has been working on the documentation to make this a reality. If you have an interest in the combined foundation, read to find out more here! This announcement of the merger was made just recently.