This release will become the new LTS later in 2016.
The following significant changes have been made since the
previous Node.js v5.0.0 release.
Buffer
- New Buffer constructors have been added #4682 and #5833.
- Existing Buffer() and SlowBuffer() constructors have been
deprecated in docs #4682 and #5833.
- Previously deprecated Buffer APIs are removed #5048, #4594.
- Improved error handling #4514.
- The Buffer.prototype.lastIndexOf() method has been added #4846.
Cluster
- Worker emitted as first argument in 'message' event #5361.
- The worker.exitedAfterDisconnect property replaces
worker.suicide #3743.
Console
- Calling console.timeEnd() with an unknown label now emits a
process warning rather than throwing #5901.
Crypto
- Improved error handling #3100, #5611.
- Simplified Certificate class bindings #5382.
- Improved control over FIPS mode #5181.
- pbkdf2 digest overloading is deprecated #4047.
Dependencies
- Reintroduce shared c-ares build support #5775.
- V8 updated to 5.0.71.35 #6372.
DNS
- Add dns.resolvePtr() API to query plain DNS PTR records #4921.
Domains
- Clear stack when no error handler #4659.
Events
- The EventEmitter.prototype._events object no longer inherits
from Object.prototype #6092.
- The EventEmitter.prototype.prependListener() and
EventEmitter.prototype.prependOnceListener() methods have been
added #6032.
File System
- The fs.realpath() and fs.realpathSync() methods have been
updated to use a more efficient libuv-based implementation. This
change includes the removal of the cache argument and the method
can throw new errors #3594.
- FS apis can now accept and return paths as Buffers #5616.
- Error handling and type checking improvements #5616, #5590,
#4518, #3917.
- fs.read's string interface is deprecated #4525.
HTTP
- 'clientError' can now be used to return custom errors from an
HTTP server #4557.
Move most logic into Makefile.common that will be shared
by the LTS lang/nodejs4 package.
Notable Changes in 5.0.0:
* buffer: (Breaking) Removed both 'raw' and 'raws' encoding types
from Buffer, these have been deprecated for a long time
* console: (Breaking) Values reported by console.time() now have
3 decimals of accuracy added
* fs:
- fs.readFile*(), fs.writeFile*(), and fs.appendFile*() now also
accept a file descriptor as their first argument
- (Breaking) In fs.readFile(), if an encoding is specified and
the internal toString() fails the error is no longer thrown but is
passed to the callback
- (Breaking) In fs.read() (using the fs.read(fd, length, position,
encoding, callback) form), if the internal toString() fails the
error is no longer thrown but is passed to the callback
* http:
- Fixed a bug where pipelined http requests would stall
- (Breaking) When parsing HTTP, don't add duplicates of the
following headers: Retry-After, ETag, Last-Modified, Server, Age,
Expires.
- (Breaking) The callback argument to OutgoingMessage#setTimeout()
must be a function or a TypeError is thrown
- (Breaking) HTTP methods and header names must now conform to
the RFC 2616 "token" rule, a list of allowed characters that
excludes control characters and a number of separator characters.
* node:
- (Breaking) Deprecated the _linklist module
- (Breaking) Removed require.paths and require.registerExtension(),
both had been previously set to throw Error when accessed
* npm: Upgraded to version 3.3.6 from 2.14.7
* src: (Breaking) Bumped NODE_MODULE_VERSION to 47 from 46
* timers: Attempt to reuse the timer handle for setTimeout().unref().
* tls:
- Added ALPN Support
- TLS options can now be passed in an object to createSecurePair()
- (Breaking) The default minimum DH key size for tls.connect() is
now 1024 bits and a warning is shown when DH key size is less
than 2048 bits.
* util:
- (Breaking) util.p() was deprecated for years, and has now been
removed
- (Breaking) util.inherits() can now work with ES6 classes.
* v8: (Breaking) Upgraded to 4.6.85.25 from 4.5.103.35
- Implements the spread operator
- Implements new.target
* zlib: Decompression now throws on truncated input (e.g. unexpected
end of file)
See full release notes with more information at:
https://nodejs.org/en/blog/release/v5.0.0/