fix: abort underlying EventSource request when response fails validation - #1340
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Contributor
📚 TypeDoc Generation Result✅ TypeDoc generated successfully!
The TypeDoc JSON file has been generated and validated. All documentation scripts completed successfully. |
Contributor
Coverage Report
File CoverageNo changed files found. |
rexxars
marked this pull request as ready for review
September 21, 2026 20:01
rexxars
enabled auto-merge
September 21, 2026 20:01
binoy14
approved these changes
Sep 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Upgrades
eventsourceandeventsource-parserto fix three issues:Note
Medium Risk
Touches the realtime EventSource path used by listen/live; risk is limited to upstream SSE connection and parsing behavior, with no local logic changes.
Overview
Bumps
eventsourcefrom^5.1.1to^5.1.2(andeventsource-parsertransitively) so live/listen SSE behavior picks up upstream fixes—no application source changes in this repo.Consumers of realtime listening get aborted underlying fetch when a response fails EventSource validation (e.g. API error bodies), no further events after close when a chunk both closes the stream and contains trailing messages, plus a parser edge case around empty initial chunks/BOM (not relevant to Sanity’s API).
Adds a minor changeset for
@sanity/clientand whitelistseventsource@5.1.2under pnpmminimumReleaseAgeExcludeso the newer release can install.Reviewed by Cursor Bugbot for commit 6c030f9. Bugbot is set up for automated code reviews on this repo. Configure here.