msw 2.8.5 → 2.8.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,7 +8,7 @@
8
8
  * - Please do NOT serve this file on production.
9
9
  */
10
10
 
11
- const PACKAGE_VERSION = '2.8.5'
11
+ const PACKAGE_VERSION = '2.8.7'
12
12
  const INTEGRITY_CHECKSUM = '00729d72e3b82faf54ca8b9621dbb96f'
13
13
  const IS_MOCKED_RESPONSE = Symbol('isMockedResponse')
14
14
  const activeClientIds = new Set()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "msw",
3
- "version": "2.8.5",
3
+ "version": "2.8.7",
4
4
  "description": "Seamless REST/GraphQL API mocking library for browser and Node.js.",
5
5
  "type": "commonjs",
6
6
  "main": "./lib/core/index.js",
@@ -279,7 +279,7 @@
279
279
  "vitest-environment-miniflare": "^2.14.4",
280
280
  "webpack": "^5.95.0",
281
281
  "webpack-http-server": "^0.5.0",
282
- "msw": "2.8.5"
282
+ "msw": "2.8.7"
283
283
  },
284
284
  "peerDependencies": {
285
285
  "typescript": ">= 4.8.x"
@@ -111,7 +111,7 @@ export const createRequestListener = (
111
111
 
112
112
  %s
113
113
 
114
- This exception has been gracefully handled as a 500 response, however, it's strongly recommended to resolve this error, as it indicates a mistake in your code. If you wish to mock an error response, please see this guide: https://mswjs.io/docs/recipes/mocking-error-responses`,
114
+ This exception has been gracefully handled as a 500 response, however, it's strongly recommended to resolve this error, as it indicates a mistake in your code. If you wish to mock an error response, please see this guide: https://mswjs.io/docs/http/mocking-responses/error-responses`,
115
115
  request.method,
116
116
  request.url,
117
117
  error.stack ?? error,
@@ -102,7 +102,7 @@ export class HttpHandler extends RequestHandler<
102
102
  })
103
103
 
104
104
  devUtils.warn(
105
- `Found a redundant usage of query parameters in the request handler URL for "${method} ${path}". Please match against a path instead and access query parameters using "new URL(request.url).searchParams" instead. Learn more: https://mswjs.io/docs/recipes/query-parameters`,
105
+ `Found a redundant usage of query parameters in the request handler URL for "${method} ${path}". Please match against a path instead and access query parameters using "new URL(request.url).searchParams" instead. Learn more: https://mswjs.io/docs/http/intercepting-requestsquery-parameters`,
106
106
  )
107
107
  }
108
108
 
@@ -11,7 +11,7 @@ const fixtures = {
11
11
  • GET ${url}
12
12
 
13
13
  If you still wish to intercept this unhandled request, please create a request handler for it.
14
- Read more: https://mswjs.io/docs/getting-started/mocks`,
14
+ Read more: https://mswjs.io/docs/http/intercepting-requests`,
15
15
  warningWithResponseBody: (url = `/api`) => `\
16
16
  [MSW] Warning: intercepted a request without a matching request handler:
17
17
 
@@ -20,7 +20,7 @@ Read more: https://mswjs.io/docs/getting-started/mocks`,
20
20
  • Request body: {\"variables\":{\"id\":\"abc-123\"},\"query\":\"query UserName($id: String!) { user(id: $id) { name } }\"}
21
21
 
22
22
  If you still wish to intercept this unhandled request, please create a request handler for it.
23
- Read more: https://mswjs.io/docs/getting-started/mocks`,
23
+ Read more: https://mswjs.io/docs/http/intercepting-requests`,
24
24
 
25
25
  errorWithoutSuggestions: `\
26
26
  [MSW] Error: intercepted a request without a matching request handler:
@@ -28,7 +28,7 @@ Read more: https://mswjs.io/docs/getting-started/mocks`,
28
28
  • GET /api
29
29
 
30
30
  If you still wish to intercept this unhandled request, please create a request handler for it.
31
- Read more: https://mswjs.io/docs/getting-started/mocks`,
31
+ Read more: https://mswjs.io/docs/http/intercepting-requests`,
32
32
  }
33
33
 
34
34
  beforeEach(() => {
@@ -30,7 +30,7 @@ export async function onUnhandledRequest(
30
30
  ? null
31
31
  : await request.clone().text()
32
32
  const messageDetails = `\n\n \u2022 ${request.method} ${publicUrl}\n\n${requestBody ? ` \u2022 Request body: ${requestBody}\n\n` : ''}`
33
- const unhandledRequestMessage = `intercepted a request without a matching request handler:${messageDetails}If you still wish to intercept this unhandled request, please create a request handler for it.\nRead more: https://mswjs.io/docs/getting-started/mocks`
33
+ const unhandledRequestMessage = `intercepted a request without a matching request handler:${messageDetails}If you still wish to intercept this unhandled request, please create a request handler for it.\nRead more: https://mswjs.io/docs/http/intercepting-requests`
34
34
 
35
35
  function applyStrategy(strategy: UnhandledRequestStrategy) {
36
36
  switch (strategy) {