Packages

msw

3.0.7 · 18 Nov 2026MIT36M / weekRepositoryHomepagenpmAtom feed

Your version

0.26.0

26 Jan 2021Where it was published

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.js file. 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)
  • Displays [MSW] Mocking disabled message when calling worker.stop(). (#485, #493).

Bug fixes

  • Fixes an issue that resulted in theFailed 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 the response:bypass invoked 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 ExecutionResult of graphql was not compatible with ctx.data and ctx.errors utilities (#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.