summaryrefslogtreecommitdiff
path: root/cli/lsp/tsc.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2023-03-30 10:43:16 -0400
committerGitHub <noreply@github.com>2023-03-30 10:43:16 -0400
commite0429e2ad641e9207e00838de209ce33b3562f70 (patch)
tree496c38dadb79c4dc9ae4eea755e2ac6a65440ad4 /cli/lsp/tsc.rs
parent3deade4b14de809f67ed0471f8e91c91b25fedcc (diff)
fix(repl): improve package.json support (#18497)
1. Fixes a cosmetic issue in the repl where it would display lsp warning messages. 2. Lazily loads dependencies from the package.json on use. 3. Supports using bare specifiers from package.json in the REPL. Closes #17929 Closes #18494
Diffstat (limited to 'cli/lsp/tsc.rs')
-rw-r--r--cli/lsp/tsc.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/lsp/tsc.rs b/cli/lsp/tsc.rs
index 6ef9b1dc3..316436988 100644
--- a/cli/lsp/tsc.rs
+++ b/cli/lsp/tsc.rs
@@ -20,6 +20,7 @@ use super::urls::LspUrlMap;
use super::urls::INVALID_SPECIFIER;
use crate::args::TsConfig;
+use crate::lsp::logging::lsp_warn;
use crate::tsc;
use crate::tsc::ResolveArgs;
use crate::util::path::relative_specifier;
@@ -43,7 +44,6 @@ use deno_core::ModuleSpecifier;
use deno_core::OpState;
use deno_core::RuntimeOptions;
use deno_runtime::tokio_util::create_basic_runtime;
-use log::warn;
use once_cell::sync::Lazy;
use regex::Captures;
use regex::Regex;
@@ -114,7 +114,7 @@ impl TsServer {
}
let value = request(&mut ts_runtime, state_snapshot, req, token);
if tx.send(value).is_err() {
- warn!("Unable to send result to client.");
+ lsp_warn!("Unable to send result to client.");
}
}
})