diff --git a/.changeset/lasteventid-persists-without-id.md b/.changeset/lasteventid-persists-without-id.md deleted file mode 100644 index ba07d7a..0000000 --- a/.changeset/lasteventid-persists-without-id.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'eventsource': patch ---- - -Fixed `MessageEvent.lastEventId` being empty when a message omits the id field - -The `lastEventId` attribute is the last event ID string of the event source, so an explicit `id` field persists until another one replaces it. Message events were dispatched with the current event's own `id` instead of that buffer, which left `lastEventId` empty on every event that omitted `id`, even though the buffer still held the earlier value and would have been sent as `Last-Event-ID` on reconnect. diff --git a/.changeset/persist-ids-from-data-less-blocks.md b/.changeset/persist-ids-from-data-less-blocks.md deleted file mode 100644 index bdbe05f..0000000 --- a/.changeset/persist-ids-from-data-less-blocks.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'eventsource': patch ---- - -Fixed ID-only event blocks not updating `MessageEvent.lastEventId` or `Last-Event-ID` on reconnect. diff --git a/CHANGELOG.md b/CHANGELOG.md index 298761e..4bea562 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # 📓 Changelog +## 5.1.1 + +### Patch Changes + +- [#358](https://github.com/EventSource/eventsource/pull/358) [`de3c0ae`](https://github.com/EventSource/eventsource/commit/de3c0ae75bfffea4f5862950c386b3ddd6e3e64c) Thanks [@pacocartones](https://github.com/pacocartones)! - Fixed `MessageEvent.lastEventId` being empty when a message omits the id field + + The `lastEventId` attribute is the last event ID string of the event source, so an explicit `id` field persists until another one replaces it. Message events were dispatched with the current event's own `id` instead of that buffer, which left `lastEventId` empty on every event that omitted `id`, even though the buffer still held the earlier value and would have been sent as `Last-Event-ID` on reconnect. + +- [`17a9772`](https://github.com/EventSource/eventsource/commit/17a97722ed3f06920e931b627b9ef86752be165f) Thanks [@rexxars](https://github.com/rexxars)! - Fixed ID-only event blocks not updating `MessageEvent.lastEventId` or `Last-Event-ID` on reconnect. + ## 5.1.0 ### Minor Changes diff --git a/package-lock.json b/package-lock.json index 960da29..cd90f02 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "eventsource", - "version": "5.1.0", + "version": "5.1.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "eventsource", - "version": "5.1.0", + "version": "5.1.1", "license": "MIT", "dependencies": { "eventsource-parser": "^4.1.0" diff --git a/package.json b/package.json index 764c86b..a2834da 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "eventsource", - "version": "5.1.0", + "version": "5.1.1", "description": "WhatWG/W3C compliant EventSource client for Node.js and browsers", "keywords": [ "eventsource",