All about Node 6

https://github.com/evanlucas

https://twitter.com/evanhlucas

About

  • Node.js Engineer at Help.com
  • Node.js Core Technical Committee (CTC) Member
  • Node.js Release Team Member

ES2015

  • Default Parameters
  • Rest Parameters
  • Destructuring

Note: Most of these examples were taken from http://node.green

function test(ab = '1') {
  console.log(a, b)
}
 
test(1, 2) // '1 2' 
test(2)    // '2 1' 
function test(a, ...args) {
  console.log(a, args)
}
 
test(1, 2, 3, 4, 5) // '1 [ 2, 3, 4, 5 ]' 
const { c, x:} = { c: 6, d: 8 }
 
console.log(c) // 6 
console.log(d) // 8 
  • buffer: Deprecated new Buffer() in favor of Buffer.from(), Buffer.alloc() and Buffer.allocUnsafe()
  • cluster: Worker#suicide has been deprecated in favor of the more descriptive Worker#exitedAfterDisconnect
  • freelist: Has been removed (Intended to be internal only)
  • path: All methods now throw if the provided input is not a string
  • process: process.EventEmitter is now deprecated and will be removed in v7
  • querystring: The object returned from querystring.parse() no longer inherits from Object.prototype
  • url: url.resolve() now drops auth info if host changes

Full list: https://github.com/nodejs/node/wiki/Breaking-changes-between-v5-and-v6

LTS Status Release LTS Start Maintenance Start LTS End
Maintenance v0.10 - 2015-10-01 2016-10-01
Maintenance v0.12 - 2016-04-01 2016-12-31
Active v4 2015-10-01 2017-04-01 2018-04-01
N/A v5 N/A
Pending v6 2016-10-01 2018-04-01 2019-04-01
  • v5 -> v6
  • v4
  • v0.10 -> v4|v6
  • v0.12 -> v4|v6
  • Missing or truncated error message #6867
    • In some cases, if an error is thrown, it is possible for part of the message to not make it to the console.
  • stdio buffered writes (chunked) issues & process.exit() truncation #6456
    • Explicitly calling process.exit() can prevent stdout/stderr from being flushed.

Help.com is hiring!

Check out our available jobs