-
Notifications
You must be signed in to change notification settings - Fork 30
feat: add support for steaming in Vega OS #974
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@launchdarkly/browser size report |
|
@launchdarkly/js-sdk-common size report |
|
@launchdarkly/js-client-sdk size report |
|
@launchdarkly/js-client-sdk-common size report |
packages/sdk/react-native/src/fromExternal/react-native-sse/EventSource.ts
Show resolved
Hide resolved
| if (this._status === this.CLOSED) { | ||
| // Do not handle this state if the status is loading as we will delegate this to the onprogress listener. | ||
| if (this._status === this.CLOSED || this._xhr.readyState === XMLHttpRequest.LOADING) { | ||
| return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there anything in the code that follows that should be cleaned up?
Is there any potential for overlapping situations where the responseText could be appended during another state?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per https://xhr.spec.whatwg.org/ it looks like progress event will fire on events that have data which I think means that only https://github.com/launchdarkly/js-core/pull/974/files#diff-1eb9eb87df77c7a5d195bc4e8d8d0a5d5c896fb4b4edf90b69d4e3b4ca5c9198R194 could be cleaned up. I left this in there in case we do run into the situation that data is sent on a status update which shouldn't happen so should pass through in all cases.
🤖 I have created a release *beep* *boop* --- <details><summary>jest: 0.1.12</summary> ## [0.1.12](jest-v0.1.11...jest-v0.1.12) (2025-11-03) ### Dependencies * The following workspace dependencies were updated * dependencies * @launchdarkly/react-native-client-sdk bumped from ~10.11.0 to ~10.12.0 </details> <details><summary>react-native-client-sdk: 10.12.0</summary> ## [10.12.0](react-native-client-sdk-v10.11.0...react-native-client-sdk-v10.12.0) (2025-11-03) ### Features * add support for steaming in Vega OS ([#974](#974)) ([7b6ac03](7b6ac03)) </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] > Release React Native SDK 10.12.0 (adds Vega OS streaming) and update Jest tooling to 0.1.12 with dependency bump; update manifest and package versions. > > - **SDKs** > - **React Native** (`packages/sdk/react-native`): bump to `10.12.0`; changelog adds feature for Vega OS streaming; update `package.json` version. > - **Tooling** > - **Jest** (`packages/tooling/jest`): bump to `0.1.12`; update dependency `@launchdarkly/react-native-client-sdk` to `~10.12.0`; changelog updated. > - **Release metadata** > - Update versions in `.release-please-manifest.json` for `packages/sdk/react-native` and `packages/tooling/jest`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit df0d550. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Requirements
Related issues
Provide links to any issues in this repository or elsewhere relating to this pull request.
Describe the solution you've provided
Provide a clear and concise description of what you expect to happen.
Describe alternatives you've considered
Provide a clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context about the pull request here.
Note
Handle streaming by parsing data in
onprogressand usingonreadystatechangeonly for state transitions, improving SSE behavior on Vega OS.EventSource.ts):XMLHttpRequest.onprogressto parse streaming data duringLOADINGvia_handleEventand emit errors for non-2xx/3xx statuses.onreadystatechangeto ignoreLOADING, handle connection open, DONE reconnection, and error/retry flow.Written by Cursor Bugbot for commit 097ce65. This will update automatically on new commits. Configure here.