msw 0.34.0 → 0.35.0

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.
@@ -435,7 +435,10 @@ function getAbsoluteUrl(path, baseUrl) {
435
435
  // Resolve a relative request URL against a given custom "baseUrl"
436
436
  // or the current location (in the case of browser/browser-like environments).
437
437
  const origin = baseUrl || (typeof location !== 'undefined' && location.origin);
438
- return origin ? new URL(path, origin).href : path;
438
+ return origin
439
+ ? // Encode and decode the path to preserve escaped characters.
440
+ decodeURI(new URL(encodeURI(path), origin).href)
441
+ : path;
439
442
  }
440
443
 
441
444
  /**
@@ -457,7 +457,6 @@ function invariant(condition, message) {
457
457
 
458
458
  // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317')
459
459
  var nodejsCustomInspectSymbol = typeof Symbol === 'function' && typeof Symbol.for === 'function' ? Symbol.for('nodejs.util.inspect.custom') : undefined;
460
- var nodejsCustomInspectSymbol$1 = nodejsCustomInspectSymbol;
461
460
 
462
461
  /**
463
462
  * The `defineInspect()` function defines `inspect()` prototype method as alias of `toJSON`
@@ -468,8 +467,8 @@ function defineInspect(classObject) {
468
467
  typeof fn === 'function' || invariant(0);
469
468
  classObject.prototype.inspect = fn; // istanbul ignore else (See: 'https://github.com/graphql/graphql-js/issues/2317')
470
469
 
471
- if (nodejsCustomInspectSymbol$1) {
472
- classObject.prototype[nodejsCustomInspectSymbol$1] = fn;
470
+ if (nodejsCustomInspectSymbol) {
471
+ classObject.prototype[nodejsCustomInspectSymbol] = fn;
473
472
  }
474
473
  }
475
474
 
@@ -712,7 +711,7 @@ function formatArray(array, seenValues) {
712
711
  }
713
712
 
714
713
  function getCustomFn(object) {
715
- var customInspectFn = object[String(nodejsCustomInspectSymbol$1)];
714
+ var customInspectFn = object[String(nodejsCustomInspectSymbol)];
716
715
 
717
716
  if (typeof customInspectFn === 'function') {
718
717
  return customInspectFn;