Skip to content

Releases: medleyjs/medley

0.13.0

01 Nov 03:00
v0.13.0
95b2032
Compare
Choose a tag to compare

BREAKING CHANGES

  • Replace find-my-way with @medley/router (14083c5)
    • The path formats specific to find-my-way are no longer supported
    • The maxParamLength and ignoreTrailingSlash options have been removed (only strict routing is supported now)
  • Rename "Decorators" to "Extensions" (c49bddb)
    • This changes the following method names:
      • app.decorate() => app.extend()
      • app.decorateRequest() => app.extendRequest()
      • app.decorateResponse() => app.extendResponse()

New Features

  • Add support for routes with an optional param or wildcard (fceabb3)
  • For optional param routes, also register a route with the trailing / (3097288)

Polish

  • Ensure that req.params always includes the property for optional params/wildcards (da290c2)

Dependencies

Documentation

  • Add link to the @medley/etag plugin (b3798de)
  • Improve Medley.md docs and move benchmarking docs (3bbd8fb)
  • Remove the "Routes Prefixing" section from Routes.md (d6d5041)

0.12.1

01 Nov 02:33
v0.12.1
e94724b
Compare
Choose a tag to compare

New Features

  • Expose res.headers property (4832bcb)

Polish

  • Refer to the response data as the "body" instead of the "payload" (7c0a859)

0.12.0

30 Jun 05:15
v0.12.0
56a6e47
Compare
Choose a tag to compare

BREAKING CHANGES

  • Remove plugin dependency-checking functionality (3700c73)
    • Plugin dependencies are no longer checked. The plugin meta property is no longer useful.
  • Remove Body Parser (fad9cf0)
    • Removed the app.addBodyParser() method and all built-in body-parsing functionality
  • Remove global preHandler hooks (8efd5b1)
    • "preHandler" now only refers to route-level hooks
  • Async hooks must return false when sending a response (2a51d74)
  • Replace custom error handlers with onError hooks (a4d1655)
    • The app.setErrorHandler() function has been removed
    • Errors now also affect the request lifecycle differently
    • The onStreamError option has been replaced with onErrorSending
  • Only create an HTTP server when app.listen() is called (098106d)
    • app.server will be null until app.listen() is called (unless a server was passed to Medley with the server option)
  • Replace app.setNotFoundHandler() with notFoundHandler option (4a36b13)
  • Remove res.route and make the route config directly accessible as res.config (cb8e63e)
  • Make res.config the exact value as the config option passed to app.route() (82a5250)
    • config no longer defaults to an empty object

New Features

  • Add app.handler property (fa47137)
  • Allow using a custom server instance when creating an app (d5689fc)

Improvements

  • Pass load error to all onLoad callbacks/promises (a6f7ca5)
  • Make app.listen() more like Node's server.listen() (0b63786)

Misc

0.11.0

19 Jun 04:32
v0.11.0
90d9221
Compare
Choose a tag to compare

BREAKING CHANGES

  • ci: Stop testing on Node 11, start testing on Node 12 (227b229)
  • Remove app.inject() and related docs (53fc63e)

Dependencies

Polish

  • Refactor Hooks class (5c21f2a)
  • load: Remove confusing return statements (8990a5a)
  • Don't try to support the CONNECT method (7c4ed3c)
  • Remove code that handles invalid Content-Length headers (8b4d3b6)
  • Remove unnecessary helper for requiring the http2 module (4404882)

Documentation

  • Update docs related to HTTP/2 (f116b0a)

0.10.0

08 Jan 04:18
v0.10.0
3352277
Compare
Choose a tag to compare

Breaking Changes

  • Sub-apps no longer inherit hooks, body parsers, and app decorators added after their creation (b39c7a3)
  • Replace app.encapsulate() with app.createSubApp() (c90de52)
  • Drop support for Node 6 (f8444cf)
  • Remove app.routesToString() method (81b19b7)

New Features

Bugfixes

  • Stop setting res.route to null before the onFinished hooks (d3dc418)

Internal

0.9.0

26 Nov 04:30
v0.9.0
dcbb19e
Compare
Choose a tag to compare

Breaking Changes

  • Rename req.pathname to req.path (178e692)
  • Remove non-HTTP shorthand methods (2f2f1d8)
  • Remove url as an alias for the path option in app.route() (354fd55)
  • Do not run the body parser for requests that did not match a route (ac7cd04)
  • Throw if .setNotFoundHandler() is called on a sub-app created without a prefix (611848a)

New Features

  • Add req.search property (0da0bfe)

Misc

0.8.0

23 Oct 01:25
v0.8.0
20cd75e
Compare
Choose a tag to compare

Breaking Changes

  • Rename beforeHandler route option to preHandler (5051129)

Enhancements

  • app: Use localhost as the default .listen() host (41bf55b)

Misc

0.7.0

09 Jul 04:59
v0.7.0
ed7a5aa
Compare
Choose a tag to compare

Breaking Changes

  • Only parse an OPTIONS request body if the headers indicate there is a body (162625c)

Dependencies

Misc

  • Simplify server listen code (4cbf13c)
  • docs: Improve plugin docs and mark plugin dependency-checking as "Experimental" (efc3c94)

0.6.0

01 May 20:41
v0.6.0
8a102cd
Compare
Choose a tag to compare

Breaking Changes

  • Replace app.printRoutes() with app.routesToString() and add app[@@iterator]() (3e8a0f4)
  • Sort method names alphabetically in Allow headers (ba78b1a)
  • Send a body with 405 responses (77a6d4f)

Features

Dependencies

0.5.0

12 Apr 18:57
v0.5.0
5c0d3b6
Compare
Choose a tag to compare

Breaking Changes

  • Rename app.use() to app.encapsulate() (df488fa)
  • Rename app.registerPlugin() to app.register() (908275f)
  • Do not send 5xx error messages to the client in production (9f81046)
    • This only applies to the default error handler