Skip to content

feat: Migrate the node-family SDKs to @launchdarkly/eventsource through the platform fetch - #2060

Draft
joker23 wants to merge 6 commits into
skz/sdk-2924/platform-streaming-fetchfrom
skz/sdk-2924/browser-fetch-eventsource
Draft

joker23 wants to merge 6 commits into
skz/sdk-2924/platform-streaming-fetchfrom
skz/sdk-2924/browser-fetch-eventsource

Conversation

@joker23

@joker23 joker23 commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Moves the SSE streaming transport of the node-family SDKs (server-node, node-client, electron) onto the platform Requests.fetch, using the optional streaming members added in #2092. Each SDK's createEventSource now injects (url, init) => requests.fetch(url, { ...init, streaming: true }) into @launchdarkly/eventsource, and the parallel fetch-adapter modules are deleted. The external launchdarkly-eventsource dependency is dropped.

Per package: the streaming branch sends no accept-encoding, applies no request timeout, sets setNoDelay(true), honors the abort signal, and never follows redirects; a new non-buffering streaming response class exposes the body reader; HeaderWrapper gains forEach. The buffered fetch path is unchanged. server-node applies per-request TLS parameters only when the SDK built the agent; node-client builds its agent from tlsParams with no proxy support; electron uses the machine's own network configuration.

Behavior notes, carried over from the adapter design:

  • Streaming connections verify TLS by default; a stream served behind a private CA needs tlsParams.
  • Streaming requests never follow redirects.

All legacy adapter test scenarios are ported to the new seam. Contract tests pass for all three SDKs.

@joker23
joker23 force-pushed the skz/sdk-2924/browser-fetch-eventsource branch from 5a55e0c to 237650f Compare September 29, 2026 18:32
@joker23
joker23 force-pushed the skz/sdk-3150/common-eventsource-sdk-client-options branch from 4af0bca to 7b8f4db Compare September 29, 2026 18:32
@joker23
joker23 changed the base branch from skz/sdk-3150/common-eventsource-sdk-client-options to skz/sdk-3151/common-eventsource-node-consumers September 29, 2026 18:47
@joker23 joker23 changed the title feat: Add an opt-in fetch-based EventSource entry to the browser SDK feat: Migrate the node-family SDKs to @launchdarkly/eventsource with injected fetch adapters Sep 29, 2026
@joker23
joker23 force-pushed the skz/sdk-2924/browser-fetch-eventsource branch from 780c52a to e9a7e4d Compare September 29, 2026 19:05
@joker23
joker23 force-pushed the skz/sdk-3151/common-eventsource-node-consumers branch from 237650f to a1f69ac Compare September 29, 2026 19:05
@joker23 joker23 closed this Sep 29, 2026
@joker23
joker23 deleted the skz/sdk-2924/browser-fetch-eventsource branch September 29, 2026 19:09
@joker23
joker23 restored the skz/sdk-2924/browser-fetch-eventsource branch September 29, 2026 19:11
@joker23 joker23 reopened this Sep 29, 2026
@joker23
joker23 changed the base branch from skz/sdk-2924/common-eventsource-browser to skz/sdk-3151/common-eventsource-node-consumers September 29, 2026 19:13
@joker23
joker23 force-pushed the skz/sdk-3151/common-eventsource-node-consumers branch from a1f69ac to 74b9566 Compare September 29, 2026 19:47
@joker23
joker23 force-pushed the skz/sdk-2924/browser-fetch-eventsource branch from e9a7e4d to 36d9f88 Compare September 29, 2026 19:47
@joker23
joker23 force-pushed the skz/sdk-3151/common-eventsource-node-consumers branch from 74b9566 to b54f923 Compare September 29, 2026 20:22
@joker23
joker23 force-pushed the skz/sdk-2924/browser-fetch-eventsource branch 2 times, most recently from ae2f086 to 699cdf9 Compare September 29, 2026 20:32
@joker23
joker23 force-pushed the skz/sdk-3151/common-eventsource-node-consumers branch 2 times, most recently from 6760a28 to 8c29bda Compare September 30, 2026 18:20
@joker23
joker23 force-pushed the skz/sdk-2924/browser-fetch-eventsource branch 2 times, most recently from 7150910 to bb602e8 Compare September 30, 2026 22:21
@joker23
joker23 force-pushed the skz/sdk-3151/common-eventsource-node-consumers branch from 8c29bda to 1f93481 Compare September 30, 2026 22:21
@joker23
joker23 force-pushed the skz/sdk-2924/browser-fetch-eventsource branch from bb602e8 to 5649f6e Compare October 1, 2026 17:01
@joker23
joker23 force-pushed the skz/sdk-3151/common-eventsource-node-consumers branch 2 times, most recently from b17e046 to 3f05376 Compare October 1, 2026 18:05
@joker23
joker23 force-pushed the skz/sdk-2924/browser-fetch-eventsource branch from 5649f6e to 22ffdd9 Compare October 1, 2026 18:05
@joker23
joker23 force-pushed the skz/sdk-3151/common-eventsource-node-consumers branch from 3f05376 to fd9e7c8 Compare October 5, 2026 18:24
@joker23
joker23 force-pushed the skz/sdk-2924/browser-fetch-eventsource branch 2 times, most recently from f7c01b1 to c98d83d Compare October 6, 2026 13:15
@joker23
joker23 force-pushed the skz/sdk-3151/common-eventsource-node-consumers branch 2 times, most recently from 42838fd to 596108e Compare October 6, 2026 13:43
@joker23
joker23 force-pushed the skz/sdk-2924/browser-fetch-eventsource branch from 6282da2 to df94ca0 Compare October 7, 2026 20:52
@joker23
joker23 force-pushed the skz/sdk-3151/common-eventsource-node-consumers branch 4 times, most recently from 4dda17d to 73178ce Compare October 8, 2026 16:13
@joker23
joker23 force-pushed the skz/sdk-2924/browser-fetch-eventsource branch from df94ca0 to 7eefb70 Compare October 8, 2026 16:13
@joker23
joker23 marked this pull request as draft October 8, 2026 19:31
@joker23

