diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2024-03-07 11:30:30 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-07 17:30:30 +0100 |
commit | 594d8397ad46a90389bec9a76afde1bc7f1fa35b (patch) | |
tree | 9238e775513197042429fd9340cdc9bf792e7cd7 /cli/module_loader.rs | |
parent | 87a08fc3b2d0ed1e5a197628fa7091cb656c9058 (diff) |
fix(publish): properly display graph validation errors (#22775)
The graph validation errors were displaying cryptically during publish.
This fixes that.
Diffstat (limited to 'cli/module_loader.rs')
-rw-r--r-- | cli/module_loader.rs | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/cli/module_loader.rs b/cli/module_loader.rs index 17ec535f9..0ff7ef4ed 100644 --- a/cli/module_loader.rs +++ b/cli/module_loader.rs @@ -7,7 +7,6 @@ use crate::args::TsTypeLib; use crate::cache::ParsedSourceCache; use crate::emit::Emitter; use crate::graph_util::graph_lock_or_exit; -use crate::graph_util::graph_valid_with_cli_options; use crate::graph_util::CreateGraphOptions; use crate::graph_util::ModuleGraphBuilder; use crate::graph_util::ModuleGraphContainer; @@ -51,7 +50,6 @@ use deno_graph::JsonModule; use deno_graph::Module; use deno_graph::Resolution; use deno_lockfile::Lockfile; -use deno_runtime::deno_fs; use deno_runtime::deno_node::NodeResolutionMode; use deno_runtime::permissions::PermissionsContainer; use deno_semver::npm::NpmPackageReqReference; @@ -65,7 +63,6 @@ use std::sync::Arc; pub struct ModuleLoadPreparer { options: Arc<CliOptions>, - fs: Arc<dyn deno_fs::FileSystem>, graph_container: Arc<ModuleGraphContainer>, lockfile: Option<Arc<Mutex<Lockfile>>>, module_graph_builder: Arc<ModuleGraphBuilder>, @@ -77,7 +74,6 @@ impl ModuleLoadPreparer { #[allow(clippy::too_many_arguments)] pub fn new( options: Arc<CliOptions>, - fs: Arc<dyn deno_fs::FileSystem>, graph_container: Arc<ModuleGraphContainer>, lockfile: Option<Arc<Mutex<Lockfile>>>, module_graph_builder: Arc<ModuleGraphBuilder>, @@ -86,7 +82,6 @@ impl ModuleLoadPreparer { ) -> Self { Self { options, - fs, graph_container, lockfile, module_graph_builder, @@ -134,12 +129,7 @@ impl ModuleLoadPreparer { ) .await?; - graph_valid_with_cli_options( - graph, - self.fs.as_ref(), - &roots, - &self.options, - )?; + self.module_graph_builder.graph_roots_valid(graph, &roots)?; // If there is a lockfile... if let Some(lockfile) = &self.lockfile { |