@cross-deck/web 1.6.3 → 1.7.0

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,15 @@
2
2
 
3
3
  All notable changes to `@cross-deck/web` will be documented here. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
4
4
 
5
+ ## [1.7.0] — 2026-06-10
6
+
7
+ Event Envelope v1 conformance (`backend/docs/event-envelope-spec-v1.md`). Wire-breaking change (pre-launch; free). No public API change.
8
+
9
+ - **`envelopeVersion: 1`** (integer) added to every batch POST body (spec §1). Distinct from `sdk.version`; the server uses it to gate parsing and will refuse payloads without it once enforcement deploys.
10
+ - **`seq`** (number) on every event (spec §3). Per-session monotonic integer, assigned synchronously at `track()` time alongside `timestamp` (one sample). Counter lives in `AutoTracker`, resets to 0 at every session boundary (`session.started`, `resetSession()`, 30-min idle rollover), and persists across tab hide/show within a session. The deterministic tiebreak for events sharing a timestamp.
11
+ - **`context`** object on every event (spec §4). Device/platform facts (`os`, `osVersion`, `appVersion`, `sdkName`, `sdkVersion`, `locale`, `timezone`, `browser`, `browserVersion`) are promoted OUT of `properties` into a standardised top-level object. `properties` retains screen dimensions and all app-supplied properties. This aligns the Web SDK field-set with Swift (which ships `os`, `osVersion`, `sdkName`, `sdkVersion`, `locale`, `timezone`, `deviceModel`), closing the Q3 drift documented in the spec's Phase-0 audit matrix.
12
+ - Bundle-size budget: core ESM + CJS 58 → 60 KB gzipped (~0.5 KB for the envelope fields + browser/browserVersion detection; CJS landed at 58.26, over the old ceiling). react/vue ESM and UMD unchanged, comfortably under budget.
13
+
5
14
  ## [1.6.3] — 2026-06-01
6
15
 
7
16
  Patch — error-capture noise reduction. The fetch wrapper raised an
@@ -24,38 +33,46 @@ regardless, so context is preserved on other errors.
24
33
 
25
34
  ## [1.6.2] — 2026-05-31
26
35
 
27
- Patch — session-boundary correctness. A stored session could span a gap
28
- longer than the 30-minute inactivity window in two cases the resume logic
29
- missed, fragmenting journey grouping. Both are now fixed. No public API
30
- change; `session.ended` emission timing changes as described, so read
31
- before upgrading if you have downstream logic keyed on it.
36
+ Session-boundary correctness, plus the per-platform contract runtime status
37
+ that had been sitting unreleased. No public API change; `session.ended`
38
+ emission timing changes as described, so read before upgrading if you key
39
+ downstream logic on it.
32
40
 
33
- **A tab left open and idle, then used again, no longer stretches one
34
- session across the gap.** `markActivity()` now rolls to a new session when
35
- an event lands after the 30-minute window has lapsed — covering the case
36
- the page-load and tab-return resume checks miss entirely (a tab kept open
37
- and idle, then interacted with, with no visibility transition). A single
38
- stored session can no longer contain a >30-minute gap.
41
+ **A tab left open and idle, then used again, no longer stretches one session
42
+ across the gap.** `markActivity()` now rolls to a new session when an event
43
+ lands after the 30-minute inactivity window has lapsed — covering the case the
44
+ page-load and tab-return resume checks miss entirely (a tab kept open and idle,
45
+ then interacted with, with no visibility transition). A single stored session
46
+ can no longer contain a >30-minute gap.
39
47
 
40
48
  **Returning to a long-idle tab no longer back-dates `session.ended`.** The
