msw 2.3.3 → 2.3.5

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.3.3'
11
+ const PACKAGE_VERSION = '2.3.5'
12
12
  const INTEGRITY_CHECKSUM = '26357c79639bfa20d64c0efca2a87423'
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.3.3",
3
+ "version": "2.3.5",
4
4
  "description": "Seamless REST/GraphQL API mocking library for browser and Node.js.",
5
5
  "main": "./lib/core/index.js",
6
6
  "module": "./lib/core/index.mjs",
@@ -137,7 +137,7 @@ export class HttpResponse extends Response {
137
137
  static arrayBuffer(body?: ArrayBuffer, init?: HttpResponseInit): Response {
138
138
  const responseInit = normalizeResponseInit(init)
139
139
 
140
- if (body) {
140
+ if (body && !responseInit.headers.has('Content-Length')) {
141
141
  responseInit.headers.set('Content-Length', body.byteLength.toString())
142
142
  }
143
143
 
@@ -191,8 +191,6 @@ class WebStorageCookieStore extends Store {
191
191
  result.push(cookie)
192
192
  }
193
193
 
194
- console.log('filter result:', { cookies, matches, result })
195
-
196
194
  return result
197
195
  }
198
196