State of Node.js Core

Colin J. Ihrig / @cjihrig

LTS Schedule


*Chart generated using lts module on npm

Node.js Usage by Version

Node.js 8.0.0

  • Currently scheduled for release on April 25th, 2017
  • Likely to be codenamed "Carbon" once LTS
  • WebAssembly enabled by default
  • First LTS line with native async/await
  • During lifetime V8 version may vary from 5.7 to 6.0
  • Current EOL scheduled for December 31st, 2019

Improved Language Support

  • Node 8 will support roughly all of ES 2015 and 2016
  • ES modules are notably not supported
  • Luckily Node has almost half a million modules on npm
  • Exercise caution using new language features in performance critical code

Improved Documentation

  • Documentation is constantly being improved!
  • Improved code samples, descriptions, and data type specifications
  • Individual entries now have their own changelogs

Improved Testing

  • Over 1,400 tests run on CI on every commit
  • JavaScript and C++ coverage now tracked
  • Most releases are now docs and tests improvements

Safer Buffers

  • Remote memory disclosure in ws module in January 2016
  • new Buffer(1000) vs. new Buffer('1000')
  • Introduced Buffer.from(), Buffer.alloc(), and Buffer.allocUnsafe()
  • Node 6.0.0 tried to deprecate new Buffer()
  • Node 8.0.0 will zero fill by default

V8 Inspector

  • DevTools integrated with Node.js out of the box
  • Shipped in Node 6 as experimental feature
  • Node.js V8 Inspector Chrome extension

Removal of Old CLI Debugger

  • Refers to --debug debugger
  • Legacy debugger protocol removed in V8 5.8
  • node-inspect now bundled with Node as replacement
  • Usage: node debug script.js

VM Neutrality

  • Node historically only runs on V8
  • Should Node support other runtimes?
  • There are many other JavaScript runtimes
  • Constrained environments may prefer non-V8
  • What does it mean to "be Node"?

Node on Chakra

  • ChakraCore powers MS Edge's JavaScript engine
  • nodejs/node-chakracore is Node on ChakraCore
  • Relies on a shim layer mapping V8 APIs to Chakra
  • Not an officially supported version of Node

Node.js API (N-API)


  • Provides ABI stability across:
    • Node versions
    • Underlying VMs
  • Expected performance hit of 0-10%
  • Experimental feature in Node 8
  • N-API Demo from NINA 2016

Misc. Breaking Changes

  • Improved validation and errors
  • OutgoingMessage.prototype._headers has been deprecated
  • The REPL's magic mode has been deprecated
  • util.inspect() shows Symbols, and other small changes


Full Changelog

Improved Performance


Check out Six Speed

Improved Performance

Tracking V8

  • V8 moves very fast. Six week releases
  • Chrome is evergreen. Old versions are abandoned
  • Node is NOT evergreen
  • Must be considered when planning Node's LTS

A New Compiler Pipeline

  • V8 5.9 will turn on Ignition + TurboFan by default.
  • No more optimization killers!
  • try-catch-finally and async functions fully optimizable
  • Code optimized for Crankshaft will need to be revisited

LTS Options

  • Business as usual
  • Modified V8 5.8 ABI with path to 5.9
  • Delay release. V8 5.8 with path to 6.0

Check These Out on GitHub...

Upcoming Events

The End


Reach out: @cjihrig