Skip to content

Releases: mswjs/msw

v0.15.8

11 May 06:03
Compare
Choose a tag to compare

Bug fixes

  • Fixed an issue that resulted into request headers not being propagated to an actual request when calling ctx.fetch() to perform response patching (#145, #149).
  • Fixed an issue that resulted into an exception when trying to register a Service Worker in a non-supported environment (legacy browser, or custom hostname) (#147, #148).

v0.15.7

07 May 08:10
Compare
Choose a tag to compare

Bug fixes

  • Fixes an issue that resulted into the library's bundle not being tree-shakable (#110, #138)

v0.15.6

06 May 08:55
Compare
Choose a tag to compare

Bug fixes

  • Fixes an issue that resulted into no request parameters being returned when matched against a URL with query parameters (#130, #141).
  • Fixes an issue that resulted into SyntaxError: Invalid regular expression: invalid group specifier name exception in Safari and Firefox due to the usage of a negative lookbehind token in RegExp internally (#142, #143)

v0.15.5

03 May 09:38
Compare
Choose a tag to compare

This release introduces change to the service worker file. Please follow the instructions in your browser's console to update the worker file in your project. Thank you.

Bug fixes

  • Fixes an issue that resulted into ctx.delay() not delaying the mocked response (#136, 137)

v0.15.4

02 May 15:08
Compare
Choose a tag to compare

Bug fixes

  • Fixes an issue that resulted into npx msw init command throwing an error upon successful copying of the worker file (#132, #133)

v0.15.3

01 May 14:45
Compare
Choose a tag to compare

Bug fixes

  • Fixes an issue that resulted into infinite page loading when refreshing a page with "Update on reload" Service Worker option set in Chrome (#119, #129)
  • Fixes an issue that resulted into disabled mocking when hard reloading a page with multiple same host pages opened (#122, #126)
  • Fixes an issue that resulted into service worker file not being copied when run npx msw init command (#130, #131)

v0.15.1

29 Apr 13:25
Compare
Choose a tag to compare

Bug fixes

  • Fixes an issue where hard reload of a page with multiple pages controlled by MSW were opened resulted into mocking not working (#122, #126)

v0.15.0

29 Apr 09:10
Compare
Choose a tag to compare

Changes

  • The usage of composeMocks() function is deprecated. Please use the setupWorker() function instead:
- import { composeMocks, rest } from 'msw'
+ import { setupWorker, rest } from 'msw'

- const { start } = composeMocks(...)
+ const { start } = setupWorker(...)

v0.14.1

25 Apr 07:47
Compare
Choose a tag to compare

Changes

  • Using start({ quiet: true }) now also silences the mocking activation message (#111, #118)

v0.14.0

24 Apr 20:51
Compare
Choose a tag to compare

This release bumps the integrity of mockServiceWorker.js. Please follow the error instructions in your browser's console to update the worker file to the latest version.

Breaking changes

  • start() function now accepts an options object:
- start('./custom/sw/path.js', { ... })
+ start({ serviceWorker: { url: './custom/sw/path.js', options: { ... } })

Features

  • start function now support a quiet option, allowing to opt-out from the logs in browser's console (#111, #113)
start({ quiet: true })

Bug fixes

  • Fixes a console error when opening the DevTools (#107, #116)
  • Fixes an error message when opening DevTools (#107).
  • Fixes a TypeScript types issue, which resulted into msw throwing a type violation when used with TypeScript v3.7 (unsupported export * as syntax) (#114, #117, ).
  • Fixes a bug that resulted into broken URL matching when using both path parameters and wildcards in a single path.
  • Fixes a bug that forbid having a one character long path parameters.

Internal

  • Bundle size is 20KB smaller due to removing ramda dependency.