Skip to content

Releases: toverux/expresse

v2.4.0

12 Feb 22:43
Compare
Choose a tag to compare

2.4.0 (2018-02-12)

Features

  • sse_handler_middleware: add flushHeaders option, and use proper headers flushing technique (918bacf)
export interface ISseMiddlewareOptions {
    // ...

    /**
     * Whether to flush headers immediately or wait for the first res.write().
     *  - Setting it to false can allow you or 3rd-party middlewares to set more headers on the response.
     *  - Setting it to true is useful for debug and tesing the connection, ie. CORS restrictions fail only when headers
     *    are flushed, which may not happen immediately when using SSE (it happens after the first res.write call).
     *
     * @default true
     */
    flushHeaders: boolean;

    // ...
  • sse_handler_middleware: heartbeats can now be disabled (dd5a628)
export interface ISseMiddlewareOptions {
    /**
     * Determines the interval, in milliseconds, between keep-alive packets (neutral SSE comments).
+     * Pass false to disable heartbeats (ie. you only support modern browsers/native EventSource implementation and
+     * therefore don't need heartbeats to avoid the browser closing an inactive socket).
     *
     * @default 5000
     */
-    keepAliveInterval: number;
+    keepAliveInterval: false | number;

v2.3.0

11 Feb 16:38
Compare
Choose a tag to compare

2.3.0 (2018-02-11)

Features

  • support for expressjs/compression, add flushAfterWrite option (6ba8c46)

v2.2.0

18 Aug 22:30
Compare
Choose a tag to compare

<a name"2.2.0">

2.2.0 (2017-08-18)

Bug Fixes

  • sse_hub_middleware: also handle request 'finish' event (bb4996e8)

Features

  • *: add RedisHub for Redis support with sseHub() (08827592)
  • hub: Hub.clients becomes protected readonly (was private) (87dd59ae)

v2.1.0

21 Jun 10:10
Compare
Choose a tag to compare

<a name"2.1.0">

2.1.0 (2017-06-21)

Features

  • sse_handler_middleware: add 'X-Accel-Buffering: no' to better support nginx (0824582c)

v2.0.1

01 Jun 09:21
Compare
Choose a tag to compare

<a name"2.0.1">

2.0.1 (2017-06-01)

Bug Fixes

  • sse_handler_middleware: also stop handshakes when the server closes the connection (06e0722e)

v2.0.0

28 May 23:08
Compare
Choose a tag to compare

<a name"2.0.0">

2.0.0 (2017-05-28)

Bug Fixes

  • sse_handler_middleware: detach event listener on connection close with once() (0fa831f5)

Features

  • *: add the sseHub() middleware and the Hub class (2e7e812f)
  • sse_middleware:
    • SSE functions are void now (1d6c99bd)
    • cleaner interface (req.sse becomes a collection of functions) (0ebcb3ca)

Breaking Changes

  • This is a breaking change in the public interface. Also, two interfaces (ISSECapableResponse and ISSEMiddlewareOptions) have been renamed (respectively ISseResponse and and ISseMiddlewareOptions)
    (0ebcb3ca)

v1.0.1

19 May 20:35
Compare
Choose a tag to compare

1.0.1 (2017-05-19)

Bug Fixes

  • package: set express peerDep at ">=4.0.0" instead of a precise maj.min.fix (6a4b56c1)

v1.0.0

18 May 16:45
Compare
Choose a tag to compare

1.0.0 (2017-05-18)

Bug Fixes

  • package: npm publish with public access (4e0a4cc1)
  • sse_formatter: data is now mandatory (browsers ignore data-less messages) (eb9a0f06)

Features

  • sse_formatter: add sse_formatter module that makes SSE messages (eedd03b2)
  • sse_middleware:
    • make sse_middleware useable (cc3421f8)
    • sse() can now take options (for now, only keepAliveInterval) (b6655048)
  • sse_middlewares: implement a middleware that configures the response for SSE (6bed4f47)