Releases: EventSource/eventsource
Releases · EventSource/eventsource
Release list
v5.0.0
Major Changes
- #349
b195e70Thanks @rexxars! - - BREAKING CHANGE: The client now fails the connection, emitting an error without reconnecting, if the parser buffers 100 MB without receiving a valid, complete EventSource line. Configure a different limit withmaxBufferSize; ideally, servers should emit smaller chunks or newlines more frequently.- BREAKING CHANGE: Node.js 22.12 or later is now required. Older Node.js versions may still work, but are not supported or guaranteed going forward because Node.js 20 is out of LTS.
- BREAKING CHANGE: The separate CommonJS variant is no longer published. Node.js 22.12 and later transparently supports
require()of ESM, so most CommonJS consumers should continue to work. This removes the dual-package hazard. - BREAKING CHANGE: Chrome versions before 84, Safari before 15, Firefox before 105, Edge before 84, and JavaScript environments without private fields, methods, and accessors are no longer supported.
- BREAKING CHANGE: When both an
on*property handler and anaddEventListener()listener are registered for the same event, they now run in registration order instead of always running theon*handler first. Code that relied on the old order can observe a different callback sequence. - Unref reconnection timers where the runtime supports it, so pending reconnects do not keep the process alive.
v4.1.1
Patch Changes
- #351
6127f40Thanks @rexxars! - Allow avalueof any type inReaderLikedone-results. TypeScript 5.9's DOM lib typesReadableStreamDefaultReader.read()'s done-result as{done: true, value: T | undefined}, so a customfetchreturning aResponse-shaped body no longer satisfiedFetchLikeResponseon TypeScript 5.9 and newer, forcing consumers to hand-wrap the reader.
v4.1.0
v4.0.0
4.0.0 (2025-05-13)
⚠ BREAKING CHANGES
FetchLikeInitis now removed. Use
EventSourceFetchInit.- Drop support for Node.js v18, as it is end-of-life.
Features
- require node.js v20 or higher (91a3a48)
Bug Fixes
- drop
FetchLikeInittype. UseEventSourceFetchInitinstead. (6786e46)
This release is also available on: