Packages

msw

3.0.7 · 18 Nov 2026MIT36M / weekRepositoryHomepagenpmAtom feed

Your version

0.13.0

18 Apr 2020Where it was published

0.49.3 is the newest release of 0.13.x.

In short

2 new1 fixed

Release note

This release introduces changes to mockServiceWorker.js file. Upon updating, you will be asked to update your Service Worker file. Please follow the instructions in the browser’s console to update the file.

Features

  • Logs matched requests into browser’s console. Inspect what requests have been mocked, their handler, and the response.

  • Adds support for mocking cookies via ctx.cookie() (#101, #103).

rest.post('/login', (req, res, ctx) => {
  return res(
    ctx.cookie('auth-token', 'abc-123')
  )
})

Bug fixes

  • Prevents Service Worker to persist between different projects on the same host (#96, #99).

  • Prevents Service Worker from bypassing requests after hard reload of the page (#98, #99).

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.