@termwright/conformance 0.6.0 → 0.7.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/dist/index.js CHANGED
@@ -54,7 +54,7 @@ var certified_instrumentation_default = {
54
54
  var BUILTIN_PROFILES = certified_instrumentation_default.profiles;
55
55
  var INK_VERSION = BUILTIN_PROFILES.at(-1)?.version ?? "unsupported";
56
56
 
57
- // ../probe-ink/dist/chunk-D7G3Y23C.js
57
+ // ../probe-ink/dist/chunk-UYQG7N6S.js
58
58
  import { validateProbeAnnotations } from "@termwright/protocol";
59
59
 
60
60
  // ../pty/dist/index.js
@@ -878,10 +878,17 @@ ${this.#adapterAccount()}`;
878
878
  }
879
879
  }
880
880
  if (this.#debugFile !== null) {
881
- try {
882
- await rm2(this.#debugFile, { force: true });
883
- } catch (error) {
884
- failures.push(error);
881
+ for (let attempt = 0; ; attempt += 1) {
882
+ try {
883
+ await rm2(this.#debugFile, { force: true });
884
+ break;
885
+ } catch (error) {
886
+ if (error.code !== "EBUSY" || attempt === 2) {
887
+ failures.push(error);
888
+ break;
889
+ }
890
+ await new Promise((resolve) => setTimeout(resolve, 50 * (attempt + 1)));
891
+ }
885
892
  }
886
893
  }
887
894
  this.#notifyChange();
@@ -1056,15 +1063,13 @@ function writeConventionSummary(name, declared, outcomes) {
1056
1063
  }
1057
1064
  async function settle(probe, quietMs = 250, budgetMs = 5e3) {
1058
1065
  const deadline = performance.now() + budgetMs;
1059
- let seen = -1;
1060
1066
  for (; ; ) {
1061
- const length = probe.observe().stdout.length;
1062
- if (length === seen) return;
1063
- seen = length;
1064
- if (performance.now() >= deadline) return;
1067
+ const before = probe.observe().stdout.length;
1065
1068
  await new Promise((resolve) => {
1066
1069
  setTimeout(resolve, quietMs);
1067
1070
  });
1071
+ if (probe.observe().stdout.length === before) return;
1072
+ if (performance.now() >= deadline) return;
1068
1073
  }
1069
1074
  }
1070
1075
  function parseDeclaredDeviations(readme) {