Welcome to this week’s wrap up of the week in Node and libuv covering July 25 through July 31. The purpose of this blog is to recap a subset of the non-documentation related commits to Node.js, plus give a little color and commentary to the ongoing development of Node.
Node v0.10 branch highlights
src: fix process.getuid() return value
Ben fixed a three year old bug in process.getuid() and process.getgid() in commit 015ec05. This bug fix was the reason for the rapid release of v0.10.15, it was breaking npm on OS X due to how certain user IDs are encoded on that platform. As Ben notes, many users install things as user ‘nobody’ which produces a UID of -2. Go figure. This fixes #5904.
crypto: fix assert() on malformed hex input
You can view the complete Nodev0.10 commit history on GitHub.
Node master branch highlights
cluster: fix shared handle bind error propagation
Ben fixed error reporting (notably EADDRINUSE errors) in 04f87de when using the cluster module with shared handles (where ‘shared’ means ‘master creates and binds the listen socket, then hands off a copy to the worker’.) Fixes bug #5774.
child_process: add ‘shell’ option to .exec()
src: don’t use NewExternal() with unaligned strings
Ben subsequently fixed an alignment issue in strings created with String::NewExternal() in 34b0a36. V8 v3.20.11 reverts the two-byte alignment requirement introduced in v3.20.9, but the V8 people will re-land that change eventually, so the fix is in for now.
dgram: report send errors to cb, don’t pass bytes
Ben changed the prototype of the dgram.send() callback in 6bd922f. You now receive an error object when something went wrong or null (if all went okay), which is more in line with the general Node.js convention. Before, Node told you the number of bytes it had sent which according to Ben is kind of pointless – UDP is atomic, either everything is sent or nothing, there are no partial writes.
string_bytes: export GetExternalParts
fs: write strings directly to disk
Trevor optimized writing of strings (as opposed to buffers) with fs.write() in 7ca77ea. It avoids a string-to-buffer conversion which should reduce memory consumption and CPU usage a little.
util: don’t throw on circular %j input to format()
Ben fixed a longstanding peeve of his in 2cd7adc where formatting JSON data with util.format(‘%j’) or console.log(‘%j’) threw an exception if the argument contains circular references.
You can view the complete Node master commit history on GitHub.
libuv v0.10 branch highlights
Check back next week!
You can view the complete libuv v0.10 commit history on GitHub.
libuv master branch highlights
build: enable AM_INIT_AUTOMAKE([subdir-objects])
Ben fixed the ton of warnings you got when building with automake 1.14 in c82cea1. Object files are now compiled in their respective sub-directories.
unix, windows: make buf arg to uv_fs_write const
Ben changed the prototype of uv_fs_write() in 0e7ba08. The
buf argument is now const, as $DEITY intended it to be.
sunos: fix build breakage introduced in e3a657c
Ben fixed the Solaris build in 167a817. There was some fallout from Brian’s MAC address patch from last week.
aix: fix build breakage introduced in 3ee4d3f
Ben quite possibly fixed the AIX build in 4bdb7d8. 🙂
You can view the complete libuv master commit history on GitHub.
- Ready to develop APIs in Node.js and get them connected to your data? Check out the Node.js LoopBack framework. We’ve made it easy to get started either locally or on your favorite cloud, with a simple npm install.