spectrum-ts 1.3.0 → 1.5.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.
@@ -55,6 +55,7 @@ function poll(title, ...rest) {
55
55
 
56
56
  // src/utils/stream.ts
57
57
  import { Repeater } from "@repeaterjs/repeater";
58
+ var ignoreCleanupError = () => void 0;
58
59
  function stream(setup) {
59
60
  const repeater = new Repeater(async (push, stop) => {
60
61
  const emit = async (value) => {
@@ -77,7 +78,7 @@ function stream(setup) {
77
78
  });
78
79
  return Object.assign(repeater, {
79
80
  close: async () => {
80
- await repeater.return(void 0);
81
+ void repeater.return(void 0).catch(ignoreCleanupError);
81
82
  }
82
83
  });
83
84
  }
@@ -104,7 +105,7 @@ function mergeStreams(streams) {
104
105
  });
105
106
  return async () => {
106
107
  await Promise.allSettled(streams.map((source) => source.close()));
107
- await Promise.allSettled(workers);
108
+ void Promise.allSettled(workers).catch(ignoreCleanupError);
108
109
  };
109
110
  });
110
111
  }
@@ -175,7 +176,7 @@ function broadcast(source) {
175
176
  try {
176
177
  await source.close();
177
178
  if (pumpPromise) {
178
- await pumpPromise;
179
+ void pumpPromise.catch(ignoreCleanupError);
179
180
  }
180
181
  } finally {
181
182
  if (!terminated) {