@zerotal/flow 1.6.3 → 1.7.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zerotal/flow",
3
- "version": "1.6.3",
3
+ "version": "1.7.2",
4
4
  "license": "MIT",
5
5
  "maturity": "stable",
6
6
  "private": false,
@@ -18,6 +18,7 @@
18
18
  },
19
19
  "files": [
20
20
  "CHANGELOG.md",
21
+ "api-surface.md",
21
22
  "src",
22
23
  "!src/**/*.test.ts",
23
24
  "!src/**/*.test.tsx",
@@ -46,14 +47,15 @@
46
47
  "@alpinejs/morph": "^3.14.9",
47
48
  "@alpinejs/persist": "^3.14.9",
48
49
  "@alpinejs/resize": "^3.14.9",
49
- "@zerotal/core": "1.6.3",
50
- "@zerotal/orm": "1.6.3",
51
- "@zerotal/validator": "1.6.3",
50
+ "@zerotal/client": "1.7.2",
51
+ "@zerotal/core": "1.7.2",
52
+ "@zerotal/orm": "1.7.2",
53
+ "@zerotal/validator": "1.7.2",
52
54
  "alpinejs": "^3.14.9",
53
55
  "typescript": "^5.8.0"
54
56
  },
55
57
  "devDependencies": {
56
- "@zerotal/broadcasting": "1.6.3",
58
+ "@zerotal/broadcasting": "1.7.2",
57
59
  "@types/alpinejs": "^3.13.10",
58
60
  "@types/alpinejs__anchor": "^3.13.1",
59
61
  "@types/alpinejs__collapse": "^3.13.4",
package/src/Component.ts CHANGED
@@ -493,8 +493,19 @@ export abstract class Component {
493
493
 
494
494
  // ── @internal: framework bookkeeping, not part of the developer API ──────────
495
495
 
496
- /** Set to true by hydrate() so the framework skips calling onMount(). @internal */
497
- _skipMount = false;
496
+ // `_skipMount` used to live here, declared as "set to true by hydrate() so the
497
+ // framework skips calling onMount()". Nothing ever read it. Mount-skipping is
498
+ // structural and always has been: the router branches between `onHydrate()`
499
+ // and `onMount()`, and the action dispatcher calls `onMount()` only when an
500
+ // action asks for it.
501
+ //
502
+ // It was removed rather than wired up because wiring it would have been wrong.
503
+ // `$refresh` and `$mount` deliberately re-run `onMount()` on a page that was
504
+ // hydrated — so a flag whose stated meaning is "this page has been hydrated,
505
+ // do not mount it" would have broken both the moment anyone honoured it. An
506
+ // inert flag that reads as load-bearing is worse than none: the next person
507
+ // building render modes would reach for it, find it does nothing, and ship a
508
+ // double-mount. `hooks.test.ts` pins the real guarantee instead.
498
509
 
499
510
  /** Populated by flash() — read by the WS handler to emit flash frames. @internal */
500
511
  _flashes: FlashMessage[] = [];
@@ -76,8 +76,13 @@ export class FlowBrowser {
76
76
  // than on a sleep is what makes these tests deterministic: a slow boot
77
77
  // waits longer, and a bridge that never connects fails with a clear reason
78
78
  // instead of a mystery assertion further down.
79
+ //
80
+ // Guarded on `document.body` existing: the poll can land between a
81
+ // navigation committing and the body being parsed, and `null.getAttribute`
82
+ // throws out of `evaluate` rather than returning false — so the wait died
83
+ // with a TypeError instead of polling once more.
79
84
  await page.waitUntil(
80
- `document.body.getAttribute("data-flow-connection") === "online"`,
85
+ `!!document.body && document.body.getAttribute("data-flow-connection") === "online"`,
81
86
  "Flow to connect its WebSocket",
82
87
  timeout,
83
88
  );
@@ -125,7 +130,7 @@ export class FlowBrowser {
125
130
 
126
131
  if (options.waitForConnection !== false) {
127
132
  await this.waitUntil(
128
- `document.body.getAttribute("data-flow-connection") === "online"`,
133
+ `!!document.body && document.body.getAttribute("data-flow-connection") === "online"`,
129
134
  "Flow to connect its WebSocket",
130
135
  timeout,
131
136
  );