summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2024-07-09 17:07:16 -0400
committerGitHub <noreply@github.com>2024-07-09 17:07:16 -0400
commit43d10a558b72ef4a079358521d22447d095e0097 (patch)
tree91ea25bd876639e7535f726cade87df1ffc0a869 /cli
parente5c3c21e95bd6c8cfb0d26de8f79684709d64e81 (diff)
fix: do not download compilerOptions -> types when not type checking (#24473)
Closes https://github.com/denoland/deno/issues/22738
Diffstat (limited to 'cli')
-rw-r--r--cli/args/mod.rs4
-rw-r--r--cli/graph_util.rs6
2 files changed, 6 insertions, 4 deletions
diff --git a/cli/args/mod.rs b/cli/args/mod.rs
index 04a011196..e0eff6171 100644
--- a/cli/args/mod.rs
+++ b/cli/args/mod.rs
@@ -1301,9 +1301,7 @@ impl CliOptions {
self.maybe_lockfile.clone()
}
- /// Return any imports that should be brought into the scope of the module
- /// graph.
- pub fn to_maybe_imports(
+ pub fn to_compiler_option_types(
&self,
) -> Result<Vec<deno_graph::ReferrerImports>, AnyError> {
self.workspace.to_maybe_imports().map(|maybe_imports| {
diff --git a/cli/graph_util.rs b/cli/graph_util.rs
index 2f9ee8d93..7f664420c 100644
--- a/cli/graph_util.rs
+++ b/cli/graph_util.rs
@@ -481,7 +481,11 @@ impl ModuleGraphBuilder {
}
}
- let maybe_imports = self.options.to_maybe_imports()?;
+ let maybe_imports = if options.graph_kind.include_types() {
+ self.options.to_compiler_option_types()?
+ } else {
+ Vec::new()
+ };
let analyzer = self
.module_info_cache
.as_module_analyzer(&self.parsed_source_cache);