From 9aedc24000859d60d9cbf03470f2b28884cb4c50 Mon Sep 17 00:00:00 2001 From: Tzvi Friedman Date: Sat, 4 Nov 2023 23:43:09 -0400 Subject: [PATCH 1/4] use stream.opened instead of stream.connection --- commands/services/tail.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/commands/services/tail.ts b/commands/services/tail.ts index 28b38b2..58f368e 100644 --- a/commands/services/tail.ts +++ b/commands/services/tail.ts @@ -59,7 +59,11 @@ export const servicesTailCommand = let writer: WritableStreamDefaultWriter; try { - conn = await stream.connection; + if(stream.connection) { + conn = await stream.connection; + } else { + conn = await stream.opened; + } reader = await conn.readable.getReader(); writer = await conn.writable.getWriter(); } catch (err) { From 903479c20cc5ccf5a24fed81e74970af639f741a Mon Sep 17 00:00:00 2001 From: Shawn Moore Date: Tue, 5 Dec 2023 13:31:06 -0500 Subject: [PATCH 2/4] Tidy --- commands/services/tail.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/services/tail.ts b/commands/services/tail.ts index 58f368e..7fa28ed 100644 --- a/commands/services/tail.ts +++ b/commands/services/tail.ts @@ -59,7 +59,7 @@ export const servicesTailCommand = let writer: WritableStreamDefaultWriter; try { - if(stream.connection) { + if (stream.connection) { conn = await stream.connection; } else { conn = await stream.opened; From 9ecc121e0eedf54393ce81119d67fb9a5a677409 Mon Sep 17 00:00:00 2001 From: Tzvi Friedman Date: Tue, 5 Dec 2023 13:40:45 -0500 Subject: [PATCH 3/4] await to removal of temp directory to fix tests --- util/find-up.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/find-up.test.ts b/util/find-up.test.ts index 3a5106f..e7c0128 100644 --- a/util/find-up.test.ts +++ b/util/find-up.test.ts @@ -51,5 +51,5 @@ Deno.test('findUp', async (t) => { assertEquals(ret, null); }); - Deno.remove(root, { recursive: true }); + await Deno.remove(root, { recursive: true }); }); From 554e415c4f66a466fb48dc6accc452a832ad3491 Mon Sep 17 00:00:00 2001 From: Tzvi Friedman Date: Tue, 5 Dec 2023 14:05:05 -0500 Subject: [PATCH 4/4] remove check for old `stream.connection` since it fails typechecks --- commands/services/tail.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/commands/services/tail.ts b/commands/services/tail.ts index 7fa28ed..f1859b8 100644 --- a/commands/services/tail.ts +++ b/commands/services/tail.ts @@ -59,11 +59,7 @@ export const servicesTailCommand = let writer: WritableStreamDefaultWriter; try { - if (stream.connection) { - conn = await stream.connection; - } else { - conn = await stream.opened; - } + conn = await stream.opened; reader = await conn.readable.getReader(); writer = await conn.writable.getWriter(); } catch (err) {