@socket.io/redis-streams-adapter 0.2.2 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/adapter.js +4 -4
  2. package/package.json +4 -3
package/dist/adapter.js CHANGED
@@ -178,10 +178,10 @@ class RedisStreamsAdapter extends socket_io_adapter_1.ClusterAdapterWithHeartbea
178
178
  for (const entry of entries) {
179
179
  if (entry.message.nsp === this.nsp.name && entry.message.type === "3") {
180
180
  const message = RedisStreamsAdapter.decode(entry.message);
181
- // @ts-ignore
182
- if (shouldIncludePacket(session.rooms, message.data.opts)) {
183
- // @ts-ignore
184
- session.missedPackets.push(message.data.packet.data);
181
+ const { packet, opts } = message.data;
182
+ if (shouldIncludePacket(session.rooms, opts)) {
183
+ packet.data.push(entry.id);
184
+ session.missedPackets.push(packet.data);
185
185
  }
186
186
  }
187
187
  offset = entry.id;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@socket.io/redis-streams-adapter",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "The Socket.IO adapter based on Redis Streams, allowing to broadcast events between several Socket.IO servers",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -17,11 +17,12 @@
17
17
  "format:check": "prettier --parser typescript --check \"lib/**/*.ts\" \"test/**/*.ts\"",
18
18
  "format:fix": "prettier --parser typescript --write \"lib/**/*.ts\" \"test/**/*.ts\"",
19
19
  "prepack": "npm run compile",
20
- "test": "npm run format:check && npm run compile && npm run test:redis-standalone && npm run test:redis-cluster && npm run test:ioredis-standalone && npm run test:ioredis-cluster",
20
+ "test": "npm run format:check && npm run compile && npm run test:redis-standalone && npm run test:redis-cluster && npm run test:ioredis-standalone && npm run test:ioredis-cluster && npm run test:valkey-standalone",
21
21
  "test:redis-standalone": "nyc mocha --require ts-node/register test/**/*.ts",
22
22
  "test:redis-cluster": "cross-env REDIS_CLUSTER=1 mocha --require ts-node/register test/**/*.ts",
23
23
  "test:ioredis-standalone": "cross-env REDIS_LIB=ioredis mocha --require ts-node/register test/**/*.ts",
24
- "test:ioredis-cluster": "cross-env REDIS_LIB=ioredis REDIS_CLUSTER=1 mocha --require ts-node/register test/**/*.ts"
24
+ "test:ioredis-cluster": "cross-env REDIS_LIB=ioredis REDIS_CLUSTER=1 mocha --require ts-node/register test/**/*.ts",
25
+ "test:valkey-standalone": "cross-env VALKEY=1 mocha --require ts-node/register test/**/*.ts"
25
26
  },
26
27
  "prettier": {
27
28
  "endOfLine": "auto"