Commit 3ea0f33
authored
feat: Add FDv2 data system support to NodeClient (#1775)
SDK-2468
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Medium Risk**
> Touches core flag data plumbing and connection/offline semantics, but
FDv1 behavior is preserved behind the existing data manager when
`dataSystem` is absent.
>
> **Overview**
> When **`dataSystem`** is configured, **NodeClient** now wires
**`createFDv2DataManagerBase`** (desktop defaults, transition table,
query params for client-side ID vs mobile) instead of
**`NodeDataManager`**, while leaving the FDv1 path unchanged.
>
> **Connection mode** is tracked on the client (`_connectionMode`). In
FDv2, **`setConnectionMode`** validates modes, no-ops after close or on
duplicate mode, serializes concurrent transitions (flush before offline,
then event sending + data manager), and **`getConnectionMode` /
`isOffline`** read that state rather than the FDv1 data manager.
>
> CI runs **FDv2 contract tests** (harness v3) against the same
long-lived test service (`stop_service: 'false'`), with a new
suppressions file and harness updates (**mobile**, **`useMobileKey`**,
extra capabilities). Unit coverage is added in
**`NodeClientFDv2.test.ts`**; **`FDv2ConnectionMode`** is exported from
**`LDCommon`**.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
01ac80d. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent b273e89 commit 3ea0f33
7 files changed
Lines changed: 544 additions & 13 deletions
File tree
- .github/workflows
- packages/sdk/node-client
- __tests__
- contract-tests
- src
- src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
49 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
0 commit comments