-
Notifications
You must be signed in to change notification settings - Fork 304
fix(typescript-client): bundle patched version of fetch-event-source #3732
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
base: main
Are you sure you want to change the base?
fix(typescript-client): bundle patched version of fetch-event-source #3732
Conversation
📝 WalkthroughWalkthroughAdds a changeset entry for a patch bump of Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
✏️ Tip: You can disable this entire section by setting Comment |
commit: |
e462b78 to
7b29b8f
Compare
✅ Deploy Preview for electric-next ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
I spotted someone running actions here and it failing with some unrelated golang error during build - I rebased the branch to current main, hope it helps 😄 Can I do anything more to help it move forward? Are my findings correct here, or should I dig deeper? Thanks a lot in advance! |
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.
Hey, nice catch! Thanks for the contribution.
Hello 👋
When liveSse mode got introduced, it included
fetch-event-sourcewhich is used instead of built-inEventSourcebecause of richer capabilities. However, it had a few assumptions (document/window existence) + bugs when it comes to aborting. This was patched, however, when buildingtypescript-clientpatched version isn't included and when user uses it - they have unpatched version.Screenshot from
npmpublished code:That results in all of these issues being present when consumer installs the library. For example, it's impossible to abort
liveSseshapes, which someone spotted here #2322 (comment)This makes the
fetch-event-sourcelibrary being inlined in the bundled code, with patched changes applied. Example output after my change (I marked some changes which are included in the patch):Example from the local app I'm working on atm, without the patch - observe shape requests being aborted and then immediately started again
Screen.Recording.2026-01-18.at.14.45.54.mov
While if I used
distbuilt from this branch:Screen.Recording.2026-01-18.at.14.44.42.mov
That was a bit rough to debug, but I think I've got it right 😄
Summary by CodeRabbit
Bug Fixes
Documentation
✏️ Tip: You can customize this high-level summary in your review settings.