From 07d564bdf6e5ae32457030881179ff2f6408c93e Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Sat, 19 Oct 2024 22:09:09 +0000 Subject: [PATCH] chore(release): 3.0.0 [skip ci] --- CHANGELOG.md | 17 +++++++++++++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3696ed3..276d3f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,23 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [3.0.0](https://github.com/rexxars/eventsource-parser/compare/v2.0.1...v3.0.0) (2024-10-19) + +### ⚠ BREAKING CHANGES + +- 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. +- The `ParsedEvent` type has been renamed to `EventSourceMessage` and the `type` attribute has been removed. +- The `EventSourceCallback` type has been removed in favor of the `ParserCallbacks` 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. + +### Features + +- provide `onError`, `onComment`, and `onRetry` callbacks ([#15](https://github.com/rexxars/eventsource-parser/issues/15)) ([c544729](https://github.com/rexxars/eventsource-parser/commit/c54472901ddf0674b38deb164013feade31d9869)) + ## [2.0.1](https://github.com/rexxars/eventsource-parser/compare/v2.0.0...v2.0.1) (2024-08-07) ### Bug Fixes diff --git a/package-lock.json b/package-lock.json index dc10b67..eab4fea 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "eventsource-parser", - "version": "2.0.1", + "version": "3.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "eventsource-parser", - "version": "2.0.1", + "version": "3.0.0", "license": "MIT", "devDependencies": { "@sanity/pkg-utils": "^6.11.4", diff --git a/package.json b/package.json index f1e4e58..4176dcb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "eventsource-parser", - "version": "2.0.1", + "version": "3.0.0", "description": "Streaming, source-agnostic EventSource/Server-Sent Events parser", "sideEffects": false, "type": "module",