All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.
3.0.0 (2024-10-19)
- 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 theonEvent
callback, but instead provide separate callbacks for each event type. - The
ParsedEvent
type has been renamed toEventSourceMessage
and thetype
attribute has been removed. - The
EventSourceCallback
type has been removed in favor of theParserCallbacks
interface.
BREAKING CHNAGE: The ReconnectInterval
type has been removed in favor of providing the interval directly to the onRetry
callback.
- The
ParseEvent
type has been removed in favor of providing separate callbacks for each event type. - The parser has been rewritten to be more specification compliant. Certain rare edge cases may now be handled differently. Mixed CRLF and LF line endings will now be handled correctly.
retry
fields now have to be completely valid integers to be parsed.
2.0.1 (2024-08-07)
- include root-level legacy export in published files (c814b4b)
2.0.0 (2024-08-07)
- BREAKING: minimum node.js version is now v18
1.1.2 (2024-02-13)
1.1.1 (2023-09-20)
- publish only source and dist folders (af08bcb)
1.1.0 (2023-09-20)
- implement and expose
EventSourceParserStream
class (aac9c6f)
- exclude pattern for tests (04fc73e)
1.0.0 (2023-03-23)
- improve ESM/CJS compatibility, require node 14 or higher
- improve ESM/CJS compatibility, require node 14 or higher (26d630e)