forked from nodejs/node-v0.x-archive
-
Notifications
You must be signed in to change notification settings - Fork 0
API changes between v0.4 and v0.6
koichik edited this page Oct 13, 2011
·
83 revisions
When editing this page please be as detailed as possible. Examples are encouraged!
- The
customFdsoption to thechild_process.spawnmethod is deprecated. Only the values -1, 0, 1, 2 will work withcustomFdsnow and only if those are TTY file descriptors. You can however use thestdinStream,stdoutStream, andstderrStreamoptions to achieve similar functionality. - You can no longer send a file descriptor through a unix pipe. Instead you can send a handle via
child_process.fork. - The
'unix_dgram'type to thedgram.createSocket()is no longer supported. -
fs.symlinktakes an optionalmodeargument, which can either be 'dir' or 'file'. The default is 'file'. This argument is only needed for Windows (it's ignored on other platforms). -
http.Agent.appendMessagewas removed. -
https.request()andhttps.get()with defaultAgentcannot acceptkey,certandcaoptions. Use customAgent. -
net.Server.listenFD()is no longer supported. - The
require.pathshave been removed (useNODE_PATHenvironment variable instead). - C++
node::EventEmitterhas been removed. Instead usenode::MakeCallback() -
EventEmitter.removeAllListeners()allows to remove all listeners at once. -
process.ENVwas removed. Useprocess.envinstead. -
process.ARGVwas removed. Useprocess.argvinstead. -
process.binding('stdio')was removed. This was a private API. You shouldn't have been using it in the first place.
-
assert(val)as a shorthand forassert.ok(val) -
Buffersupports'hex'encoding. Buffer.readInt8()/readInt16BE()/readInt16LE()/readInt32LE()/readInt32BE()Buffer.readUInt8()/readUInt16BE()/readUInt16LE()/rreadUInt32LE()/readUInt32BE()Buffer.readFloatBE()/readFloadLE()/readDoubleBE()/readDoubleLE()Buffer.writeInt8()/writeInt16BE()/writeInt16LE()/write32BE()/write32LE()Buffer.writeUInt8()/writeUInt16BE()/writeUInt16LE()/writeU32BE()/writeU32LE()Buffer.writeFloatBE()/writeFloatLE()/writeDoubleBE()/writeDoubleLE()- Typed Arrays
Buffer.fill()child_process.fork()-
crypto.createDiffieHellman(),crypto.pbkdf2(),crypto.randomBytes() -
fs.utimes()/utimesSync(),fs.futimes()/futimesSync() fs.watch- Module system supports
.jsonmodule. net.connect()-
net.Socket.remotePort,bytesRead,bytesWrite -
os.arch(),os.uptime(),os.getNetworkInterfaces() path.relative()-
process.arch,process.uptime() -
tls.Serversupports NPN (Next Protocol Negotitation) and SNI (Server Name Indication). util.format()-
zlibmodule http://nodejs.org/docs/v0.5.9/api/zlib.html