msw
3.0.7 · 18 Nov 2026MIT36M / weekRepositoryHomepagenpmAtom feed
0.49.3 is the newest release of 0.26.x.
In short
3 new4 fixed2 internal
Release note
This release introduces changes to the
mockServiceWorker.jsfile. Please follow the instructions in the browser to update the worker file. Thank you.
Features
Adds support for GraphQL upload and multipart data operations (#215, #543).
Adds delay modes: “real” and “infinite” (#538). Supports infinite loading.
ctx.delay() // random realistic response time
ctx.delay('real') // the same as `ctx.delay()`
ctx.delay('infinite') // infinite response time
ctx.delay(50) // explicit response delay (50ms)Bug fixes
Fixes an issue that resulted in the
Failed to construct 'Response': The status provided (0) is outside the range [200, 599].exception caused by an opaque response on the page (#529, #564). MSW will now skip opaque responses during the life-cycle events handling. You will not get theresponse:bypassinvoked upon an opaque response.Fixes an issue that resulted in an exception being thrown when handling subsequent requests in Safari (#558, #565).
Fixes an issue when the
ExecutionResultofgraphqlwas not compatible withctx.dataandctx.errorsutilities (#522, #542).Fixes an issue that resulted in the MSW worker handling unrelated message event originating from other tools (#551).
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.