The Nodesource Blog

#shoptalk Subscribe

Converging on Node.js v4

In his recent blog, Node.js Technical Steering Committee member Jeremiah Senkpiel called Node.js v4 “Node at its best” and the “most stable Node ever”. This is the result of a huge amount of effort from the Node community and its many contributors. Let me extend my hearty congratulations to the entire Node.js community and all of the members of the recently formed Node.js Foundation.

Node.js v4 is the first release from the newly formed Node.js Foundation, which brings the innovations and code bases of the Node.js and the io.js projects together. It isn’t difficult to predict that v4 will quickly become the standard for enterprise Node shops. Still, it is a major platform upgrade which is always a non-trivial concern for developers, DevOps and operations teams. We know the key to a successful upgrade is good planning and taking advantage of the tools and resources available, like our Upgrade (Self and Full) Services.

Why Upgrade?

Newly implemented and more rigorous release processes ensure the releases will produce API-stable fixes, less code breakage, increased system uptime, and more predictable resource utilization. The more predictable release cadence and a commitment to a true LTS model will make enterprise support more predictable and defined.

With the release of Node.js v4 we see a stronger focus on security best practices. By establishing processes for responding to security vulnerabilities, Node.js v4 is the most secure version for running your Node applications.

Upgrade in 5 Easy Steps

Here are the main steps we’ve identified to help you with your upgrade to v4:

  1. Download Node.js v4 from nodejs.org. Duh.
  2. Review the API changes to see what has changed from your current version of Node to Node.js v4. We have links to the documented changes on our upgrade page.
  3. Upgrade your private modules to support the API changes. NodeSource has developed an upgrade module, upgrade-utils, that will report on API calls in your JavaScript code that are impacted by changes and provide a references to the specific documentation for the new API to make it easy for you to upgrade your code. upgrade-utils can also take an initial pass at upgrading your native modules from NAN v1.0 to NAN v2.0. (Note: If you are not already using NAN for your native Node modules, you should be. It is an abstraction layer that shields you from changes in V8.)
  4. Check public modules to see if any of the public modules your code depends on have been upgraded and built on Node.js v4. NodeSource has also developed an upgrade-ready module that can identify all of your dependencies and generate a report of the current status of each module.
  5. Run your regression tests to confirm that your application is working correctly after your upgrade and changes. If you are not already, you should be using code coverage tools - such as istanbul - to ensure you are testing all of your JavaScript code with your regression suite.

Just Do It!

Let me reiterate that upgrading is probably a lot easier than you might expect. Some of our customers have upgraded in just a couple days. It is a great opportunity to board the Node.js LTS train with lots of fellow passengers.

We’ve created some convenient tools, documents, and instructions to help your upgrade go smoothly and quickly. To take advantage of these tools, check out our Self-Service Upgrade Guide. If you’d like some professional help with your upgrade process, NodeSource offers an upgrade service to help you achieve your goals.

Good luck in the brave new world of Node.js v4.