Open source changelog

Follow the evolution of Gatsby.

Subscribe to updates
 

WhiteSource Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
msw (source) ^0.35.0 -> ^0.36.3 age adoption passing confidence

Release Notes

mswjs/msw ### [`v0.36.3`](https://togithub.com/mswjs/msw/releases/v0.36.3) [Compare Source](https://togithub.com/mswjs/msw/compare/v0.36.2...v0.36.3) ### Bug fixes - Fixes an issue that resulted in the CORS policy violation due to the library appending the `x-msw-request-id` request header ([#​713](https://togithub.com/mswjs/msw/issues/713), [#​1022](https://togithub.com/mswjs/msw/issues/1022), [#​1024](https://togithub.com/mswjs/msw/issues/1024)). #### Internal - No longer sets the `x-msw-request-id` header on the request ([#​1024](https://togithub.com/mswjs/msw/issues/1024)). Relies on the `request.id` set by the interceptors (Node.js) or the `requestId` generated by the worker (browser). ### [`v0.36.2`](https://togithub.com/mswjs/msw/releases/v0.36.2) [Compare Source](https://togithub.com/mswjs/msw/compare/v0.36.1...v0.36.2) ##### Bug fixes - Fixes an issue that resulted in the "TypeError: expected.toLowerCase() is not a function" exception when using the `rest.all()` request handler ([#​1020](https://togithub.com/mswjs/msw/issues/1020), [#​1021](https://togithub.com/mswjs/msw/issues/1021)). ### [`v0.36.1`](https://togithub.com/mswjs/msw/releases/v0.36.1) [Compare Source](https://togithub.com/mswjs/msw/compare/v0.36.0...v0.36.1) #### Bug fixes - Fixes an issue that resulted in the "SyntaxError: Invalid group specified name" exception in Safari ([#​1018](https://togithub.com/mswjs/msw/issues/1018), [#​1019](https://togithub.com/mswjs/msw/issues/1019) ). ### [`v0.36.0`](https://togithub.com/mswjs/msw/releases/v0.36.0) [Compare Source](https://togithub.com/mswjs/msw/compare/v0.35.0...v0.36.0) #### Breaking changes - Uses [path-to-regexp](https://www.npmjs.com/package/path-to-regexp) for URL matching ([#​691](https://togithub.com/mswjs/msw/issues/691), [#​888](https://togithub.com/mswjs/msw/issues/888)). This makes the path matching experience identical to such in ExpressJS, and enabled various new features: - Optional path segments (`/foo/bar?`); - Repeating groups (`/foo/bar+`). - Request path parameters are now annotated as ambiguous `string | string[]` ([#​999](https://togithub.com/mswjs/msw/issues/999)). - The `RequestParams` generic now follows the `RequestBodyType` generic, changing its order ([#​999](https://togithub.com/mswjs/msw/issues/999)): ```ts rest.post() {} ``` - Removes the `RequestParams` type ([#​999](https://togithub.com/mswjs/msw/issues/999)). Please use the `PathParams` type instead. ```diff - import { RequestParams } from 'msw' + import { PathParams } from 'msw' ``` - Relative requests are now resolved against `document.baseURI` (previously `location.origin`) in a browser-like environments ([#​1007](https://togithub.com/mswjs/msw/issues/1007), [#​1008](https://togithub.com/mswjs/msw/issues/1008)). #### Features - Adds a new `rest.all()` request handler ([#​896](https://togithub.com/mswjs/msw/issues/896)). This handler captures all REST API requests regardless of method. ```js import { rest } from 'msw' rest.all('/api/*', (req, res, ctx) => { // Intercepts all requests to "/api/*" // regardless of their method. }) ``` - Supports encoded request path components ([#​980](https://togithub.com/mswjs/msw/issues/980)). - Supports mocking GraphQL extensions ([#​981](https://togithub.com/mswjs/msw/issues/981)). ```js graphql.query('GetUser', (req, res, ctx) => { return res( ctx.extensions({ message: 'Mocked extension', tracking: { version: '1.2.3' } }) ) }) ``` - Exports `SetupWorkerApi` and `SetupServerApi` from the browser and Node.js modules respectively ([#​994](https://togithub.com/mswjs/msw/issues/994)). #### Bug fixes - Specifies `typescript` as a `peerDependency` to control supported TypeScript versions ([#​985](https://togithub.com/mswjs/msw/issues/985)). - Fixes an issue that resulted in `graphql.operation` handler producing a warning unable to intercept anonymous operations ([#​918](https://togithub.com/mswjs/msw/issues/918), [#​904](https://togithub.com/mswjs/msw/issues/904)). - Locks `inquirer` dependency version to 8.1.5 to propagate the fix for the `Unexpected token “?”` issue when using MSW CLI ([#​917](https://togithub.com/mswjs/msw/issues/917)). - Fixes an issue that resulted in the `TypeError: Failed to execute 'XXX' on 'Response': body stream already read` error when reading the original response body in the fallback mode ([https://github.com/mswjs/interceptors/pull/152](https://togithub.com/mswjs/interceptors/pull/152)). #### Internal - Lists `@mswjs/cookies` and `@mswjs/interceptors` as external packages so that their updates propagate to you automatically upon new installations of `msw`. - Updates dependencies.

Configuration

📅 Schedule: "before 7am on the first day of the month" in timezone GMT.

🚦 Automerge: Enabled.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox.

This PR has been generated by WhiteSource Renovate. View repository job log here.