joker23 commented Oct 8, 2026

Copy link
Copy Markdown
Contributor Author

move this to draft so we can explore ways to extend Platform.Request to support streaming.

@joker23
joker23 force-pushed the skz/sdk-2924/browser-fetch-eventsource branch from 7eefb70 to 896c17f Compare October 8, 2026 19:34
@joker23
joker23 force-pushed the skz/sdk-3151/common-eventsource-node-consumers branch from 73178ce to 88283f4 Compare October 8, 2026 19:34
@joker23
joker23 force-pushed the skz/sdk-2924/browser-fetch-eventsource branch from 896c17f to 589c43e Compare October 8, 2026 19:51
@joker23
joker23 changed the base branch from skz/sdk-3151/common-eventsource-node-consumers to main October 8, 2026 19:51
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

@launchdarkly/js-client-sdk size report
This is the brotli compressed size of the ESM build.
Compressed size: 32662 bytes
Compressed size limit: 34000
Uncompressed size: 117055 bytes

@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

@launchdarkly/js-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 29603 bytes
Compressed size limit: 30000
Uncompressed size: 142116 bytes

@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

@launchdarkly/js-client-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 25437 bytes
Compressed size limit: 44000
Uncompressed size: 165420 bytes

@joker23
joker23 force-pushed the skz/sdk-2924/browser-fetch-eventsource branch 2 times, most recently from 5251bfd to 615a732 Compare October 9, 2026 13:41
@joker23
joker23 changed the base branch from main to skz/sdk-2924/platform-streaming-fetch October 9, 2026 13:41
@joker23
joker23 force-pushed the skz/sdk-2924/browser-fetch-eventsource branch from 615a732 to 8b1eb38 Compare October 9, 2026 13:48
@joker23 joker23 changed the title feat: Migrate the node-family SDKs to @launchdarkly/eventsource with injected fetch adapters feat: Migrate the node-family SDKs to @launchdarkly/eventsource through the platform fetch Oct 9, 2026
@joker23
joker23 force-pushed the skz/sdk-2924/browser-fetch-eventsource branch 2 times, most recently from 56cabe7 to 5a2fd51 Compare October 9, 2026 16:02
@joker23
joker23 force-pushed the skz/sdk-2924/browser-fetch-eventsource branch from 5a2fd51 to 7ff36a7 Compare October 9, 2026 20:00

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant