Announcement of node 0.4 - second stable branch
- Transfer
Wiki page detailing API changes between 0.2.x and 0.4.x branches .
Important changes compared to 0.2.x:
Important changes compared to 0.2.x:
- Full rewrite of the TLS / SSL system. Previously, binding to OpenSSL was deeply intertwined with socket code. This binding has been redesigned to instead represent each connection as a pair of “streams”: a duplex encrypted stream and a duplex plain text stream. An encrypted stream communicates with a simple TCP socket using the generic Stream.prototype.pipe () method. The functionality has been expanded and the API simplified;
- Facilitated allocation of buffers. Node uses Buffer objects in many places - and it was noticeable that they were relatively slowly instantiated, and it was hard to collect during garbage collection. The implementation has been modified to use pure JavaScript objects instead of ObjectWrap, which increased performance;
- Having already had sufficient experience for today, we made some modifications to the module loading system to better support package managers. In particular, we forced NPM to re-sort symlinks of large nesting and add a “pad” for the modules to circumvent the restrictions in require (). Major changes:
- require () calls realpath. Consequently, symbolic links are allowed. This allows symlink modules to execute relative require;
- require () now has a primitive understanding of package.json. He is looking for the main script. This allows require () to work directly with package directories;
- A specially named directory, node_modules /, is looked up to the current directory to load any modules. This will delight developers who like to put packages in applications, instead of depending on the global namespace.
Read more about these features in the module system documentation . - A half-finished, but not bad start to build a native Windows build using MinGW was made by Ber Bilder. Assembly instructions can be found on the Wiki ;
- Node has been updated to the latest version of V8, v3.1.2. This includes a lot of work, for example, the new V8 compilation infrastructure and the GDB plugin for Linux. Read the full list of V8 changes ;
- A new built-in client for the V8 debugger has been added to Node. It is still very primitive, but useful for simple tasks. Here's a small introductory video and some documentation ;
- The os module was added by Brian White, which provides a lot of basic but useful information about the system
os.cpus(), os.freemem(), os.totalmem(), os.loadavg():; - And of course, many bug fixes. Read the full list of changes .