Skip to content

Releases: joshmossas/event-source-plus

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.