41
- visibility-resume path emitted `session.ended` at the moment of return —
42
- more than 30 minutes after the session's last real event — which itself
43
- opened an intra-session gap. The prior session now ends implicitly (its
44
- end inferred from its last event), consistent with the page-load resume
45
- path. If you key downstream logic on `session.ended`, note it no longer
46
- fires on a >30-minute tab-return.
47
-
48
- ## [1.6.1] 2026-05-30
49
-
50
- Minor two autocapture fidelity fixes, plus a repair to the release
51
- pipeline itself. (1.6.0 carried the same two fixes but never reached npm:
52
- its automated publish hit a pre-existing broken test gate a schema-lock
53
- test that loaded a contract via a monorepo-only path that doesn't exist
54
- in the published package. Fixed by reading the contract from the copy
55
- bundled into the SDK, so this is the first build of these changes to
56
- ship.) No public API change; event emission behaviour changes as
57
- described, so read before upgrading if you have downstream logic keyed on
58
- `session.ended` timing.
49
+ visibility-resume path emitted `session.ended` at the moment of return — more
50
+ than 30 minutes after the session's last real event — which itself opened an
51
+ intra-session gap. The prior session now ends implicitly (its end inferred from
52
+ its last event), consistent with the page-load resume path. If you key
53
+ downstream logic on `session.ended`, note it no longer fires on a >30-minute
54
+ tab-return.
55
+
56
+ **Per-platform contract runtime status + a 7th live verifier.** Each bundled
57
+
58
+ **Per-platform contract runtime status + a 7th live verifier.** Each bundled
59
+ contract now carries `runtimeVerified` whether *this* SDK self-verifies it
60
+ at runtime vs. proving it in CI only. It is derived at build time from the
61
+ SDK's `STATIC_VERIFIERS` registry (never hand-set), so the registry can't
62
+ disagree with what actually runs. `CrossdeckContracts` consumers can read it
63
+ to distinguish "watch it pass live" from "CI-proven every release".
64
+
65
+ - New runtime verifier `sdk-error-codes-catalogue` (boot self-test: every
66
+ backend wire code carries a description + resolution in the shipped
67
+ catalogue). Web now self-verifies **7** contracts live.
68
+ - Bundle-size budget: UMD min 32 → 33 KB (~0.4 KB gzipped for the flag + the
69
+ new verifier's frozen 15-code list). Other bundles unchanged, under budget.
70
+
71
+ ## [1.6.0] — 2026-05-30
72
+
73
+ Minor — two autocapture fidelity fixes. No public API change; event
74
+ emission behaviour changes as described, so read before upgrading if you
75
+ have downstream logic keyed on `session.ended` timing.
59
76
 
60
77
  **Sessions now survive full-page navigations.** Session state was
61
78
  in-memory only, so on a multi-page site (where the SDK re-installs on
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "generatedAt": "2026-06-01T07:38:09.435Z",
3
+ "generatedAt": "2026-06-10T12:59:26.177Z",
4
4
  "sdk": "@cross-deck/web",
5
- "sdkVersion": "1.6.3",
6
- "bundledIn": "@cross-deck/web@1.6.3",
5
+ "sdkVersion": "1.7.0",
6
+ "bundledIn": "@cross-deck/web@1.7.0",
7
7
  "count": 9,
8
8
  "contracts": [
9
9
  {
@@ -126,7 +126,7 @@
126
126
  "legal/security/index.html#diagnostic",
127
127
  "legal/sdk-data/index.html#b-diagnostic"
128
128
  ],
129
- "bundledIn": "@cross-deck/web@1.6.3"
129
+ "bundledIn": "@cross-deck/web@1.7.0"
130
130
  },
131
131
  {
132
132
  "id": "error-envelope-shape",
@@ -165,7 +165,7 @@
165
165
  ],
166
166
  "registeredAt": "2026-05-26",
167
167
  "firstRegisteredIn": "bank-grade reconciliation v1.4.0 — phase 8 (codifies existing contract)",
168
- "bundledIn": "@cross-deck/web@1.6.3"
168
+ "bundledIn": "@cross-deck/web@1.7.0"
169
169
  },
170
170
  {
171
171
  "id": "flush-interval-parity",
@@ -210,7 +210,7 @@
210
210
  ],
211
211
  "registeredAt": "2026-05-26",
212
212
  "firstRegisteredIn": "bank-grade reconciliation v1.4.0 — phase 3.3",
213
- "bundledIn": "@cross-deck/web@1.6.3"
213
+ "bundledIn": "@cross-deck/web@1.7.0"
214
214
  },
215
215
  {
216
216
  "id": "idempotency-key-deterministic",
@@ -315,7 +315,7 @@
315
315
  ],
316
316
  "registeredAt": "2026-05-26",
317
317
  "firstRegisteredIn": "bank-grade reconciliation v1.4.0 — phase 2.2.a + 2.2.b + 2.2.c",
318
- "bundledIn": "@cross-deck/web@1.6.3"
318
+ "bundledIn": "@cross-deck/web@1.7.0"
319
319
  },
320
320
  {
321
321
  "id": "init-reentry-drains-prior-queue",
@@ -342,7 +342,7 @@
342
342
  ],
343
343
  "registeredAt": "2026-05-26",
344
344
  "firstRegisteredIn": "bank-grade reconciliation v1.4.0 — phase 5.5",
345
- "bundledIn": "@cross-deck/web@1.6.3"
345
+ "bundledIn": "@cross-deck/web@1.7.0"
346
346
  },
347
347
  {
348
348
  "id": "per-user-cache-isolation",
@@ -421,7 +421,7 @@
421
421
  ],
422
422
  "registeredAt": "2026-05-26",
423
423
  "firstRegisteredIn": "bank-grade reconciliation v1.4.0 — phase 1.3 (web/RN) + dogfood-gap fix (swift + android)",
424
- "bundledIn": "@cross-deck/web@1.6.3"
424
+ "bundledIn": "@cross-deck/web@1.7.0"
425
425
  },
426
426
  {
427
427
  "id": "sdk-error-codes-catalogue",
@@ -466,7 +466,7 @@
466
466
  ],
467
467
  "registeredAt": "2026-05-26",
468
468
  "firstRegisteredIn": "bank-grade reconciliation v1.4.0 — phase 6.2",
469
- "bundledIn": "@cross-deck/web@1.6.3"
469
+ "bundledIn": "@cross-deck/web@1.7.0"
470
470
  },
471
471
  {
472
472
  "id": "super-property-merge-precedence",
@@ -507,7 +507,7 @@
507
507
  ],
508
508
  "registeredAt": "2026-05-26",
509
509
  "firstRegisteredIn": "bank-grade reconciliation v1.4.0 — phase 3.2",
510
- "bundledIn": "@cross-deck/web@1.6.3"
510
+ "bundledIn": "@cross-deck/web@1.7.0"
511
511
  },
512
512
  {
513
513
  "id": "sync-purchases-funnel-parity",
@@ -540,7 +540,7 @@
540
540
  ],
541
541
  "registeredAt": "2026-05-26",
542
542
  "firstRegisteredIn": "bank-grade reconciliation v1.4.0 — phase 3.5",
543
- "bundledIn": "@cross-deck/web@1.6.3"
543
+ "bundledIn": "@cross-deck/web@1.7.0"
544
544
  }
545
545
  ]
546
546
  }