msw
3.0.7 · 18 Nov 2026MIT36M / weekRepositoryHomepagenpmAtom feed
Your version
0.49.3 is the newest release of 0.30.x.
In short
4 new3 fixed
Release note
Features
Supports generators as response resolvers (#720).
rest.get('/polling/:maxCount', function* (req, res, ctx) {
const { count } = req.params
let count = 0
while (count < req.params. maxCount) {
yield res(ctx.json({ count }))
}
return res(ctx.json({ done: true }))
})Adds the
ctx.cookieutility to the GraphQL handlers (#763).Adds a warning when running MSW on a page that’s outside of the worker’s scope (#787).
The worker script (
mockServiceWorker.js) now contains the library version number to improve its inspection and debugging across releases (#781).
Bug fixes
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.