@cross-deck/web 1.6.4 → 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,26 +2,14 @@
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.6.4] — 2026-06-01
6
-
7
- Patch contract-integrity fixes. Two issues found by adversarial testing of
8
- the shipped contracts against real wire traffic. No public API change.
9
-
10
- **`super-property-merge-precedence` registered super-properties now win over
11
- auto-collected fields, as the contract claims.** The merge had an inverted
12
- guard (`if (!(k in enriched))`) so a device-seeded key (`os`, `locale`,
13
- `timezone`, …) silently clobbered a value set via `register()`. Effective order
14
- is now **caller > super > auto-collected**; caller properties still win.
15
-
16
- **Three contracts were stamped `runtimeVerified: true` but only had a boot-time
17
- self-test (off by default in production) — now they run on real production
18
- hot-path hooks.** `flush-interval-parity` validates the live flush interval on
19
- every `track()`; `sdk-error-codes-catalogue` confirms each real wire error's
20
- code carries remediation on `onErrorParse`; `contract-failed-payload-schema-lock`
21
- schema-locks the actual outgoing telemetry on the emit path. The bundled-manifest
22
- generator now derives `runtimeVerified` from the presence of a hot-path hook
23
- (not merely a registered verifier), so the flag can no longer claim runtime
24
- enforcement a verifier doesn't deliver.
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.
25
13
 
26
14
  ## [1.6.3] — 2026-06-01
27
15
 
@@ -45,38 +33,46 @@ regardless, so context is preserved on other errors.
45
33
 
46
34
  ## [1.6.2] — 2026-05-31
47
35
 
48
- Patch — session-boundary correctness. A stored session could span a gap
49
- longer than the 30-minute inactivity window in two cases the resume logic
50
- missed, fragmenting journey grouping. Both are now fixed. No public API
51
- change; `session.ended` emission timing changes as described, so read
52
- 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.
53
40
 
54
- **A tab left open and idle, then used again, no longer stretches one
55
- session across the gap.** `markActivity()` now rolls to a new session when
56
- an event lands after the 30-minute window has lapsed — covering the case
57
- the page-load and tab-return resume checks miss entirely (a tab kept open
58
- and idle, then interacted with, with no visibility transition). A single
59
- 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.
60
47
 
61
48
  **Returning to a long-idle tab no longer back-dates `session.ended`.** The
62
- visibility-resume path emitted `session.ended` at the moment of return —
63
- more than 30 minutes after the session's last real event — which itself
64
- opened an intra-session gap. The prior session now ends implicitly (its
65
- end inferred from its last event), consistent with the page-load resume
66
- path. If you key downstream logic on `session.ended`, note it no longer
67
- fires on a >30-minute tab-return.
68
-
69
- ## [1.6.1] 2026-05-30
70
-
71
- Minor two autocapture fidelity fixes, plus a repair to the release
72
- pipeline itself. (1.6.0 carried the same two fixes but never reached npm:
73
- its automated publish hit a pre-existing broken test gate a schema-lock
74
- test that loaded a contract via a monorepo-only path that doesn't exist
75
- in the published package. Fixed by reading the contract from the copy
76
- bundled into the SDK, so this is the first build of these changes to
77
- ship.) No public API change; event emission behaviour changes as
78
- described, so read before upgrading if you have downstream logic keyed on
79
- `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.
80
76
 
81
77
  **Sessions now survive full-page navigations.** Session state was
82
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-01T09:52:17.822Z",
3
+ "generatedAt": "2026-06-10T12:59:26.177Z",
4
4
  "sdk": "@cross-deck/web",
5
- "sdkVersion": "1.6.4",
6
- "bundledIn": "@cross-deck/web@1.6.4",
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.4"
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.4"
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.4"
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.4"
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.4"
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.4"
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.4"
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.4"
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.4"
543
+ "bundledIn": "@cross-deck/web@1.7.0"
544
544
  }
545
545
  ]
546
546
  }