msw 0.36.4 → 0.36.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.
- package/lib/esm/RequestHandler-deps.js +5 -6
- package/lib/esm/mockServiceWorker.js +1 -1
- package/lib/iife/index.js +2 -2
- package/lib/iife/mockServiceWorker.js +1 -1
- package/lib/umd/index.js +228 -93
- package/lib/umd/mockServiceWorker.js +1 -1
- package/native/lib/index.js +5 -6
- package/node/lib/index.js +5 -6
- package/package.json +13 -4
|
@@ -136,11 +136,9 @@ var InvariantError = /** @class */ (function (_super) {
|
|
|
136
136
|
_this.name = 'Invariant Violation';
|
|
137
137
|
_this.message = format_1.format.apply(void 0, __spreadArray([message], positionals));
|
|
138
138
|
if (_this.stack) {
|
|
139
|
-
var
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
.slice(STACK_FRAMES_TO_IGNORE)
|
|
143
|
-
.join('\n');
|
|
139
|
+
var nextStack = _this.stack.split('\n');
|
|
140
|
+
nextStack.splice(1, STACK_FRAMES_TO_IGNORE);
|
|
141
|
+
_this.stack = nextStack.join('\n');
|
|
144
142
|
}
|
|
145
143
|
return _this;
|
|
146
144
|
}
|
|
@@ -283,11 +281,12 @@ function parseMultipartData(data, headers) {
|
|
|
283
281
|
* Parses a given request/response body based on the "Content-Type" header.
|
|
284
282
|
*/
|
|
285
283
|
function parseBody(body, headers) {
|
|
284
|
+
var _a;
|
|
286
285
|
// Return whatever falsey body value is given.
|
|
287
286
|
if (!body) {
|
|
288
287
|
return body;
|
|
289
288
|
}
|
|
290
|
-
const contentType = (headers === null || headers === void 0 ? void 0 : headers.get('content-type')) || '';
|
|
289
|
+
const contentType = ((_a = headers === null || headers === void 0 ? void 0 : headers.get('content-type')) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || '';
|
|
291
290
|
// If the body has a Multipart Content-Type
|
|
292
291
|
// parse it into an object.
|
|
293
292
|
const hasMultipartContent = contentType.startsWith('multipart/form-data');
|