Node.js v0.8 指日可待

Node.js v0.8 指日可待Node.js v0.8 指日可待

Node.js v0.8 版本指日可待了,0.7 版本再经过1个或者2个版本发布就转为稳定版了。

NodeJS v0.6Node.js v0.8 在 API 上有一些小变化。

废弃: http.Client() path.{exists,existsSync} was moved to fs.{exists,existsSync} tty.setRawMode(mode) was moved to tty.ReadStream#setRawMode() (i.e. process.stdin.setRawMode()) 删除: waf build system - node.js will be using gyp now * If you are a native module author, migrate to node-gyp ASAP! sys throws 改动:

process * process.stdin.on('keypress') will not be emitted by default, as it’s an internal API.

cluster

cluster.fork() no longer return a child_process.fork() object use cluster.fork().process to get the object. the 'death' event on the cluster object is renamed to 'exit'. the kill() method is renamed to destroy(). the CLUSTER_WORKER_ID env is now called CLUSTER_UNIQUE_ID, but you should not have used that anyway. workers do now kill them self when they accidentally losses there connection with the master.

http

http.Server emits 'connect' event instead of 'upgrade' when the CONNECT method is requested. http.ServerResponse sends Date: header by default. You can disable it by setting response.sendDate to false. http.ClientRequest emits 'connect' event instead of 'request' when the CONNECT method is responded.

child_process

arguments and options arguments of child_process.fork() became an option. the ‘exit’ event is now emitted right after the child process exits. It no longer waits for all stdio pipes to be closed. the ‘close’ event was added that has is emitted after the child has exited and all the stdio pipes are closed.

readline * arguments of rl.createInterface became an option as rl.createInterface(options) but still took an old style as rl.createInterface(input, output, completer)

url * url.parse() now parses IPv6 addresses.

fs * path.exists() and path.existsSync() has moved to fs.exists() and fs.existsSync().

console * console.timeEnd now throws when there’s no such label

添加:

buffer * 'utf16le' encoding.

child_process

silent option to child_process.fork() - stdout and stderr won’t be shared with parent. .disconnect() when using child_process.fork() this will allow the child to die graceful.

cluster

'fork', 'online', 'listening', and 'setup' events. Worker object which is provided from cluster.workers (in the master) or cluster.worker (in the worker). env optional argument to cluster.fork(). cluster.setupMaster() and cluster.settings. cluster.disconnect() and worker.disconnect(). worker.uniqueID what there before was internally known as workerID. worker.suicide flag set when worker disconnect or die, indicate if this was an accidental death.

crypto

crypto.getDiffieHellman(). cipher.setAutoPadding() and decipher.setAutoPadding(). ciphers option to crypto.createCredentials().

domain * see

fs

fs.appendFile() and fs.appendFileSync(). wx, wx+, ax, and ax+ modes to fs.open() and fs.openSync().

http

callback optional argument to server.close(). sendDate property to http.ServerResponse.

https * ciphers, rejectUnauthorized option to https.request() and https.get().

net

net.connect(options, [connectionListener). callback optional argument to server.close().

process

process.abort(). process.hrtime(), hi-res timer with up to nanosecond granularity.

querystring * querystring.parse(str, [sep], [eq], [options]).

stream * 'utf16le' and 'ucs2' encoding to setEncoding().

tls

tls.CLIENT_RENEG_LIMIT and tls.CLIENT_RENEG_WINDOW to tls.connect(options, [secureConnectionListener]). ciphers, rejectUnauthorized and socket options to tls.connect(). cleartextStream.getCipher() was added in the api doc and open to the public.

zlib * dictionary option.

更多关于Node.js的详细信息,或者下载地址请点这里

网站免责声明 本网站所提供的信息,只供参考之用。 本网站及其雇员一概毋须以任何方式就任何信息传递或传送的失误、不准确或错误对用户或任何其他人士负任何直接或间接的责任。 本网站在此声明,不承担用户或任何人士就使用或未能使用本网站所提供的信息或任何链接或项目所引致的任何直接、间接、附带、从属、特殊、惩罚性或惩戒性的损害赔偿(包括但不限于收益、预期利润的损失或失去的业务、未实现预期的节省)。 本网站所提供的信息,若在任何司法管辖地区供任何人士使用或分发给任何人士时会违反该司法管辖地区的法律或条例的规定或会导致本网站或其第三方代理人受限于该司法管辖地区内的任何监管规定时,则该等信息不宜在该司法管辖地区供该等任何人士使用或分发给该等任何人士。用户须自行保证不会受限于任何限制或禁止用户使用或分发本网站所提供信息的当地的规定。 本网站图片,文字之类版权申明,因为网站可以由注册用户自行上传图片或文字,本网站无法鉴别所上传图片或文字的知识版权,如果侵犯,请及时通知我们,本网站将在第一时间及时删除。 凡以任何方式登陆本网站或直接、间接使用本网站资料者,视为自愿接受本网站声明的约束。联系QQ515827934