cross-tab-worker-databus 0.21.1 → 0.21.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.21.3] - 2026-09-22
4
+
5
+ ### Changed
6
+ - Two more unreachable rejection-absorbers removed from `CrossTabDataBus`, with no behavior change: `queueStartAfterStop()` swallowed a rejection of `stopPromise` (whose only non-null assignment is `stop()`'s hand-resolved gate, resolved from both settle arms — that is what keeps the public `stop()` non-rejecting), and `openTransport()` swallowed one for its `before` argument (either `Promise.resolve()` or `pendingStop`, and every non-null `pendingStop` chain ends in a terminal `.catch(error => this.reportError(error))`). Each arm had been permanently uncovered; the premises are enumerations of assignment sites and are written into the source next to the code.
7
+ - Whole-repository coverage ceilings unchanged (96 / 92 / 96 / 97) and met; `src/core/data-bus.ts` function coverage goes 115/120 → 115/118 by deleting the two dead handlers, with no test removed or weakened. The module's remaining uncovered handlers are now three, each documented with the reason it is kept (`performStop()`'s last-resort rejection arm) or the enumeration that still owes a proof.
8
+ - No export, protocol or observable behavior changed; `verify:compat` is green against `v0.21.2` by construction.
9
+
10
+ ## [0.21.2] - 2026-09-22
11
+
12
+ ### Changed
13
+ - One unreachable defensive branch removed, with no behavior change: `performStop()` awaited its pending transport stop through `.catch(() => undefined)`, but that absorption could never run — `pendingStop` is assigned non-null in exactly two places (`openTransport`'s failure path via `createStopPromise()`, and `suspendTransport()`'s stop chained behind the in-flight open) and both chains already end in a terminal `.catch(error => this.reportError(error))` that resolves, so the failure is recorded where it is produced. The neighbouring `startPromise?.catch(() => undefined)` is kept, because that promise *does* reject: it holds the opening a failing `ready()` reports to its caller. Naming which kind of arm each one is is now written into the source and into `AGENTS.md`, since the difference decides whether deleting it is a cleanup or a regression.
14
+ - No public surface, no observable behavior and no protocol changed; `verify:compat` is green against `v0.21.1` by construction. Whole-suite coverage moves from 98.68 / 96.16 / 98.54 / 99.45 to 98.71 / 96.16 / 98.72 / 99.45 (one fewer uncovered function, no test deleted or weakened).
15
+
3
16
  ## [0.21.1] - 2026-09-22
4
17
 
5
18
  ### Added
@@ -8,7 +21,7 @@
8
21
  ### Changed
9
22
  - `e2e/adapters.spec.ts` now drives both example pages with one set of cases (fan-out, reactive rebind, delivery after the owning tab closes, and the cleared-topic-box fallback), because the two pages expose the same surface: `#topicInput`/`#publishButton`/`#messageList` ids, a `?topic=` override, and a `__vueBus`/`__reactBus` diagnostics hook. The React page gained those ids, the query override, a topic badge and the hook — it hand-wires the core API rather than importing `cross-tab-worker-databus/hooks`, so a failure that shows up for one page and not the other localizes to the adapter instead of to the library. All four cases pass against both pages, and the fallback leg was verified by mutation on each.
10
23
  - `docs/getting-started.md` (en + zh) records that both adapter pages are browser-covered and need no network.
11
- - One correction to the `0.21.0` entry above: it named the React adapter `cross-tab-worker-databus/react`, which is not an export this package has (`cross-tab-worker-databus/hooks` is). The published `0.21.0` release notes keep the original wording — npm versions and GitHub releases are not rewritten — so this fixes it for anyone reading between tags.
24
+ - One correction to the `0.21.0` entry below: it named the React adapter `cross-tab-worker-databus/react`, which is not an export this package has (`cross-tab-worker-databus/hooks` is). The published `0.21.0` release notes keep the original wording — npm versions and GitHub releases are not rewritten — so this fixes it for anyone reading between tags.
12
25
 
13
26
  ## [0.21.0] - 2026-09-22
14
27
 
@@ -5,7 +5,7 @@ import {
5
5
  parseDataBusPublication,
6
6
  publicationMetadata,
7
7
  selectWorkerBackend
8
- } from "./chunk-2E2FBACL.js";
8
+ } from "./chunk-CFFSSIUO.js";
9
9
  import {
10
10
  CENTRIFUGE_INPUT_TYPE,
11
11
  CENTRIFUGE_OUTPUT_TYPE,
@@ -2346,7 +2346,7 @@ var DedupManager = class {
2346
2346
  };
2347
2347
 
2348
2348
  // src/core/version.ts
2349
- var SDK_VERSION = true ? "0.21.1" : "";
2349
+ var SDK_VERSION = true ? "0.21.3" : "";
2350
2350
 
2351
2351
  // src/core/data-bus.ts
2352
2352
  var DEFAULT_REPLAY_MAX_PER_TOPIC = 100;
@@ -2655,7 +2655,7 @@ var CrossTabDataBus = class {
2655
2655
  if (this.queuedStart) return this.queuedStart;
2656
2656
  const stop = this.stopPromise ?? Promise.resolve();
2657
2657
  const token = ++this.queuedStartToken;
2658
- const queued = stop.catch(() => void 0).then(() => {
2658
+ const queued = stop.then(() => {
2659
2659
  if (this.queuedStart === queued) this.queuedStart = null;
2660
2660
  if (token <= this.canceledQueuedStartToken) return;
2661
2661
  return this.start(config);
@@ -2737,7 +2737,7 @@ var CrossTabDataBus = class {
2737
2737
  const chainedPendingStop = this.pendingStop;
2738
2738
  const isCurrentLifecycle = () => lifecycleEpoch === this.lifecycleEpoch;
2739
2739
  let startupInProgress = true;
2740
- return before.catch(() => void 0).then(() => {
2740
+ return before.then(() => {
2741
2741
  if (!isCurrentLifecycle() || this.stopping || this.suspended) return;
2742
2742
  if (this.pendingStop === chainedPendingStop) this.pendingStop = null;
2743
2743
  this.transportHasConnected = false;
@@ -3107,7 +3107,7 @@ var CrossTabDataBus = class {
3107
3107
  try {
3108
3108
  await this.startPromise?.catch(() => void 0);
3109
3109
  const pendingStop = this.pendingStop;
3110
- if (pendingStop) await pendingStop.catch(() => void 0);
3110
+ if (pendingStop) await pendingStop;
3111
3111
  else await this.transport.stop();
3112
3112
  } catch (error) {
3113
3113
  this.reportError(error);
@@ -3547,4 +3547,4 @@ export {
3547
3547
  parseDataBusPublication,
3548
3548
  selectWorkerBackend
3549
3549
  };
3550
- //# sourceMappingURL=chunk-2E2FBACL.js.map
3550
+ //# sourceMappingURL=chunk-CFFSSIUO.js.map