Never miss a release that matters
AI-powered summaries of every GitHub release.
AI Summaries
Changelogs condensed into clear, actionable insights.
Always Free
Track up to 5 packages at no cost, forever.
Weekly Digest
A curated summary of every release, delivered weekly.
TL;DR
Mock Service Worker now includes a finalize API for handler cleanup, resolving potential memory leaks and improving stability when using network interception (HTTP request mocking).
Fixes Worth Knowing
Resolved several WebSocket (real-time communication) related memory leaks, specifically when connections close or network requests are handled. These fixes prevent event listeners from accumulating and improve long-running application performance.
TL;DR
MSW now includes a critical security update, patching a vulnerability in a dependency to protect against potential regex denial-of-service attacks.
Breaking
path-to-regexpdependency updated (may impact custom route handlers).
Fixes Worth Knowing
- Security vulnerability fixed (prevents potential DoS attacks).
Before You Upgrade
- Review any custom route handlers that directly utilize the
path-to-regexplibrary to ensure continued compatibility.
TL;DR
Mock Service Worker now uses the standard EventTarget (web API for event handling) event emitter, improving compatibility and potentially performance with existing web platform tools.
Breaking
EventEmitterusage is removed (requires updating code that directly interacts with MSW’s event emitter).
Fixes Worth Knowing
- Resolved an issue with event emission, improving reliability when integrating with other libraries.
Before You Upgrade
- If you directly accessed or extended the
EventEmitterinstance on themswobject, update your code to use standard browser events instead.