Releases: mswjs/msw
Releases Β· mswjs/msw
v2.3.5
v2.3.5 (2024-08-02)
Bug Fixes
- HttpResponse: skip setting "Content-Length" if it is already set (#2228) (a0234c9) @kettanaito
v2.3.4
v2.3.3
v2.3.3 (2024-07-23)
Bug Fixes
- implement cookie persistence using
tough-cookie
(#2206) (c30613c) @kettanaito - support async generators as response resolvers (#2108) (d38fc3d) @kettanaito @jakebailey
v2.3.2
v2.3.2 (2024-07-19)
Bug Fixes
- support [email protected] (deprecate v4.7) (#2190) (7df2533) @KaiSpencer @kettanaito
v2.3.1
v2.3.1 (2024-06-01)
Bug Fixes
- preserve trailing optional path parameters (#2169) (e69bbd6) @kettanaito @KaiSpencer
v2.3.0
v2.3.0 (2024-05-08)
Warning
This release changes how MSW treats unhandled exceptions in response resolvers. Previously, they were treated as request errors. Starting with this release, unhandled resolver exceptions will be coerced to 500 Unhandled Exception
mocked error responses produced by the library. Please note that you must not intentionally throw errors in your resolvers. Please use Response.error()
to mock request/network errors. Unhandled exceptions are considered unintended and will be treated as if they happen on the actual server.
Features
- treat unhandled exceptions in handlers as 500 error responses (#2135) (5191399) @kettanaito
- prioritize the
node
export when importingmsw/node
(#2134, transitively through @mswjs/interceptors). - add a new
unhandledException
event (#2135, docs).
server.events.on('unhandledException', ({ request, error }) => {
console.log('%s %s errored! See details below.', request.method, request.url)
console.error(error)
})
Bug Fixes
- Disposable: make the ".dispose()" method synchronous (#2144) (686d3d6) @kettanaito
v2.2.14
v2.2.14 (2024-04-17)
Bug Fixes
- preserve search params in "onUnhandledRequest" messages (#2128) (64bcae7) @nagadevkrishna @kettanaito
- give
node
export condition higher priority (#2134) (f948d13) @phryneas
v2.2.13
v2.2.13 (2024-03-27)
Bug Fixes
- use
createRequestId()
instead ofcrypto.randomUUID()
(#2113) (8f2be77) @kettanaito
v2.2.12
v2.2.12 (2024-03-27)
Bug Fixes
- do not mutate user-defined "X-Request-Id" request header (#2110) (64b6ba5) @kettanaito
v2.2.11
v2.2.11 (2024-03-26)
Bug Fixes
- accept a narrower response body type by default (#2107) (d35ef92) @kettanaito