Packages

msw

3.0.7 · 18 Nov 2026MIT36M / weekRepositoryHomepagenpmAtom feed

Your version

0.28.0

25 Mar 2021Where it was published

0.49.3 is the newest release of 0.28.x.

In short

1 breaking2 fixed1 internal

  • Breaking

    The response instance in the life-cycle events now handles response.headers as the Headers instance (#660).

Release note

Breaking changes

  • Breaking

    The response instance in the life-cycle events now handles response.headers as the Headers instance (#660).

server.on('response:bypass', (res) => {
-  res.headers['content-type']
+  res.headers.get('content-type')
})
  • Breaking

    Calling setupServer no longer applies request interception immediately. Instead, it's applied when called server.listen() (#660).

Bug fixes

  • Fixes the order of events in the intercepted XMLHttpRequest in Node.js (#102).

  • Fixes an issue that resulted in the "TypeError [ERR_INVALID_PROTOCOL]: Protocol "http:" not supported. Expected "https:"" exception when using MSW with superagent (#632).

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.