authorclover caruso <git@paperclover.net> 2026-10-12 14:56:47-07:00
committerclover caruso <git@paperclover.net> 2026-10-12 15:00:13-07:00
log5f3f3f2f854cf5390a4de275574db4a8d4a4cf8c
treeacadca0225e51451f7c7beba1e88986a8ea8f037
parent3c3cdcccc9b633ab2ea0e14158e780bab6bbed15
signature Signed by SSH key SHA256:cOKiuRFOeSRxne6EWgHtdQQSlBxjOXm2hOCFnCdLQbQ (~clover)

fix: avoid the finally trap

closes #108

3 files changed, 6 insertions(+), 3 deletions(-)

lib/async.ts+1-1
...@@ -152,7 +152,7 @@ export class DedupeConcurrent<Args extends unknown[], Ret> {...@@ -152,7 +152,7 @@ export class DedupeConcurrent<Args extends unknown[], Ret> {
152 if (promise) return promise;152 if (promise) return promise;
153 promise = this.fn(...args);153 promise = this.fn(...args);
154 this.pending.set(k, promise);154 this.pending.set(k, promise);
155 void promise.finally(() => void this.pending.delete(k));155 void promise.finally(() => void this.pending.delete(k)).catch(() => {});
156 return promise;156 return promise;
157 };157 };
158}158}
lib/readme.changes.md+5
...@@ -10,6 +10,11 @@...@@ -10,6 +10,11 @@
10 - finally fixes resize corruptions for long running widgets10 - finally fixes resize corruptions for long running widgets
11- `string/ansi`: add `inverse`, `resetInverse`, and `cursorHome`.11- `string/ansi`: add `inverse`, `resetInverse`, and `cursorHome`.
1212
13### fixes
14
15- `async.DedupeConcurrent` no longer causes unhandled rejections with correct
16 caller error handling.
17
13## v718## v7
1419
15### features20### features
lib/repl.ts-2
...@@ -18,8 +18,6 @@...@@ -18,8 +18,6 @@
18 * // ...18 * // ...
19 * },19 * },
20 * },20 * },
21 *
22 * // many more options to customize how it displays
23 * });21 * });
24 *22 *
25 * import * as repl from "@clo/lib/repl";23 * import * as repl from "@clo/lib/repl";