v0.40.0 (2022-05-17)
Breaking changes
- Returning
undefined
, or early returns, from response resolvers, now does not perform request as-is, and is instead treated as a handler that didn't do anything. Please returnreq.passthrough()
if you wish to bypass a request.
rest.get('/resource', (req, res, ctx) => {
// I want to perform this intercepted request as-is.
- return
+ return req.passthrough()
})
Features
- add "unhandledException" life-cycle event (#1199) (5c90799)
- improve PathParams type to support interface (#1219) (b70266f)
- rename "DefaultRequestBody" to "DefaultBodyType" (53aa3a1)
- add "req.passthrough" (#1204) (4e1b1ad)
- add service worker scope and worker script URL to "Mocking enabled" message (#1172) (ab3d399)
- set "typescript" optional peer dependency to 4.2.x (#985) (b1004a6)