cross-tab-worker-databus 0.20.30 → 0.20.32

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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,22 @@
2
2
 
3
3
  本项目遵循 [Semantic Versioning](https://semver.org/);变更记录格式参考 [Keep a Changelog](https://keepachangelog.com/)。
4
4
 
5
+ ## [0.20.32] - 2026-09-04
6
+
7
+ ### Added
8
+
9
+ - Added a replay/dedup combination regression covering hydrated history, live delivery after recovery, duplicate suppression, persistence append boundaries, and late-handler replay ordering.
10
+
11
+ ## [0.20.31] - 2026-09-04
12
+
13
+ ### Fixed
14
+
15
+ - WebSocket transport now isolates stale socket lifecycle and message callbacks after stop/start replacement, preventing late frames from an old connection entering a new session.
16
+
17
+ ### Added
18
+
19
+ - Added regression coverage for stale-socket isolation during transport replacement.
20
+
5
21
  ## [0.20.30] - 2026-09-04
6
22
 
7
23
  ### Added
@@ -2331,15 +2331,20 @@ var WebSocketTransport = class {
2331
2331
  return;
2332
2332
  }
2333
2333
  socket.onopen = () => {
2334
+ if (this.socket !== socket || this.handlers !== handlers) return;
2334
2335
  for (const topic of this.subscribedTopics) {
2335
2336
  this.sendFrame({ op: "subscribe", topic });
2336
2337
  }
2337
2338
  handlers.onStatus("connected");
2338
2339
  };
2339
- socket.onclose = () => handlers.onStatus("disconnected");
2340
- socket.onerror = () => handlers.onStatus("error");
2340
+ socket.onclose = () => {
2341
+ if (this.socket === socket && this.handlers === handlers) handlers.onStatus("disconnected");
2342
+ };
2343
+ socket.onerror = () => {
2344
+ if (this.socket === socket && this.handlers === handlers) handlers.onStatus("error");
2345
+ };
2341
2346
  socket.onmessage = (event) => {
2342
- void this.handleMessage(event.data);
2347
+ if (this.socket === socket && this.handlers === handlers) void this.handleMessage(event.data);
2343
2348
  };
2344
2349
  this.socket = socket;
2345
2350
  }