A TypeScript/JavaScript library that provides a better way to consume server-sent events (EventSource) using the Fetch API. It lets you use full fetch features such as custom method, headers, and request bodies, gives access to the response for validation, and provides control over retry strategy and connection behavior.
Project status
- Maintenance status: No published updates since v2.0.1 on 2021-04-25, suggesting long periods without tagged changes, though there was an upstream GitHub push on 2026-02-28, so it may be intermittently active rather than fully dormant.
- Update cadence: Historically, updates were fairly spaced in 2020 (initial through v1.0.2), then moved to v2.x in 2021, with no further tagged updates in the ~5 years up to 2026-06-09.
AI summary generated
Recent updates
v2.0.1
v2.0.1 primarily introduces support for ES module imports. The release notes only mention ESM import support, but the code diff also shows a significant packaging/build rework (new CJS and ESM output layouts, updated package.json entry points) plus some TypeScript/build dependency changes.
BreakingFeaturesv2.0.0
v2.0.0 rewrites the SSE response parsing to improve performance and better match the WHATWG EventSource stream interpretation rules. It also changes `EventSourceMessage` initialization semantics and `onmessage` dispatch behavior, including concatenation of multiple `data:` fields and updated handling of empty `id` values for reconnects.
Breakingv1.0.2
Release v1.0.2 focuses on documentation updates and small parsing logic adjustments in src/parse.ts. The stated code change replaces truthy/falsy checks with explicit comparisons for specific values, to make the parsing behavior more predictable.
v1.0.1
v1.0.1 makes the default response validation more permissive for `Content-Type` when using server-sent events. Instead of requiring an exact `text/event-stream` match, it now accepts `text/event-stream` with additional directives such as `charset` and `boundary`.
v1.0.0
v1.0.0 is the initial release of this project. Since the release notes only state "Initial release", no specific features, fixes, breaking changes, or upgrade steps are documented here.