Repository navigation
feat: add fetch-based eventsource entry point to the react sdk - #2150
Conversation
|
@cursor review |
|
@launchdarkly/js-sdk-common size report |
|
@launchdarkly/js-client-sdk size report |
|
@launchdarkly/js-client-sdk-common size report |
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 c4e0a7f. Configure here.
c4e0a7f to
055959a
Compare
055959a to
9bedd41
Compare
🤖 I have created a release *beep* *boop* --- <details><summary>akamai-edgeworker-sdk-common: 2.0.47</summary> ## [2.0.47](akamai-edgeworker-sdk-common-v2.0.46...akamai-edgeworker-sdk-common-v2.0.47) (2026-11-03) ### Dependencies * The following workspace dependencies were updated * dependencies * @launchdarkly/js-server-sdk-common bumped from ^2.26.1 to ^2.26.2 </details> <details><summary>akamai-server-base-sdk: 3.0.48</summary> ## [3.0.48](akamai-server-base-sdk-v3.0.47...akamai-server-base-sdk-v3.0.48) (2026-11-03) ### Dependencies * The following workspace dependencies were updated * dependencies * @launchdarkly/akamai-edgeworker-sdk-common bumped from ^2.0.46 to ^2.0.47 </details> <details><summary>akamai-server-edgekv-sdk: 1.4.50</summary> ## [1.4.50](akamai-server-edgekv-sdk-v1.4.49...akamai-server-edgekv-sdk-v1.4.50) (2026-11-03) ### Dependencies * The following workspace dependencies were updated * dependencies * @launchdarkly/akamai-edgeworker-sdk-common bumped from ^2.0.46 to ^2.0.47 * @launchdarkly/js-server-sdk-common bumped from ^2.26.1 to ^2.26.2 </details> <details><summary>client-testing-plugin: 1.0.29</summary> ## [1.0.29](client-testing-plugin-v1.0.28...client-testing-plugin-v1.0.29) (2026-11-03) ### Dependencies * The following workspace dependencies were updated * devDependencies * @launchdarkly/react-sdk bumped from 4.1.30 to 4.2.0 * peerDependencies * @launchdarkly/react-sdk bumped from ^4.1.4 to ^4.2.0 </details> <details><summary>cloudflare-server-sdk: 2.7.49</summary> ## [2.7.49](cloudflare-server-sdk-v2.7.48...cloudflare-server-sdk-v2.7.49) (2026-11-03) ### Dependencies * The following workspace dependencies were updated * dependencies * @launchdarkly/js-server-sdk-common-edge bumped from 2.6.44 to 2.6.45 </details> <details><summary>fastly-server-sdk: 0.2.39</summary> ## [0.2.39](fastly-server-sdk-v0.2.38...fastly-server-sdk-v0.2.39) (2026-11-03) ### Dependencies * The following workspace dependencies were updated * dependencies * @launchdarkly/js-server-sdk-common bumped from 2.26.1 to 2.26.2 </details> <details><summary>js-server-sdk-common: 2.26.2</summary> ## [2.26.2](js-server-sdk-common-v2.26.1...js-server-sdk-common-v2.26.2) (2026-11-03) ### Bug Fixes * Base the validity of the uninitialized all flags state on the override layer's flags ([#2132](#2132)) ([9cafac5](9cafac5)) </details> <details><summary>js-server-sdk-common-edge: 2.6.45</summary> ## [2.6.45](js-server-sdk-common-edge-v2.6.44...js-server-sdk-common-edge-v2.6.45) (2026-11-03) ### Dependencies * The following workspace dependencies were updated * dependencies * @launchdarkly/js-server-sdk-common bumped from 2.26.1 to 2.26.2 </details> <details><summary>node-server-sdk: 9.16.2</summary> ## [9.16.2](node-server-sdk-v9.16.1...node-server-sdk-v9.16.2) (2026-11-03) ### Dependencies * The following workspace dependencies were updated * dependencies * @launchdarkly/js-server-sdk-common bumped from 2.26.1 to 2.26.2 </details> <details><summary>node-server-sdk-dynamodb: 6.4.5</summary> ## [6.4.5](node-server-sdk-dynamodb-v6.4.4...node-server-sdk-dynamodb-v6.4.5) (2026-11-03) ### Dependencies * The following workspace dependencies were updated * devDependencies * @launchdarkly/node-server-sdk bumped from 9.16.1 to 9.16.2 * peerDependencies * @launchdarkly/node-server-sdk bumped from >=9.14.1 to >=9.16.2 </details> <details><summary>node-server-sdk-otel: 1.3.41</summary> ## [1.3.41](node-server-sdk-otel-v1.3.40...node-server-sdk-otel-v1.3.41) (2026-11-03) ### Dependencies * The following workspace dependencies were updated * devDependencies * @launchdarkly/node-server-sdk bumped from 9.16.1 to 9.16.2 * peerDependencies * @launchdarkly/node-server-sdk bumped from >=9.11.3 to >=9.16.2 </details> <details><summary>node-server-sdk-redis: 4.4.5</summary> ## [4.4.5](node-server-sdk-redis-v4.4.4...node-server-sdk-redis-v4.4.5) (2026-11-03) ### Dependencies * The following workspace dependencies were updated * devDependencies * @launchdarkly/node-server-sdk bumped from 9.16.1 to 9.16.2 * peerDependencies * @launchdarkly/node-server-sdk bumped from >=9.14.1 to >=9.16.2 </details> <details><summary>openfeature-cloudflare-server: 1.1.2</summary> ## [1.1.2](openfeature-cloudflare-server-v1.1.1...openfeature-cloudflare-server-v1.1.2) (2026-11-03) ### Dependencies * The following workspace dependencies were updated * devDependencies * @launchdarkly/cloudflare-server-sdk bumped from 2.7.48 to 2.7.49 * peerDependencies * @launchdarkly/cloudflare-server-sdk bumped from ^2.7.0 to ^2.7.49 </details> <details><summary>openfeature-node-server: 2.1.5</summary> ## [2.1.5](openfeature-node-server-v2.1.4...openfeature-node-server-v2.1.5) (2026-11-03) ### Dependencies * The following workspace dependencies were updated * devDependencies * @launchdarkly/node-server-sdk bumped from 9.16.1 to 9.16.2 * peerDependencies * @launchdarkly/node-server-sdk bumped from ^9.0.0 to ^9.16.2 </details> <details><summary>react-sdk: 4.2.0</summary> ## [4.2.0](react-sdk-v4.1.30...react-sdk-v4.2.0) (2026-11-03) ### Features * add fetch-based eventsource entry point to the react sdk ([#2150](#2150)) ([a4f23b3](a4f23b3)) ### Dependencies * The following workspace dependencies were updated * dependencies * @launchdarkly/js-server-sdk-common bumped from 2.26.1 to 2.26.2 </details> <details><summary>server-sdk-ai: 2.0.18</summary> ## [2.0.18](server-sdk-ai-v2.0.17...server-sdk-ai-v2.0.18) (2026-11-03) ### Dependencies * The following workspace dependencies were updated * devDependencies * @launchdarkly/js-server-sdk-common bumped from 2.26.1 to 2.26.2 * peerDependencies * @launchdarkly/js-server-sdk-common bumped from ^2.0.0 to ^2.26.2 </details> <details><summary>server-sdk-ai-langchain: 0.8.29</summary> ## [0.8.29](server-sdk-ai-langchain-v0.8.28...server-sdk-ai-langchain-v0.8.29) (2026-11-03) ### Dependencies * The following workspace dependencies were updated * devDependencies * @launchdarkly/server-sdk-ai bumped from ^2.0.17 to ^2.0.18 * peerDependencies * @launchdarkly/server-sdk-ai bumped from ^1.1.1 || ^2.0.0 to ^2.0.18 </details> <details><summary>server-sdk-ai-openai: 0.7.29</summary> ## [0.7.29](server-sdk-ai-openai-v0.7.28...server-sdk-ai-openai-v0.7.29) (2026-11-03) ### Dependencies * The following workspace dependencies were updated * devDependencies * @launchdarkly/js-server-sdk-common bumped from 2.26.1 to 2.26.2 * @launchdarkly/server-sdk-ai bumped from ^2.0.17 to ^2.0.18 * peerDependencies * @launchdarkly/server-sdk-ai bumped from ^1.1.1 || ^2.0.0 to ^2.0.18 </details> <details><summary>server-sdk-ai-vercel: 0.7.29</summary> ## [0.7.29](server-sdk-ai-vercel-v0.7.28...server-sdk-ai-vercel-v0.7.29) (2026-11-03) ### Dependencies * The following workspace dependencies were updated * devDependencies * @launchdarkly/server-sdk-ai bumped from ^2.0.17 to ^2.0.18 * peerDependencies * @launchdarkly/server-sdk-ai bumped from ^1.1.1 || ^2.0.0 to ^2.0.18 </details> <details><summary>shopify-oxygen-sdk: 0.2.4</summary> ## [0.2.4](shopify-oxygen-sdk-v0.2.3...shopify-oxygen-sdk-v0.2.4) (2026-11-03) ### Dependencies * The following workspace dependencies were updated * dependencies * @launchdarkly/js-server-sdk-common bumped from 2.26.1 to 2.26.2 </details> <details><summary>vercel-server-sdk: 1.3.72</summary> ## [1.3.72](vercel-server-sdk-v1.3.71...vercel-server-sdk-v1.3.72) (2026-11-03) ### Dependencies * The following workspace dependencies were updated * dependencies * @launchdarkly/js-server-sdk-common-edge bumped from 2.6.44 to 2.6.45 </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Overview** > This is a **Release Please** cut that bumps versions across the monorepo and refreshes changelogs, manifests, wrapper version strings, and example dependency pins—there is no new feature code in the diff itself beyond what earlier merges already landed. > > The meaningful user-facing releases bundled here are **`@launchdarkly/js-server-sdk-common` 2.26.2**, which fixes how **uninitialized “all flags” state** is considered valid when **file/override layers** supply flags ([#2132](#2132)), and **`@launchdarkly/react-sdk` 4.2.0**, which adds a **`./fetch-eventsource`** package export for a fetch-based streaming entry point ([#2150](#2150)). > > Everything else in the PR is downstream **patch/minor version alignment** (Node server SDK 9.16.2, edge SDKs, OpenFeature wrappers, AI providers, Redis/DynamoDB/OTel plugins, etc.) picking up the updated `@launchdarkly/js-server-sdk-common` / edge common dependencies. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 809a8f1. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This PR will re-export the custom fetch eventsource to react sdk to make it easier to enable
usePostfor react sdk usersNote
Overview
Adds an optional
@launchdarkly/react-sdk/fetch-eventsourceentry that re-exportsfetchBrowserEventSourceandLDEventSourceFactoryfrom the browser SDK, so React apps can opt into fetch-based streaming (e.g. POST streaming) without importing the client SDK subpath directly. NativeEventSourcestays the default; only apps that import this subpath pull in the alternative.Build and packaging follow the existing
./serverpattern: newtsupentry keeps@launchdarkly/js-client-sdkexternal so optional@launchdarkly/eventsourceis not bundled, pluspackage.jsonexports,typesVersions, and package-config test baselines.js-client-sdk/js-server-sdk-commondependency versions are pinned (caret ranges removed).New tests assert
eventSourceinldOptionsis passed through unchanged to the base client viacreateClientandcreateLDReactProvider.Reviewed by Cursor Bugbot for commit 9bedd41. Bugbot is set up for automated code reviews on this repo. Configure here.