Welcome to this week’s wrap up of the week in Node and libuv covering August 28 through September 3. 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
stream: Pass ‘buffer’ encoding to decoded writables
Isaac fixed bug #6119 in a3da3e where the original encoding was reported to stream callbacks even after the input had been converted from string to a buffer. It could be argued that this is really not a bug, but more a potential (if minor) source of confusion.
You can view the complete Nodev0.10 commit history on GitHub.
Node master branch highlights
uv: upgrade to v0.11.13
The bundled libuv has been upgraded to v0.11.13. There have been a number of API changes so authors of native add-ons may need to update their code.
stream: change default hwm for objectMode to 16
vm: use MakeWeak to fix leaking contexts
crypto: make randomBytes/pbkdf2 cbs domain aware
Ben committed 29d3624 so that the crypto.randomBytes() and crypto.pbkdf2() functions now play nice with domains. This commit fixes #3965 which is pretty old bug, over a year since it was originally reported.
timer_wrap: Timer.now always update loop time
TJ Fontaine fixed a bug in 93b0624 where timers sometimes fired too early. This is a great example of how software engineering is all about tradeoffs: the fix makes Node.js a little more correct, but also a little slower. Fortunately, the impact is mostly negligible.
vm: update API to use options argument
The vm module API changed a little in Domenic’s patch: fd36576. If you were using any undocumented options, now is a good time to update your code.
src: clean up CLI argument parser
Ben cleaned up the command line argument parser in 185c515. The main user-visible change is that options that are neither valid V8 or Node.js options are now reported and flagged as errors. Before, they were silently ignored.
process: Add internal _rawDebug() method
Isaac added a process._rawDebug() function in 906a175 that prints its arguments without going through the process.stdout or Writable machinery. Useful for last-resort printf()-style debugging.
You can view the complete Node master commit history on GitHub.
libuv v0.10 branch highlights
windows: make uv_shutdown() for write-only pipes work
You can view the complete libuv v0.10 commit history on GitHub.
libuv master branch highlights
unix: req queue must be empty when destroying loop
Ben updated uv_loop_delete() in 3f2d4d5 to check that there are no in-progress requests when the loop is destroyed. If you hit that assert after upgrading, you know what’s causing it.
darwin: remove CoreFoundation dependency
The ApplicationServices, CoreFoundation and CoreServices frameworks are no longer required dependencies on OS X. They’re loaded on demand at run-time now. This should make it easier for people that bundle libuv with their own projects to build/link on that platform. It also makes the output of `otool -L` nicer to look at. All this, courtesy of Ben in commit d48168a.
darwin: fix 10.6 build error in fsevents.c
No structs values, only pointer-based
Libuv no longer passes around structs as values, everything is pointer-based now. This is covered in Ben’s ommits 3fb6612, b7d027c, 8184076, daa229a, 255671d, 0f7b296, 525dbb5, 263da51 and 8c6ea10. This should make life easier for people that work with libuv through a foreign function interface. (It was requested separately by two people working on Common Lisp bindings.) Fixes #684.
unix: define _GNU_SOURCE, exposes glibc-isms
Ben fixed a Linux-only regression in f3f23b2 where some getaddrinfo() errors would hit an assert in src/uv-common.c.
build: include internal headers in source list
IPv6-specific versions of uv_* removed
Ben removed the IPv6-specific versions of uv_tcp_bind(), uv_tcp_connect(), uv_udp_bind() and uv_udp_send() in commits 5fceccc, 5c675c4, bcee403 and 08c6dde. Everything takes a pointer to a const struct sockaddr now. The maintainer of the Python bindings was pretty happy with this change!
You can view the complete libuv master commit history on GitHub.
- What’s in the upcoming Node v0.12 release? Six new features, plus new and breaking APIs.
- 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.
- Need for Node? Learn more about both the private and open options StrongLoop offers.