fix(node-client-sdk): adding docs to clarify FDv2 datasystem will ignore initialConnectionMode - #1835
fix(node-client-sdk): adding docs to clarify FDv2 datasystem will ignore initialConnectionMode#1835joker23 wants to merge 1 commit into
initialConnectionMode#1835Conversation
ignore `initialConnectionMode`
|
@launchdarkly/js-sdk-common size report |
|
@launchdarkly/browser size report |
|
@launchdarkly/js-client-sdk-common size report |
|
@launchdarkly/js-client-sdk size report |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 899c4c0. Configure here.
This PR will add clarification to the behavior when
datasystems(FDv2) AND is set along withinitialConnectionModeis set tooffline. In this case, FDv2 datasystems will win out and theinitialConnectionModewill be ignore. This behavior is consistent with flutter client sdk.The additional thing I added here is a warning log for when these configurations are set together so users will know what to expect
Note
Low Risk
Diagnostic logging and documentation only; connection mode behavior on the FDv2 path is unchanged aside from making misconfiguration visible.
Overview
Clarifies that
initialConnectionModeis an FDv1-only option: when a realdataSystemobject is configured, FDv2 owns startup connection mode and the top-level option has no effect (aligned with other client SDKs).validateOptionsnow logs a warning if bothdataSystemand an explicitinitialConnectionModeare set, and points callers todataSystem.automaticModeSwitching.initialConnectionModewithtype: 'manual'. Warnings are skipped fornull/invaliddataSystem,nullinitialConnectionMode, or when only one of the two is provided.NodeOptionsJSDoc documents the same precedence. Tests cover option validation edge cases and thatcreateClientstill resolves FDv2 mode (e.g. streaming) while emitting the warning when both options are set.Reviewed by Cursor Bugbot for commit 899c4c0. Bugbot is set up for automated code reviews on this repo. Configure here.