6.0.0
See also: https://github.com/socketio/socket.io-redis#compatibility-table
Features
- add support for Socket.IO v3 (d9bcb19)
BREAKING CHANGES:
- all the requests (for inter-node communication) now return a Promise instead of accepting a callback
Before:
io.of('/').adapter.allRooms((err, rooms) => {
console.log(rooms); // an array containing all rooms (across every node)
});
After:
const rooms = await io.of('/').adapter.allRooms();
console.log(rooms); // a Set containing all rooms (across every node)
- RedisAdapter.clients() is renamed to RedisAdapter.sockets()
See socketio/socket.io-adapter@130f28a
- RedisAdapter.clientRooms() is removed
It has been replaced by the fetchSockets()
method in Socket.IO v4:
const sockets = await io.in(theSocketId).fetchSockets();
if (sockets.length) {
console.log(sockets[0].rooms);
}
- RedisAdapter.customHook() and RedisAdapter.customRequest() are removed
Those methods will be replaced by a more intuitive API in a future iteration.
- support for Node.js 8 is dropped
See https://github.com/nodejs/Release
Links
- Diff: 5.4.0...6.0.0