NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #1025 most downloaded on npm
Streaming, source-agnostic EventSource/Server-Sent Events parser
Last release 19 days ago
15 Sep 2026
Release timing varies
gaps range from 1 weeks to 8 months
Most releases are documented
notes for 19 of 24 stable releases
Nothing withdrawn
no release was ever pulled
4 years old
25 releases · first in 2022
One column per quarter.
Patch Changes #41 dd82654 Thanks @sahiinthehood ! - Handle leading byte-order marks across empty input chunks and split raw UTF-8 BOM chunks so the fi
dd82654 Thanks @sahiinthehood! - Handle leading byte-order marks across empty input chunks and split raw UTF-8 BOM chunks so the first event is not dropped.Minor Changes #39 0482048 Thanks @rexxars ! - Added an onId callback that reports ID fields when an event block ends, including blocks without data.
Node.js 18 and 20 are no longer supported. engines now requires >=22.12 , and the browserslist target moved from node >= 18 to node >= 22.12 . Older v
#33 39cf365 Thanks @rexxars! - Require Node.js 22.12 or higher, drop the CommonJS build, and discard invalid lines instead of buffering them
Breaking changes
engines now requires >=22.12, and the browserslist target moved from node >= 18 to node >= 22.12. Older versions may keep working, but they are no longer tested or guaranteed.main field and the require export conditions are gone, so the package resolves to ./dist/index.js and ./dist/stream.js only. Node 22.12 and above supports require(esm) transparently, so require('eventsource-parser') continues to work there.stream.js file has been removed. It re-exported ./dist/stream.cjs for React Native and other bundlers without package exports support. Import eventsource-parser/stream instead, and make sure your bundler resolves the exports field.onError is not called for these, and no line, field, or value is retained. Only lines that are complete when found to be invalid still produce a ParseError with type: 'unknown-field'. This also means reset({consume: true}) no longer reports pending data that was already discarded.:) are only buffered when an onComment callback is configured. Without one, they are discarded like any other line the parser has no use for.Other changes
U+FEFF (for example from a TextDecoder created with ignoreBOM) or as the raw three byte 0xEF 0xBB 0xBF sequence. Previously only the raw form was handled.invalid-field error type that the parser never emitted. The ErrorType union is unchanged; the documentation now correctly refers to unknown-field.id: line containing a NULL character wiping the buffered event id
This release is also available on:
avoid O(N²) when a single SSE event spans many chunks
downgrade browserslist node.js declaration to node 18
reintroduce explicit support for node 18
types: use exact optional property types
reintroduce legacy exports for stream module
drop legacy module export, use shared esm
throw helpful error if passing function to createParser()
The parser now takes an object of callbacks instead of an onParse callback. This means you do not have to check the type of the event in the onEvent c
onParse callback. This means you do not have to check the type of the event in the onEvent callback, but instead provide separate callbacks for each event type.ParsedEvent type has been renamed to EventSourceMessage and the type attribute has been removed.EventSourceCallback type has been removed in favor of the ParserCallbacks interface.ReconnectInterval type has been removed in favor of providing the interval directly to the onRetry callback.ParseEvent type has been removed in favor of providing separate callbacks for each event type.retry fields now have to be completely valid integers to be parsed.See migration guide: https://github.com/rexxars/eventsource-parser/blob/main/MIGRATE-v3.md
This release is also available on:
Nothing published for this version
include root-level legacy export in published files
BREAKING: minimum node.js version is now v18
This release is also available on:
add field typesVersions in package.json (efcde97), closes #7
publish only source and dist folders
implement and expose EventSourceParserStream class
improve ESM/CJS compatibility, require node 14 or higher
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →