Skip to content

src: add process.versions.iojs

This gives user code a forward-compatible means for determining whether it's running in io.js or Node.js. Also, to ensure backwards compatibility, it leaves the existing process.versions.node alone.

This will be helpful for tools like node-gyp to figure out whether they're running against Node.js or io.js. See TooTallNate/node-gyp#564 for a discussion of how this might be useful.

Everything's basically the same except:

// % ./out/Release/iojs -p process.versions
{ http_parser: '2.4',
  node: '1.0.3',        // <-- not removed
  iojs: '1.0.3',        // <-- added
  v8: '3.31.74.1',
  uv: '1.2.1',
  zlib: '1.2.8',
  ares: '1.10.0-DEV',
  modules: '42',
  openssl: '1.0.1k' }

PR: @rvagg PR: @bnoordhuis

Merge request reports

Loading