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.
@@ -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 prevStack = _this.stack;
140
- _this.stack = prevStack
141
- .split('\n')
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');
@@ -2,7 +2,7 @@
2
2
  /* tslint:disable */
3
3
 
4
4
  /**
5
- * Mock Service Worker (0.36.4).
5
+ * Mock Service Worker (0.36.5).
6
6
  * @see https://github.com/mswjs/msw
7
7
  * - Please do NOT modify this file.
8
8
  * - Please do NOT serve this file on production.