Releases: mswjs/interceptors
Releases · mswjs/interceptors
v0.34.3
v0.34.3 (2024-08-13)
Bug Fixes
- ClientRequest: use
urlToHttpOptions
fromnode:url
(#618) (5a591ab) @kettanaito - XMLHttpRequest: calculate
total
length of response body (#616) (0c0a4f1) @kettanaito @abhishekpaturkar
v0.34.2
v0.34.2 (2024-08-09)
Bug Fixes
- XMLHttpRequest: support request
upload
events (#613) (472bcbe) @kettanaito
v0.34.1
v0.34.1 (2024-08-06)
Bug Fixes
- WebSocket: use 1011 as close
code
for unhandled interceptor errors (#612) (42daf43) @kettanaito - WebSocket: set
wasClean
totrue
on normal connection closures (#611) (94a390c) @kettanaito - WebSocket: treat interceptor exceptions as closures with error (#609) (ca522a3) @kettanaito
v0.34.0
v0.34.0 (2024-08-01)
Features
- add
FetchInterceptor
to thenode
preset (#603) (d679a4d) @mikicho @kettanaito - WebSocket: support passthrough, correctly emit the
error
event (#608) (5d9d71e) @kettanaito
v0.33.3
v0.33.3 (2024-07-31)
Bug Fixes
- WebSocket: emit "error" event on
server
connection errors (#607) (67aebe5) @kettanaito
v0.33.2
v0.33.2 (2024-07-24)
Bug Fixes
- support lowercase HTTP request methods (#605) (83e4b95) @mikicho @kettanaito
v0.33.1
v0.33.1 (2024-07-12)
Bug Fixes
- ClientRequest: improve rawHeaders recording (#602) (5135505) @mikicho @kettanaito
v0.33.0
v0.33.0 (2024-07-11)
Warning
This release contains BREAKING CHANGES.
⚠️ BREAKING CHANGES
request.respondWith()
has been deprecated in favor ofcontroller.respondWith()
interceptor.on('request',
- ({ request }) => request.respondWith(new Response()),
+ ({ controller }) => controller.respondWith(new Response())
The request
instance exposed in the listener arguments is a raw, unmodified Fetch API Request
instance representing the intercepted request.
Features
- implement a
RequestController
class (#595) (73dd07a) @kettanaito - support for erroring requests using
controller.errorWith(error)
v0.32.2
v0.32.2 (2024-07-11)
Bug Fixes
- ClientRequest: support "rawHeaders" in Fetch API Headers (#598) (4660558) @kettanaito @mikicho
v0.32.1
v0.32.1 (2024-07-06)
Bug Fixes
- ClientRequest: destroy socket when destroying IncomingMessage (#597) (8f041da) @kettanaito
- ClientRequest: use
ServerResponse
to build the HTTP response string (#596) (fedac45) @mikicho @kettanaito