Node.js versioning : difference between v4+ and v0.12.X - node.js

What's the difference between Node.js version >= 4.0.0 and versions 0.1.X to 0.12.X ?
On this page https://nodejs.org/en/download/releases/, I understand that Node.js v4+ is a fusion between old Node.js and io.js. But v0.12.9 has been released on 2015-12-03, few months after v4.0.0 (2015-09-08).
So, are the 3 branches still active ? What's the difference between them ?

Nodejs 4.x is the converged version of Node 0.12.x and io.js 3.x. io.js was originally developed due to the conflict between Joyent and Nodejs team. Version 1.x was released in Jan 2015. You can see this changelog for the complete list of Nodejs releases.
Node.js team described when they announced this feature is that 2 different types of node.js versions will meet your node.js needs.
LTS (Long Term Support, currently v.4.2.4) will have support and maintenance for at least 18 months. After 18 months have passed, it will transition into Maintenance mode which may last 12 months. So Long Term Support (often referred to as LTS) guarantees application developers a 30 month support cycle with specific versions of Node.js.
Stable (currently v5.4.1) - will have support for approximately 8 months, with features/updates released more often. 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.
Node.js v0.10 and v0.12 are special cases in the LTS plan. v0.10 will go directly into maintenance in October, lasting for 12 months. v0.12 will have an initial LTS period of 6 months starting from October, followed by the requisite 12 months maintenance. io.js releases will not have official LTS or maintenance support.
Source:
https://nodejs.org/en/blog/release/v5.0.0/
https://nodejs.org/en/blog/community/node-v5/
https://medium.com/#nodesource/essential-steps-long-term-support-for-node-js-8ecf7514dbd#.48y0ywbsp
https://github.com/nodejs/node/blob/master/COLLABORATOR_GUIDE.md

Related

Effects if i don't update my Node.js

I haven't updated my Node for a very long time. My current version is v.6.12.3
Would there be any bugs if I don't update my Node?
Node 6 has long-term support state until April, 2019.
Node 6.12 is quite stable and has 99% support for ES6, it's acceptable to use it for development. It's recommended to update to latest Node 6 release for security and bug fixes, especially in production.
It's possible that some packages use features that aren't supported by Node 6 or mark it as unsupported in package.json engines, but in fact almost every third-party package still supports it.

How to update the OpenShift Online 3 platform to the latest version of Node.js?

At the age of OpenShift Online 2 there was an ability to update Node.js to the latest version. As far as I can see, this approach doesn't work anymore for the new OpenShift Online 3 version. Currently, OpenShift offers only outdated or LTS versions of Node.js, e.g. v.4 or v.6.
How can I update the OpenShift Online 3 platform to the latest/current version of Node.js?
Updated S2I images are available here:
https://hub.docker.com/r/bucharestgold/centos7-s2i-nodejs/
See this alternate S2I builder for Node.js.
https://github.com/ryanj/origin-s2i-nodejs
New versions are available here
Our team changed the name from bucharest-gold to nodeshift.
So you can find more updated versions in that new address.
Node.js versions:
10.15.1 -- 13 days ago
11.9.0 -- 13 days ago
11.8.0 -- 16 days ago

NodeJS Versioning Questions

Is there an explanation why NodeJS latest version is 6.2.1 but the LTS is 4.4.5? It might seem odd but shouldn't they stabilized version 5 first before working on or releasing version 6?
https://nodejs.org/en/
The reasoning behind this is that Node works to a 'LTS schedule':
New major version releases (i.e. the x in x.y.z) are created from the master branch every six months - even-numbered releases in April, odd-numbered releases in October.
Whenever a new odd-numbered release comes out, the previous even-numbered release moves into LTS, meaning there should be no breaking changes to that version from that point on.
The LTS version will be supported for 18 months, after which it will go into maintenance mode for 12 months, meaning it will only receive critical/security related updates. Because of this, there will never be more than two LTS versions active at the same time.
If it helps you visualize it, there's a diagram of the schedule on the Node LTS GitHub:
This allows there to be a predictable release schedule and migration path for those who have to support their Node infrastructure long-term, while keeping the pace of development moving for those who want to stay on the cutting-edge of new features. Bear in mind that under SemVer (the versioning scheme that Node uses), breaking changes are only allowed in major-version releases - having a regular schedule for these coming out ensures that these changes can be tested before they get added to an LTS version further down the line.
For more info, I recommend taking a look at the Node LTS GitHub - this is where I got all this information from, and it's a pretty helpful resource.

socket.io and pm2 : how does version number in node.js works?

when I run
node -v
I got 4.2.1 which is very strange since I remember I worked with 0.10 versions: I am totally lost with nodejs versions
reading the pm2 doc
Warning: If you want to use the embedded load balancer (cluster mode),
we recommend the use of node#0.12.0+ or node#0.11.16+. We do not
support node#0.10.*'s cluster module anymore.
I don't understand how node.js versions works: looks like we jumped form 0.10
to 4.2
Does pm2 works with latest version of node.js ?
regards
don't understand how node.js versions works: looks like we jumped form 0.10 to 4.2
When io.js and node.js merged, then node.js jump directly to 4.x series. This happened due to difference in versions of io.js (3.x series) and node.js (0.x series). So next common version was named 4.x series and this lead to some confusion. See this announcement.
Does pm2 works with latest version of node.js ?
You can give it a try yourself, but IMO it should work well.
At the end of 2014, node was forked into io.js for reasons I won't cover here.
The io.js project adopted the semver notation and, as the pace of changes was very fast (we got all the recent advances of ES6 that were already available in V8), came to version 3.
In september 2015, io.js was merged back into node, and it was decided to keep the semver versionning, and to go to version 4. More details here, including the LTS.
This makes it possible to deal with a monotonous version order, thus a 4.0 version of node is greater than a 0.11 version. But be wary, many changes were introduced and the ecosystem is big. You'll probably have changes to do when going from 0.x to a new version, especially if you use many modules.

Which version of Node.JS should I use?

The Node.JS website says the current version is 0.10.26, but the git repo has much newer versions going up to 0.11.12.
Is there something wrong with the later versions, are they unstable?
Why does the website say 0.10.26 is the current version?
From the Node.js wiki:
Odd versions are unstable, even versions are stable. v0.2 and v0.4 are even/stable. v0.3 and v0.5 are odd/unstable. The current stable series is v0.10.x. The next stable series will be v0.12.x. The stable branch takes bug fixes only - it does not change the JavaScript API, addon API, nor ABI (you don't have to rebuild modules after upgrading node with-in a stable branch).
You should use stable versions for production. The web site displays prominently and gives links to download the latest stable verson.
However, if you are trying to stay ahead of the curve and prepare for the next and yet unreleased stable version, then testing against an unstable version makes sense. This is why the unstable versions are also available to developers.

Resources