Releases: medleyjs/medley
Releases · medleyjs/medley
0.13.0
BREAKING CHANGES
- Replace
find-my-waywith@medley/router(14083c5)- The path formats specific to
find-my-wayare no longer supported - The
maxParamLengthandignoreTrailingSlashoptions have been removed (only strict routing is supported now)
- The path formats specific to
- Rename "Decorators" to "Extensions" (c49bddb)
- This changes the following method names:
app.decorate()=>app.extend()app.decorateRequest()=>app.extendRequest()app.decorateResponse()=>app.extendResponse()
- This changes the following method names:
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.paramsalways includes the property for optional params/wildcards (da290c2)
Dependencies
- end-of-stream@1.4.4 (9c8ca98)
Documentation
- Add link to the
@medley/etagplugin (b3798de) - Improve Medley.md docs and move benchmarking docs (3bbd8fb)
- Remove the "Routes Prefixing" section from Routes.md (d6d5041)
0.12.1
0.12.0
BREAKING CHANGES
- Remove plugin dependency-checking functionality (3700c73)
- Plugin dependencies are no longer checked. The plugin
metaproperty is no longer useful.
- Plugin dependencies are no longer checked. The plugin
- Remove Body Parser (fad9cf0)
- Removed the
app.addBodyParser()method and all built-in body-parsing functionality
- Removed the
- Remove global
preHandlerhooks (8efd5b1)- "preHandler" now only refers to route-level hooks
- Async hooks must return
falsewhen sending a response (2a51d74) - Replace custom error handlers with
onErrorhooks (a4d1655)- The
app.setErrorHandler()function has been removed - Errors now also affect the request lifecycle differently
- The
onStreamErroroption has been replaced withonErrorSending
- The
- Only create an HTTP server when
app.listen()is called (098106d)app.serverwill benulluntilapp.listen()is called (unless a server was passed to Medley with theserveroption)
- Replace
app.setNotFoundHandler()withnotFoundHandleroption (4a36b13) - Remove
res.routeand make the route config directly accessible asres.config(cb8e63e) - Make
res.configthe exact value as theconfigoption passed toapp.route()(82a5250)configno longer defaults to an empty object
New Features
- Add
app.handlerproperty (fa47137) - Allow using a custom server instance when creating an app (d5689fc)
Improvements
- Pass load error to all
onLoadcallbacks/promises (a6f7ca5) - Make
app.listen()more like Node'sserver.listen()(0b63786)
Misc
- Make the
res.[get|set|has|append|remove]Header()methods canonical (9baf2b9)- The short forms are now the aliases
- docs: Improve Routes documentation (2c84dc5)
- deps: find-my-way@2.1.0 (ba4a2cb)
0.11.0
BREAKING CHANGES
- ci: Stop testing on Node 11, start testing on Node 12 (227b229)
- Remove
app.inject()and related docs (53fc63e)
Dependencies
- find-my-way@2.0.1 (f1053b4)
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
Breaking Changes
- Sub-apps no longer inherit hooks, body parsers, and app decorators added after their creation (b39c7a3)
- Replace
app.encapsulate()withapp.createSubApp()(c90de52) - Drop support for Node 6 (f8444cf)
- Remove
app.routesToString()method (81b19b7)
New Features
- Add
queryParseroption to set the default query string parser (fceb5b9)
Bugfixes
- Stop setting
res.routetonullbefore the onFinished hooks (d3dc418)
Internal
0.9.0
Breaking Changes
- Rename
req.pathnametoreq.path(178e692) - Remove non-HTTP shorthand methods (2f2f1d8)
- Remove
urlas an alias for thepathoption inapp.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.searchproperty (0da0bfe)
Misc
0.8.0
0.7.0
Breaking Changes
- Only parse an OPTIONS request body if the headers indicate there is a body (162625c)
Dependencies
Misc
0.6.0
Breaking Changes
- Replace
app.printRoutes()withapp.routesToString()and addapp[@@iterator]()(3e8a0f4) - Sort method names alphabetically in
Allowheaders (ba78b1a) - Send a body with 405 responses (77a6d4f)
Features
- Node 10 support (43d3a6e, bebce67, 5042497)
- Improve error message when route
methodis missing (b9d464f)