Skip to content

Commit 07d564b

Browse files
chore(release): 3.0.0 [skip ci]
1 parent c544729 commit 07d564b

File tree

3 files changed

+20
-3
lines changed

3 files changed

+20
-3
lines changed

CHANGELOG.md

+17
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,23 @@
55
All notable changes to this project will be documented in this file. See
66
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
77

8+
## [3.0.0](https://github.com/rexxars/eventsource-parser/compare/v2.0.1...v3.0.0) (2024-10-19)
9+
10+
### ⚠ BREAKING CHANGES
11+
12+
- 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` callback, but instead provide separate callbacks for each event type.
13+
- The `ParsedEvent` type has been renamed to `EventSourceMessage` and the `type` attribute has been removed.
14+
- The `EventSourceCallback` type has been removed in favor of the `ParserCallbacks` interface.
15+
16+
BREAKING CHNAGE: The `ReconnectInterval` type has been removed in favor of providing the interval directly to the `onRetry` callback.
17+
18+
- The `ParseEvent` type has been removed in favor of providing separate callbacks for each event type.
19+
- 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.
20+
21+
### Features
22+
23+
- provide `onError`, `onComment`, and `onRetry` callbacks ([#15](https://github.com/rexxars/eventsource-parser/issues/15)) ([c544729](https://github.com/rexxars/eventsource-parser/commit/c54472901ddf0674b38deb164013feade31d9869))
24+
825
## [2.0.1](https://github.com/rexxars/eventsource-parser/compare/v2.0.0...v2.0.1) (2024-08-07)
926

1027
### Bug Fixes

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eventsource-parser",
3-
"version": "2.0.1",
3+
"version": "3.0.0",
44
"description": "Streaming, source-agnostic EventSource/Server-Sent Events parser",
55
"sideEffects": false,
66
"type": "module",

0 commit comments

Comments
 (0)