diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2023-01-30 16:22:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-30 16:22:17 +0100 |
commit | d318e38b76c8174d48fddfb99064401050cd8333 (patch) | |
tree | bd49caad1dcc6507280b8ebf4b7f68e2ff9c5c78 /cli/graph_util.rs | |
parent | 3035dee9f14402f57d42ff0b362152140b4dca13 (diff) |
Revert "fix(watch): preserve `ProcState::file_fetcher` between restarts (#15466) (#17591)
This reverts commit 3545bff678f20c3fdf17fe6b26f96cf1b74f917c.
Diffstat (limited to 'cli/graph_util.rs')
-rw-r--r-- | cli/graph_util.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cli/graph_util.rs b/cli/graph_util.rs index 3c5545a50..30b426667 100644 --- a/cli/graph_util.rs +++ b/cli/graph_util.rs @@ -71,7 +71,7 @@ pub struct GraphData { impl GraphData { /// Store data from `graph` into `self`. - pub fn add_graph(&mut self, graph: &ModuleGraph) { + pub fn add_graph(&mut self, graph: &ModuleGraph, reload: bool) { for graph_import in &graph.imports { for dep in graph_import.dependencies.values() { for resolved in [&dep.maybe_code, &dep.maybe_type] { @@ -90,7 +90,7 @@ impl GraphData { let mut has_npm_specifier_in_graph = false; for (specifier, result) in graph.specifiers() { - if self.modules.contains_key(specifier) { + if !reload && self.modules.contains_key(specifier) { continue; } @@ -477,7 +477,7 @@ impl GraphData { impl From<&ModuleGraph> for GraphData { fn from(graph: &ModuleGraph) -> Self { let mut graph_data = GraphData::default(); - graph_data.add_graph(graph); + graph_data.add_graph(graph, false); graph_data } } @@ -549,7 +549,7 @@ pub async fn create_graph_and_maybe_check( let check_js = ps.options.check_js(); let mut graph_data = GraphData::default(); - graph_data.add_graph(&graph); + graph_data.add_graph(&graph, false); graph_data .check( &graph.roots, |