msw
3.0.7 · 18 Nov 2026MIT36M / weekRepositoryHomepagenpmAtom feed
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
.eventsproperty on the worker/server (#868). - Security
Updates the
@mswjs/interceptorspackage to propagate thexmldomsecurity update (#876).
Release note
Breaking changes
- Breaking
The Life-cycle events are now exposed from the
.eventsproperty on the worker/server (#868).
-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
onUnhandledRequestoption 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
- Security
Updates the
@mswjs/interceptorspackage to propagate thexmldomsecurity update (#876).
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.