Latest in branch 5.x
5.12.0
Released 23 Jun 2016
(9 years ago)
SoftwareNode.js
Version5.x
Status
End of life
Initial release5.0.0
29 Oct 2015
(10 years ago)
Latest release5.12.0
23 Jun 2016
(9 years ago)
End of bug fixes30 Jun 2016
(Ended 9 years, 10 months ago)
End of security fixes30 Jun 2016
(Ended 9 years, 10 months ago)
Release noteshttps://github.com/nodejs/node/releases/tag/v5.12.0
Source codehttps://github.com/nodejs/node/tree/v5.12.0
Documentationhttps://nodejs.org/dist/latest-v5.x/docs/api/
Downloadhttps://nodejs.org/download/release/latest-v5.x/
Node.js 5.x ReleasesView full list

What Is New in Node.js 5?

CategoryChange
New Featuresnpm 3 bundled (flat node_modules layout)
New FeaturesV8 4.6 -- spreading arguments in function calls
ImprovementsBuffer: Buffer.prototype.indexOf() added
Improvementsfs: fs.watch() reliability improvements
ImprovementsStrict mode for the REPL
Improvementsnet: allow host option to be an IP
SecurityOpenSSL 1.0.2d

npm 3 -- Flat Dependency Layout

Node.js 5 bundles npm 3, which changes the node_modules layout from a deeply nested tree to a flat structure. This resolves Windows path length limitations and reduces module duplication -- the same package version is hoisted to the root node_modules where possible.

The trade-off: npm 3 installs are slower due to the additional dedupe analysis step. npm 4 (Node.js 7) and npm 5 (Node.js 8) address speed progressively.

Spread in Function Calls via V8 4.6

V8 4.6 enables spread syntax in function calls. This replaces the verbose Function.prototype.apply() pattern for passing arrays as function arguments.

// Before spread
Math.max.apply(null, [1, 2, 3, 4]); // 4

// With spread (Node.js 5+)
Math.max(...[1, 2, 3, 4]); // 4

function logAll(...args) {
  args.forEach(a => console.log(a));
}
logAll('a', 'b', 'c');

Buffer.indexOf() for Binary Search

Buffer.prototype.indexOf() lets you search for a string, byte, or another Buffer within a Buffer without converting to a string first. Useful for parsing binary protocols where you need to find a delimiter sequence.

const buf = Buffer.from('Hello World');
buf.indexOf('World'); // 6
buf.indexOf(0x57);    // 6 (ASCII 'W')

FAQ

Is Node.js 5 an LTS release?
No. Node.js 5 is a Current release that reached end-of-life in June 2016. The concurrent LTS was Node.js 4.

Why is npm 3's flat layout important?
Windows has a maximum path length of 260 characters. The nested node_modules layout of npm 2 regularly exceeded this for deeply nested packages, causing failures on Windows that did not occur on macOS or Linux. The flat layout makes Node.js projects reliably cross-platform.

Is V8 4.6 a significant V8 version?
It starts implementing more ES6 features in stages. Spread in calls is one piece. Arrow functions, let/const, and template literals were already available in earlier versions. Full ES6 coverage completes across Node.js 6-8.

Does Buffer.indexOf() handle multi-byte search patterns?
Yes. You can search for a Buffer (e.g., a byte sequence Buffer.from([0xDE, 0xAD])) and it returns the first offset where the sequence begins.

What is the Node.js 5 REPL strict mode?
The REPL can be started with node --use_strict, which runs all REPL input in strict mode. Useful for catching silent errors (undeclared variables, duplicate parameters) during exploratory development.

Releases In Branch 5.x

VersionRelease datenpm version
5.12.023 Jun 2016
(9 years ago)
3.8.6
5.11.105 May 2016
(10 years ago)
3.8.6
5.11.021 Apr 2016
(10 years ago)
3.8.6
5.10.105 Apr 2016
(10 years ago)
3.8.3
5.10.001 Apr 2016
(10 years ago)
3.8.3
5.9.122 Mar 2016
(10 years ago)
3.7.3
5.9.016 Mar 2016
(10 years ago)
3.7.3
5.8.009 Mar 2016
(10 years ago)
3.7.3
5.7.102 Mar 2016
(10 years ago)
3.6.0
5.7.023 Feb 2016
(10 years ago)
3.6.0
5.6.009 Feb 2016
(10 years ago)
3.6.0
5.5.021 Jan 2016
(10 years ago)
3.3.12
5.4.112 Jan 2016
(10 years ago)
3.3.12
5.4.006 Jan 2016
(10 years ago)
3.3.12
5.3.015 Dec 2015
(10 years ago)
3.3.12
5.2.009 Dec 2015
(10 years ago)
3.3.12
5.1.103 Dec 2015
(10 years ago)
3.3.12
5.1.017 Nov 2015
(10 years ago)
3.3.12
5.0.029 Oct 2015
(10 years ago)
3.3.6