msw 0.47.3 → 0.47.4

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/index.js CHANGED
@@ -921,7 +921,7 @@ var response = Object.assign(createResponseComposition(), {
921
921
  });
922
922
 
923
923
  // src/utils/internal/getCallFrame.ts
924
- var SOURCE_FRAME = /\/msw\/src\/(.+)/;
924
+ var SOURCE_FRAME = /[\/\\]msw[\/\\]src[\/\\](.+)/;
925
925
  var BUILD_FRAME = /(node_modules)?[\/\\]lib[\/\\](umd|esm|iief|cjs)[\/\\]|^[^\/\\]*$/;
926
926
  function getCallFrame(error2) {
927
927
  const stack = error2.stack;
@@ -1383,6 +1383,7 @@ function serializeResponse(source) {
1383
1383
  // src/setupWorker/start/createRequestListener.ts
1384
1384
  var createRequestListener = (context, options) => {
1385
1385
  return async (event, message) => {
1386
+ var _a;
1386
1387
  const messageChannel = new WorkerChannel(event.ports[0]);
1387
1388
  const request = parseWorkerRequest(message.payload);
1388
1389
  try {
@@ -1421,7 +1422,7 @@ var createRequestListener = (context, options) => {
1421
1422
 
1422
1423
  %s
1423
1424
 
1424
- 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`, request.method, request.url, error2);
1425
+ 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`, request.method, request.url, (_a = error2.stack) != null ? _a : error2);
1425
1426
  messageChannel.postMessage("MOCK_RESPONSE", {
1426
1427
  status: 500,
1427
1428
  statusText: "Request Handler Error",