From 8ce53dd22ba854cfcebc7d9cff135cfc573a0e0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Wed, 10 Nov 2021 14:30:20 +0100 Subject: [PATCH] fix: update unstable Deno props for signal API (#12723) --- cli/diagnostics.rs | 4 ++-- cli/tests/testdata/raw_mode_cbreak.ts | 17 ----------------- 2 files changed, 2 insertions(+), 19 deletions(-) delete mode 100644 cli/tests/testdata/raw_mode_cbreak.ts diff --git a/cli/diagnostics.rs b/cli/diagnostics.rs index 50d7213f10..b9e8c7463e 100644 --- a/cli/diagnostics.rs +++ b/cli/diagnostics.rs @@ -36,6 +36,7 @@ const UNSTABLE_DENO_PROPS: &[&str] = &[ "SystemMemoryInfo", "UnixConnectOptions", "UnixListenOptions", + "addSignalListener", "applySourceMap", "connect", "consoleSize", @@ -52,11 +53,10 @@ const UNSTABLE_DENO_PROPS: &[&str] = &[ "dlopen", "osRelease", "ppid", + "removeSignalListener", "setRaw", "shutdown", "Signal", - "signal", - "signals", "sleepSync", "startTls", "systemMemoryInfo", diff --git a/cli/tests/testdata/raw_mode_cbreak.ts b/cli/tests/testdata/raw_mode_cbreak.ts deleted file mode 100644 index c66c36f0d9..0000000000 --- a/cli/tests/testdata/raw_mode_cbreak.ts +++ /dev/null @@ -1,17 +0,0 @@ -Deno.setRaw(0, true); -Deno.setRaw(0, true, { cbreak: true }); // Can be called multiple times - -const signal = Deno.signal("SIGINT"); - -Deno.stdout.writeSync(new TextEncoder().encode("S")); - -signal.then(() => { - Deno.stdout.writeSync(new TextEncoder().encode("A")); - - signal.dispose(); - - Deno.setRaw(0, false); // restores old mode. - Deno.setRaw(0, false); // Can be safely called multiple times -}); - -setTimeout(() => {}, 10000); // Keep the program running