mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 10:59:13 +00:00
chore(cli,ext,rt): remove some unnecessary clone
or malloc
(#17261)
This commit is contained in:
parent
2da882137e
commit
319f607476
6 changed files with 23 additions and 18 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue