Skip to content
This repository was archived by the owner on Sep 13, 2023. It is now read-only.

Releases: Banno/node-mock-rest-middleware

v2.3.1

Choose a tag to compare

@eheikes eheikes released this 01 Aug 16:49

Misc

  • Add TravisCI config.
  • Bump ux-lint to 1.7.x.

v2.3.0

Choose a tag to compare

@eheikes eheikes released this 13 Sep 20:24
  • Allow arbitrary HTTP headers in the response (#16)
  • Add test-mock-server script (#14)
  • Add a few more tips to README (#13)
  • Use ux-lint from the npm registry (9812e35)

v2.2.2

Choose a tag to compare

@eheikes eheikes released this 11 Jul 19:39

Fixes #9: Reset only uses & performs shallow clone.

v2.2.1

Choose a tag to compare

@eheikes eheikes released this 08 Jul 14:50

v2.2.0

Choose a tag to compare

@eheikes eheikes released this 07 Jul 16:27

v2.1.0

Choose a tag to compare

@eheikes eheikes released this 07 Jun 17:12

Added /_reset endpoint (see documentation).

v2.0.0

Choose a tag to compare

@eheikes eheikes released this 18 May 20:11

New Features

  • A custom Content-Type header can now be set in the responses.
  • Added some logging (toggled with logger.enable() and logger.disable()).
  • Added collectionKey, countKey, limitParam, offsetParam, and queryParam options.
  • Added support for overriding the MiddlewareRule handlers entirely (using the handler callback).
  • Added query parameters for sorting collection results.
  • Requests can now use a form body (application/x-www-form-urlencoded).
  • Added support for PUT /example.
  • Added support for DELETE /example.

Breaking Changes

  • The original query parameters are now passed to the postfilter callbacks, rather than the prefilter-ed parameters.
  • Middleware.prototype.addResource() now returns the new rule, rather than the middleware instance.
  • Default (fallthrough) middleware now logs a message and continues to the next middleware, rather than returning a 404 response.
  • The prefilter and postfilter callbacks can't be passed in a constructor option anymore; they can be changed after the rule is created.

Bug Fixes

  • Added missing prefilter call to MiddlewareRule.prototype.replaceItem().

v1.0.0

Choose a tag to compare

@eheikes eheikes released this 14 Apr 20:53

Initial release.