From a269dffe17c644a182444030f9d756d2b1859a54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Sun, 8 Nov 2020 23:35:36 +0100 Subject: [PATCH] chore: remove dead code (#8298) --- cli/global_timer.rs | 1 - cli/main.rs | 1 - cli/ops/runtime.rs | 2 -- cli/rt/99_main.js | 3 +-- cli/tests/subdir/test_worker_basic.js | 1 - 5 files changed, 1 insertion(+), 7 deletions(-) delete mode 100644 cli/global_timer.rs diff --git a/cli/global_timer.rs b/cli/global_timer.rs deleted file mode 100644 index 6fad563a2d..0000000000 --- a/cli/global_timer.rs +++ /dev/null @@ -1 +0,0 @@ -// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. diff --git a/cli/main.rs b/cli/main.rs index 9e67813f78..9404a47b29 100644 --- a/cli/main.rs +++ b/cli/main.rs @@ -23,7 +23,6 @@ mod flags_allow_net; mod fmt; mod fmt_errors; mod fs; -mod global_timer; mod http_cache; mod http_util; mod import_map; diff --git a/cli/ops/runtime.rs b/cli/ops/runtime.rs index 3d73503610..e29cf9f85b 100644 --- a/cli/ops/runtime.rs +++ b/cli/ops/runtime.rs @@ -32,9 +32,7 @@ fn op_start( let gs = &super::program_state(state); Ok(json!({ - // TODO(bartlomieju): `cwd` field is not used in JS, remove? "args": gs.flags.argv.clone(), - "cwd": &env::current_dir().unwrap(), "debugFlag": gs.flags.log_level.map_or(false, |l| l == log::Level::Debug), "denoVersion": version::DENO, "noColor": !colors::use_color(), diff --git a/cli/rt/99_main.js b/cli/rt/99_main.js index b29d1a4f2d..68572f79a4 100644 --- a/cli/rt/99_main.js +++ b/cli/rt/99_main.js @@ -298,7 +298,7 @@ delete Object.prototype.__proto__; } }); - const { args, cwd, noColor, pid, ppid, unstableFlag } = runtimeStart(); + const { args, noColor, pid, ppid, unstableFlag } = runtimeStart(); registerErrors(); @@ -330,7 +330,6 @@ delete Object.prototype.__proto__; Object.freeze(globalThis.Deno.core.sharedQueue); signals.setSignals(); - util.log("cwd", cwd); util.log("args", args); } diff --git a/cli/tests/subdir/test_worker_basic.js b/cli/tests/subdir/test_worker_basic.js index aea3608725..b960128b43 100644 --- a/cli/tests/subdir/test_worker_basic.js +++ b/cli/tests/subdir/test_worker_basic.js @@ -1,6 +1,5 @@ console.log("hello from test_worker_basic.js"); -// TODO(bartlomieju): add test for throwing in web worker if (self.name !== "jsWorker") { throw Error(`Bad worker name: ${self.name}, expected jsWorker`); }