Skip to content

Latest commit

 

History

History
256 lines (132 loc) · 8.05 KB

CHANGELOG.md

File metadata and controls

256 lines (132 loc) · 8.05 KB

History

Release notes

8.0.1 (2023-01-11)

This release pins the socket.io-adapter package to version ~2.4.0 instead of ^2.4.0.

8.0.0 (2022-12-07)

Dependencies

Features

  • add option to allow usage of custom parser (#471) (73f6320)

Example with msgpackr:

import { unpack, pack } from "msgpackr";

io.adapter(createAdapter(pubClient, subClient, {
  parser: {
    encode(val) {
      return pack(val);
    },
    decode(val) {
      return unpack(val);
    }
  }
}));
  • remove deprecated methods (fb760d9)

BREAKING CHANGES

  • the remoteJoin(), remoteLeave(), remoteDisconnect() and sockets() methods are removed in favor of the official alternatives

Related: https://github.com/socketio/socket.io/commit/b25495c069031674da08e19aed68922c7c7a0e28

  • the format of Date objects is modified in a non backward-compatible way, as notepack.io now implements the MessagePack Timestamp extension type.

Reference: https://github.com/msgpack/msgpack/blob/master/spec.md#timestamp-extension-type

Previous versions of the adapter will not be able to parse the Date objects sent by newer versions.

7.2.0 (2022-05-03)

Bug Fixes

Features

  • broadcast and expect multiple acks (e4c40cc)

This feature was added in [email protected]:

io.timeout(1000).emit("some-event", (err, responses) => {
  // ...
});

Thanks to this change, it will now work with multiple Socket.IO servers.

7.1.0 (2021-11-29)

Features

  • add support for redis v4 (aa681b3)
  • do not emit "error" events anymore (8e5c84f)
  • send response to the requesting node only (f66de11)

7.0.1 (2021-11-15)

Bug Fixes

  • allow numeric rooms (214b5d1)
  • ignore sessionStore in the fetchSockets method (c5dce43)

7.0.0 (2021-05-11)

Features

  • implement the serverSideEmit functionality (3a0f29f)
  • remove direct redis dependency (c68a47c)
  • rename the package to @socket.io/redis-adapter (3cac178)

BREAKING CHANGES

  • the library will no longer create Redis clients on behalf of the user.

Before:

io.adapter(redisAdapter({ host: "localhost", port: 6379 }));

After:

const pubClient = createClient({ host: "localhost", port: 6379 });
const subClient = pubClient.duplicate();

io.adapter(redisAdapter(pubClient, subClient));

6.1.0 (2021-03-12)

Features

  • implement utility methods from Socket.IO v4 (468c3c8)

Performance Improvements

  • remove one round-trip for the requester (6c8d770)

6.0.1 (2020-11-14)

Bug Fixes

  • typings: properly expose the createAdapter method (0d2d69c)
  • fix broadcasting (#361) (3334d99)

6.0.0 (2020-11-12)

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 (accross 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 https://github.com/socketio/socket.io-adapter/commit/130f28a43c5aca924aa2c1a318422d21ba03cdac

  • 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

5.4.0 (2020-09-02)

Features

  • update node-redis version to 3.x (5b3ed58)

5.3.0 (2020-06-04)

Features

  • add support for Redis Cluster (7a19075)

5.2.0 (2017-08-24)

Features

  • increase default requestsTimeout to 5000 ms (37e28df)

5.1.0 (2017-06-04)

Bug Fixes

  • use the requestid from response when deleting requests (4f08b1a)

Features

  • add support for ArrayBuffer (b3ad4ad)