Releases: medleyjs/medley
Releases · medleyjs/medley
0.13.0
BREAKING CHANGES
- Replace
find-my-way
with@medley/router
(14083c5)- The path formats specific to
find-my-way
are no longer supported - The
maxParamLength
andignoreTrailingSlash
options 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.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
0.12.0
BREAKING CHANGES
- Remove plugin dependency-checking functionality (3700c73)
- Plugin dependencies are no longer checked. The plugin
meta
property 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
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 withonErrorSending
- The
- Only create an HTTP server when
app.listen()
is called (098106d)app.server
will benull
untilapp.listen()
is called (unless a server was passed to Medley with theserver
option)
- Replace
app.setNotFoundHandler()
withnotFoundHandler
option (4a36b13) - Remove
res.route
and make the route config directly accessible asres.config
(cb8e63e) - Make
res.config
the exact value as theconfig
option passed toapp.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'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: [email protected] (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
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
queryParser
option to set the default query string parser (fceb5b9)
Bugfixes
- Stop setting
res.route
tonull
before the onFinished hooks (d3dc418)
Internal
- lib: Use symbols for private Request and Response properties (754675d)
- deps: [email protected] (d8aa42f)
0.9.0
Breaking Changes
- Rename
req.pathname
toreq.path
(178e692) - Remove non-HTTP shorthand methods (2f2f1d8)
- Remove
url
as an alias for thepath
option 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.search
property (0da0bfe)
Misc
- ci: Test on Node 11 (3edb3a6)
- deps: [email protected] (99f44f3)
0.8.0
0.7.0
Breaking Changes
- Only parse an OPTIONS request body if the headers indicate there is a body (162625c)
Dependencies
- deps: [email protected] (78e6b5f)
- deps: Lock down [email protected] (3b3052c)
Misc
0.6.0
Breaking Changes
- Replace
app.printRoutes()
withapp.routesToString()
and addapp[@@iterator]()
(3e8a0f4) - Sort method names alphabetically in
Allow
headers (ba78b1a) - Send a body with 405 responses (77a6d4f)
Features
- Node 10 support (43d3a6e, bebce67, 5042497)
- Improve error message when route
method
is missing (b9d464f)
Dependencies
- deps: [email protected] (f4b8cf0)
- deps: Lock down [email protected] (c630b0d)