@zimic/interceptor 0.16.1 → 0.17.0-canary.1

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/dist/http.mjs CHANGED
@@ -166,9 +166,7 @@ var isNonEmpty_default = isNonEmpty;
166
166
  function createCachedDynamicImport(importModuleDynamically) {
167
167
  let cachedImportResult;
168
168
  return /* @__PURE__ */ __name2(/* @__PURE__ */ __name(async function importModuleDynamicallyWithCache() {
169
- if (cachedImportResult === void 0) {
170
- cachedImportResult = await importModuleDynamically();
171
- }
169
+ cachedImportResult ??= await importModuleDynamically();
172
170
  return cachedImportResult;
173
171
  }, "importModuleDynamicallyWithCache"), "importModuleDynamicallyWithCache");
174
172
  }
@@ -1249,9 +1247,7 @@ var LocalHttpInterceptorWorker = class extends HttpInterceptorWorker_default {
1249
1247
  return this.internalWorker;
1250
1248
  }
1251
1249
  get internalWorkerOrCreate() {
1252
- if (!this.internalWorker) {
1253
- this.internalWorker = this.createInternalWorker();
1254
- }
1250
+ this.internalWorker ??= this.createInternalWorker();
1255
1251
  return this.internalWorker;
1256
1252
  }
1257
1253
  createInternalWorker() {
@@ -2576,7 +2572,7 @@ var RemoteHttpInterceptor_default = RemoteHttpInterceptor;
2576
2572
 
2577
2573
  // src/http/interceptor/factory.ts
2578
2574
  function isLocalHttpInterceptorOptions(options) {
2579
- return options.type === "local";
2575
+ return options.type === void 0 || options.type === "local";
2580
2576
  }
2581
2577
  __name(isLocalHttpInterceptorOptions, "isLocalHttpInterceptorOptions");
2582
2578
  function isRemoteHttpInterceptorOptions(options) {