summaryrefslogtreecommitdiff
path: root/cli/tools/check.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tools/check.rs')
-rw-r--r--cli/tools/check.rs18
1 files changed, 13 insertions, 5 deletions
diff --git a/cli/tools/check.rs b/cli/tools/check.rs
index e3fb664ad..0c57af0b0 100644
--- a/cli/tools/check.rs
+++ b/cli/tools/check.rs
@@ -79,10 +79,10 @@ pub fn check(
let root_names = get_tsc_roots(&segment_graph_data, check_js);
if options.log_checks {
for (root, _) in roots {
- let root_str = root.to_string();
+ let root_str = root.as_str();
// `$deno` specifiers are internal, don't print them.
if !root_str.contains("$deno") {
- log::info!("{} {}", colors::green("Check"), root);
+ log::info!("{} {}", colors::green("Check"), root_str);
}
}
}
@@ -116,12 +116,20 @@ pub fn check(
let diagnostics = if options.type_check_mode == TypeCheckMode::Local {
response.diagnostics.filter(|d| {
if let Some(file_name) = &d.file_name {
- !file_name.starts_with("http")
- && ModuleSpecifier::parse(file_name)
+ if !file_name.starts_with("http") {
+ if ModuleSpecifier::parse(file_name)
.map(|specifier| !npm_resolver.in_npm_package(&specifier))
.unwrap_or(true)
+ {
+ Some(d.clone())
+ } else {
+ None
+ }
+ } else {
+ None
+ }
} else {
- true
+ Some(d.clone())
}
})
} else {