Skip to content

Releases: Azure/fetch-event-source

v2.0.1

25 Apr 18:56
Compare
Choose a tag to compare

This release adds support for esmodule imports (see #4).

v2.0.0

25 Dec 23:46
Compare
Choose a tag to compare

This release improves the performance of parsing the response stream and fixes some corner cases to better match the spec.

Changed

  • The id, event, and data fields are now initialized to empty strings, per the spec (they were previously undefined)

  • The onmessage callback is now called for all messages (it was previously triggered only for messages with a data field)

  • If a message contains multiple data fields, they will be concatenated together into a single string. For example, the following message:

    data: Foo
    data:Bar
    data
    data: Baz
    

    will result in { data: 'Foo\nBar\n\nBaz' }

  • If the server sends an id field with an empty value, the last-event-id header will no longer be sent on the next reconnect.

Removed

  • The internal parseStream function has been removed. The parse implementation was previously based on async generators, which required a lot of supporting code in both the typescript-generated polyfill and the javascript engine. The new implementation is based on simple callbacks, which should be much faster.

v1.0.2

27 Nov 20:51
Compare
Choose a tag to compare

Changed

  • Updated examples in readme to fix typos, added more comments.
  • Changed if statements in parse.ts to test for specific values instead of truthy/falsy values.

v1.0.1

18 Nov 19:53
Compare
Choose a tag to compare

Changed

  • Changed the default onOpen validator to allow charset and boundary directives in the content-type (Fixes #1)

v1.0.0

18 Nov 19:52
Compare
Choose a tag to compare

Initial release