Packages

msw

3.0.7 · 18 Nov 2026MIT36M / weekRepositoryHomepagenpmAtom feed

Your version

0.35.0

21 Aug 2021Where it was published

0.49.3 is the newest release of 0.35.x.

In short

1 breaking1 security1 new1 fixed

  • Breaking

    The Life-cycle events are now exposed from the .events property on the worker/server (#868).

  • Security

    Updates the @mswjs/interceptors package to propagate the xmldom security update (#876).

Release note

Breaking changes

-worker.on('request:start', listener)
+worker.events.on('request:start', listener)

-server.on('response:mocked', listener)
+server.events.on('response:mocked', listener)

Features

  • Life-cycle events now support .removeListener() and .removeAllListeners() methods (#868).

// Removes all life-cycle event listeners you've attached to this server instance.
server.events.removeAllListeners()
  • The "error" strategy of the onUnhandledRequest option now throws an exception to halt running tests (#856).

Bug fixes

  • Fixes an issue where a request handler with parenthesis in the URL wouldn't match an otherwise matching request (#857).

Security

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.