Changelog

Last updated 3 days ago

1.0.0-rc.1 - 2018-08-14

Breaking changes

  • Changed httpListener error handler attribute from errorMiddleware ๐Ÿ‘‰ errorEffect. There was an inconsistency with previous error handler definition and naming. We had to correct this because error handler acts as an Effect instead of Middleware.

old bootstrapping API:

const app = httpListener({
middlewares,
effects,
errorMiddleware, ๐Ÿ‘ˆ
});

new bootstrapping API:

const app = httpListener({
middlewares,
effects,
errorEffect, ๐Ÿ‘ˆ
});

Whats new?

  • Exposed res.send method - from now you don't have to send response manually via dedicated Node.js http.OutgoingMessage API. The res.send method returns an empty stream, thus it can be easily composed inside middleware pipeline.

const middleware$: Middleware = (req$, res) =>
req$.pipe(
switchMap(() => res.send({ body: ๐Ÿ’ฉ, status: 304, headers: /* ... */ }),
);
  • Exposed type aliases for common Marble.js architectural blocks:

const effect$: Effect = req$ =>
req$.pipe(
// ...
);
โ€‹
const middleware$: Middleware = (req$, res) =>
req$.pipe(
// ...
);
โ€‹
const error$: ErrorEffect = (req$, res, err) =>
req$.pipe(
// ...
);

1.0.0-rc.0 - 2018-07-07

pre-release

Breaking changes

  • In order to factorize the routing table statically, we need to introduce the breaking change in Effect API definition.

Old Effect API:

const getUsers$: Effect = request$ =>
request$.pipe(
matchPath('/'),
matchType('GET'),
// ...
);

New Effect API:

const getUsers$ = EffectFactory
.matchPath('/')
.matchType('GET')
.use(req$ => req$.pipe(
// ...
));
  • separately imported matchPath and matchType stream operators are removed and are part of EffectFactory instead.

Whats new?

  • @marblejs/core - internals - refactored + rebuilt routing resolving mechanism. Thanks to the latest changes we gained hudge performance boost.

  • @marblejs/core - internals - improved performance for middleware resolving flow

  • @marblejs/core - internals - rewritten URL params intercepting mechanism

  • @marblejs/middleware-body - added support for x-www-form-urlencoded Content-Type

0.5.0 - 2018-06-13

pre-release

Fixes

  • corrected @marblejs/middleware-logger response time logging (issue: #48)

Features

  • combineRoutes() API allows to compose middlewares for grouped routes (feature request: #36) (see docs)

0.4.2 - 2018-06-10

pre-release

Fixes

  • fixed an issue with not matched routes in case of reordered matchType and matchPathoperators for the same routes but with different methods (PR #46)

0.4.1 - 2018-06-03

pre-release

Fixes

  • resolved an issue with TypeScript compiler flag responsible for strict function types (issue: #43)

  • added support for TypeScript v2.9.1

0.4.0 - 2018-05-31

pre-release

Fixes

  • fixed an issue with Effects matching hazard (issue: #35)

Features

  • ability to create 404 handlers using matchType('*') and matchPath('*') (issue: #27)

  • HttpError constructor now can take data: object as optional third argument

0.3.2 - 2018-05-29

pre-release

Fixes

  • support for non-JSON Effect return types (issue: #33)

  • mime-type / content-type auto detection

Thanks @couzic!

0.3.1 - 2018-05-27

pre-release

Fixes

  • corrected peerDependency versions for @marblejs/* packages

0.3.0 - 2018-05-27

pre-release

Features

  • added support for intercepting path parameters req.params (see: Routing chapter)

  • added support for intercepting query parameters req.query (see: Routing chapter)

  • ability to compose middlewares inside Effect request pipeline via use operator (see: Middlewares chapter)

  • new middleware @marblejs/middleware-joi - a Joi validation middleware

  • minor bugfixes and code improvements

Breaking changes

  • moved bodyParser$ and logger$ middleware outside @marblejs/core to separete@marblejs/middleware-body and @marblejs/middleware-logger packages

0.2.x - 2018-05-14

pre-release

Initial pre-release version

โ€‹