mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 19:08:15 +00:00
refactor(deno_graph): remove unused Resolved::Ok#kind usage (#17504)
See https://github.com/denoland/deno_graph/pull/205 for more details.
This commit is contained in:
parent
0d1471282b
commit
654e177c91
20 changed files with 75 additions and 172 deletions
|
@ -6,7 +6,6 @@ use deno_ast::MediaType;
|
|||
use deno_ast::ModuleSpecifier;
|
||||
use deno_core::error::AnyError;
|
||||
use deno_core::parking_lot::RwLock;
|
||||
use deno_graph::ModuleKind;
|
||||
use deno_runtime::colors;
|
||||
use once_cell::sync::Lazy;
|
||||
use regex::Regex;
|
||||
|
@ -55,7 +54,7 @@ pub struct CheckResult {
|
|||
/// It is expected that it is determined if a check and/or emit is validated
|
||||
/// before the function is called.
|
||||
pub fn check(
|
||||
roots: &[(ModuleSpecifier, ModuleKind)],
|
||||
roots: &[ModuleSpecifier],
|
||||
graph_data: Arc<RwLock<GraphData>>,
|
||||
cache: &TypeCheckCache,
|
||||
npm_resolver: &NpmPackageResolver,
|
||||
|
@ -78,7 +77,7 @@ pub fn check(
|
|||
|
||||
let root_names = get_tsc_roots(&segment_graph_data, check_js);
|
||||
if options.log_checks {
|
||||
for (root, _) in roots {
|
||||
for root in roots {
|
||||
let root_str = root.as_str();
|
||||
// `$deno` specifiers are internal, don't print them.
|
||||
if !root_str.contains("$deno") {
|
||||
|
@ -92,7 +91,7 @@ pub fn check(
|
|||
let maybe_tsbuildinfo = if options.reload {
|
||||
None
|
||||
} else {
|
||||
cache.get_tsbuildinfo(&roots[0].0)
|
||||
cache.get_tsbuildinfo(&roots[0])
|
||||
};
|
||||
// to make tsc build info work, we need to consistently hash modules, so that
|
||||
// tsc can better determine if an emit is still valid or not, so we provide
|
||||
|
@ -137,7 +136,7 @@ pub fn check(
|
|||
};
|
||||
|
||||
if let Some(tsbuildinfo) = response.maybe_tsbuildinfo {
|
||||
cache.set_tsbuildinfo(&roots[0].0, &tsbuildinfo);
|
||||
cache.set_tsbuildinfo(&roots[0], &tsbuildinfo);
|
||||
}
|
||||
|
||||
if diagnostics.is_empty() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue