Releases: mswjs/msw
Releases · mswjs/msw
Release list
v0.15.7
v0.15.6
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 nameexception in Safari and Firefox due to the usage of a negative lookbehind token in RegExp internally (#142, #143)
v0.15.5
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
v0.15.3
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 initcommand (#130, #131)
v0.15.1
v0.15.0
Changes
- The usage of
composeMocks()function is deprecated. Please use thesetupWorker()function instead:
- import { composeMocks, rest } from 'msw'
+ import { setupWorker, rest } from 'msw'
- const { start } = composeMocks(...)
+ const { start } = setupWorker(...)v0.14.1
v0.14.0
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
startfunction now support aquietoption, 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
mswthrowing a type violation when used with TypeScript v3.7 (unsupportedexport * assyntax) (#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
ramdadependency.
v0.13.0
This release introduces changes to
mockServiceWorker.jsfile. 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')
)
})