diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2024-09-25 09:04:57 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-25 09:04:57 -0400 |
commit | 8cdb309ffd6686b2f3c4a2126d927fd5770be34d (patch) | |
tree | 68dfbc0d13e94b9e18f45925d1d5492a7ca6e267 /cli/graph_util.rs | |
parent | 5c40b47629bc83b9120019b77b34ced5eaabcffe (diff) |
fix(check): properly surface dependency errors in types file of js file (#25860)
We weren't surfacing dependency errors in types files of js files.
Diffstat (limited to 'cli/graph_util.rs')
-rw-r--r-- | cli/graph_util.rs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/cli/graph_util.rs b/cli/graph_util.rs index cd98c3824..1add83eb9 100644 --- a/cli/graph_util.rs +++ b/cli/graph_util.rs @@ -55,7 +55,7 @@ use std::sync::Arc; #[derive(Clone, Copy)] pub struct GraphValidOptions { pub check_js: bool, - pub follow_type_only: bool, + pub kind: GraphKind, pub is_vendoring: bool, /// Whether to exit the process for lockfile errors. /// Otherwise, surfaces lockfile errors as errors. @@ -84,7 +84,7 @@ pub fn graph_valid( roots.iter(), deno_graph::WalkOptions { check_js: options.check_js, - follow_type_only: options.follow_type_only, + kind: options.kind, follow_dynamic: options.is_vendoring, prefer_fast_check_graph: false, }, @@ -708,7 +708,11 @@ impl ModuleGraphBuilder { roots, GraphValidOptions { is_vendoring: false, - follow_type_only: self.options.type_check_mode().is_true(), + kind: if self.options.type_check_mode().is_true() { + GraphKind::All + } else { + GraphKind::CodeOnly + }, check_js: self.options.check_js(), exit_lockfile_errors: true, }, @@ -928,7 +932,7 @@ pub fn has_graph_root_local_dependent_changed( std::iter::once(root), deno_graph::WalkOptions { follow_dynamic: true, - follow_type_only: true, + kind: GraphKind::All, prefer_fast_check_graph: true, check_js: true, }, |