Skip to content

Releases: joshmossas/event-source-plus

v0.1.8

05 Nov 15:54
Compare
Choose a tag to compare

What's Changed

  • chore: update dev dependencies and bump pnpm version by @joshmossas in #20
  • feature: add option to customize retry strategy by @joshmossas in #21

Customizing Retry Strategy

Thanks to a suggestion from @alt1o an option has been added to allow you to customize the retry strategy to only retry when an error occurs. This is useful for short lived streams with a fixed length such those commonly used by LLM applications. Currently this option is marked as a beta feature to give time for further testing. For documentation see here

Full Changelog: v0.1.7...v0.1.8

v0.1.7

15 Oct 17:39
Compare
Choose a tag to compare

What's Changed

  • docs: add comments to all of the properties in EventSourcePlusOptions by @joshmossas in #18

Shout out to @sgerke-1L who noticed a missplaced comment intended for the custom fetch option

Full Changelog: v0.1.6...v0.1.7

v0.1.6

08 Oct 16:43
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.1.5...v0.1.6

v0.1.5

08 Oct 03:27
Compare
Choose a tag to compare

What's Changed

  • feature: support injection of custom fetch implementation by @joshmossas in #15 (closes #9)
  • chore: update libs + fix broken integration test by @joshmossas in #16

Full Changelog: v0.1.4...v0.1.5

v0.1.4

27 Sep 07:59
Compare
Choose a tag to compare

What's Changed

  • Upgrade ofetch to v1.4.0
  • Upgrade dev dependencies to latest

Full Changelog: v0.1.3...v0.1.4

v0.1.3

29 Jul 17:35
Compare
Choose a tag to compare

What's Changed

  • Bugfix: handle scenario when "Content-Type" is undefined by @joshmossas in #13

Prevents a potential infinite loop that occurs when the server returns a 200 status code but the Content-Type header is not set (thanks to @PattaBov reporting)

Full Changelog: v0.1.2...v0.1.3

v0.1.2

22 Jul 17:32
Compare
Choose a tag to compare

What's Changed

  • bugfix: add support for \r\n and \r line delimiters by @joshmossas in #11

This gets the event-source-plus parser more compliant with the Server Sent Events specification as outlined in https://html.spec.whatwg.org/multipage/server-sent-events.html#parsing-an-event-stream

Thanks to @teddybee for reporting the issue that led to discovering this bug.

Full Changelog: v0.1.1...v0.1.2

v0.1.1

04 Jun 14:19
Compare
Choose a tag to compare

What's Changed

  • Bugfix: allow undefined values in header object by @joshmossas in #7

Full Changelog: v0.1.0...v0.1.1

v0.1.0

01 Jun 21:26
Compare
Choose a tag to compare

What's Changed

Aync header function support

The header function syntax can now return a promise.

new EventSourcePlus("https://example.com", {
  headers: async () => {
    // this works now
    const token = await getSomeToken();
    return {
      Authorization: token
    }
  }
})

This should help remove boilerplate in places when your authentication library uses async functions to retrieve session tokens, and jwts.

Minor Version Bump

Version is being bumped to 0.1.0 this will allow for patches and bug fixes without it being treated as a breaking change. We'll stay on 0.1.x until a breaking change occurs.