summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2021-11-10 14:30:20 +0100
committerGitHub <noreply@github.com>2021-11-10 14:30:20 +0100
commit8ce53dd22ba854cfcebc7d9cff135cfc573a0e0a (patch)
tree332ba15a5730ac0317ec7f433652567289088153
parenta632dc5b0d321e704bc56e2ffd4582494c3efbea (diff)
fix: update unstable Deno props for signal API (#12723)
-rw-r--r--cli/diagnostics.rs4
-rw-r--r--cli/tests/testdata/raw_mode_cbreak.ts17
2 files changed, 2 insertions, 19 deletions
diff --git a/cli/diagnostics.rs b/cli/diagnostics.rs
index 50d7213f1..b9e8c7463 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 c66c36f0d..000000000
--- 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