Node.js 5.0 released targeting front-end developers
Node.js 5.0 has recently made its debut, merely weeks after the 4.0 series officially landed. The drop has signalled the beginning of two different release lines, with one continuing to be connected to the Long Term Support Plan (LTS). The other, represented by the newly-arrived Node.js 5.0, will be called ‘Stable’.
Know your lines
The release lines are distinguishable via even and odd numbers, with the LTS stream focusing on stability and security. LTS lines are seen as suitable for organisations with “complex environments that find it cumbersome to continually upgrade”. The first of these releases recently shipped with Node.js 4.2 Argon.
For the Stable line, developers working in front-end environments are poised to see the majority of benefits, with a shorter lifespan slated for the stream on top of regular updates to the codebase. This translates to Node highlighting active development of necessary features and refinement of existing APIs within the new stream.
It isn’t necessary to upgrate to Node.js 5.0 if you find yourself working in a medium to large enterprise; taking on 5.0 has been recommended only if you’re able to upgrade quickly without disturbing your current development environment.
What’s in store for v5?
The Node.js 5.x series is going to run on a rapid release cycle and punters can expect a new release every 1-2 weeks. It’ll also feature significantly less support than the LTS stream – a maximum support timeframe of eight months has been scheduled. This means that the v4.x series will actually live longer than v5:
This new version of Node.js, however, will only be supported for 8 months, with a new major version, v6, being released in April 2016. Node.js v6 will eventually turn into a new LTS version that will have a similar support timeline to v4. In this way, we will have a new Stable version of Node.js every 6 months with every second one of these turning into an LTS line.
If you’re keen to try out a newer version of V8, then you’ll want to make the jump to Node.js 5.0. This will mean recompiling any native add-ons you have already installed. Rod Vagg has suggested using
npm rebuild or to simply remove your node_modules directory and
npm install from scratch.
Once a Stable release line becomes LTS, no new features or breaking changes will be added to that release. That being said, there’s a shedload of breaking changes for 5.0, including:
- Buffer: Both
'raws'encoding types from
Bufferhave been removed – these have been deprecated for a long time
- Console: Values reported by
console.time()now have 3 decimals of accuracy added
- HTTP: HTTP methods and header names must now conform to the RFC 2616 “token” rule, a list of allowed characters that excludes control characters and a number of separator characters
- Node: The
_linklistmodule has been deprecated
- V8: Upgraded to 126.96.36.199 from 188.8.131.52