@absolutejs/absolute 0.20.0-beta.175 → 0.20.0-beta.177

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/index.js CHANGED
@@ -35921,7 +35921,7 @@ var MAX_PROPAGATION_STEPS = 500, realPath4 = (path) => {
35921
35921
  if (typeof namespace !== "object" || namespace === null)
35922
35922
  throw new Error(`${path} did not evaluate to a module`);
35923
35923
  return Object.fromEntries(Object.entries(namespace));
35924
- }, display = (path) => relative33(process.cwd(), path) || path, SLOW_UPDATE_MS = 500, SLOWEST_SHOWN = 3, statementLabel = (id) => {
35924
+ }, isMissingFile3 = (error) => error instanceof Error && ("code" in error) && error.code === "ENOENT", display = (path) => relative33(process.cwd(), path) || path, SLOW_UPDATE_MS = 500, SLOWEST_SHOWN = 3, statementLabel = (id) => {
35925
35925
  const name = id.slice(id.indexOf(":") + 1);
35926
35926
  return /^\d+$/.test(name) ? `statement #${name}` : name;
35927
35927
  }, slowestStatements = (modules) => modules.flatMap((module) => [...moduleRecord(module)?.lastTimings ?? []].map(([id, duration]) => ({
@@ -35964,6 +35964,8 @@ var MAX_PROPAGATION_STEPS = 500, realPath4 = (path) => {
35964
35964
  try {
35965
35965
  source = readFileSync54(path, "utf-8");
35966
35966
  } catch (error) {
35967
+ if (isMissingFile3(error))
35968
+ return { status: "unchanged" };
35967
35969
  reportFailure(path, error);
35968
35970
  return { error, status: "failed" };
35969
35971
  }
@@ -43284,6 +43286,7 @@ var setUp = async (next) => {
43284
43286
  }
43285
43287
  cleanupsRegisteredDuringSetup.set(next, collected);
43286
43288
  };
43289
+ var hookSignature = (app) => ["setup", "cleanup"].map((kind) => hooksOf(app, kind).map((hook) => Function.prototype.toString.call(hook)).sort().join("\x00")).join("\x01");
43287
43290
  var tearDown = async (previous) => {
43288
43291
  const registered = cleanupsRegisteredDuringSetup.get(previous) ?? [];
43289
43292
  cleanupsRegisteredDuringSetup.delete(previous);
@@ -43293,9 +43296,17 @@ var adoptListeningApp = (app) => {
43293
43296
  globalThis.__absoluteLiveApp = app;
43294
43297
  };
43295
43298
  var swapApp = async (next) => {
43299
+ await Promise.resolve();
43296
43300
  const previous = globalThis.__absoluteLiveApp;
43297
43301
  globalThis.__absoluteLiveApp = next;
43298
- if (previous && previous !== next)
43302
+ if (previous === next)
43303
+ return;
43304
+ if (previous && hookSignature(previous) === hookSignature(next)) {
43305
+ cleanupsRegisteredDuringSetup.set(next, cleanupsRegisteredDuringSetup.get(previous) ?? []);
43306
+ cleanupsRegisteredDuringSetup.delete(previous);
43307
+ return;
43308
+ }
43309
+ if (previous)
43299
43310
  await tearDown(previous);
43300
43311
  await setUp(next);
43301
43312
  };
@@ -49433,5 +49444,5 @@ export {
49433
49444
  wrapPageHandlerWithStreamingSlots
49434
49445
  };
49435
49446
 
49436
- //# debugId=BB263212A593230964756E2164756E21
49447
+ //# debugId=A5AE9016FB5A9CEA64756E2164756E21
49437
49448
  //# sourceMappingURL=index.js.map