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.
- package/lib/esm/RequestHandler-deps.js +4 -1
- package/lib/esm/graphql-deps.js +3 -4
- package/lib/esm/index.js +523 -122
- package/lib/esm/mockServiceWorker.js +1 -1
- package/lib/iife/index.js +3 -3
- package/lib/iife/mockServiceWorker.js +1 -1
- package/lib/types/node/glossary.d.ts +4 -14
- package/lib/types/setupWorker/glossary.d.ts +4 -14
- package/lib/types/sharedOptions.d.ts +11 -0
- package/lib/types/utils/internal/pipeEvents.d.ts +6 -0
- package/lib/umd/index.js +527 -123
- package/lib/umd/mockServiceWorker.js +1 -1
- package/native/lib/index.js +40 -8
- package/node/lib/index.js +40 -8
- package/package.json +2 -2
|
@@ -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
|
|
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
|
/**
|
package/lib/esm/graphql-deps.js
CHANGED
|
@@ -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
|
|
472
|
-
classObject.prototype[nodejsCustomInspectSymbol
|
|
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
|
|
714
|
+
var customInspectFn = object[String(nodejsCustomInspectSymbol)];
|
|
716
715
|
|
|
717
716
|
if (typeof customInspectFn === 'function') {
|
|
718
717
|
return customInspectFn;
|