summaryrefslogtreecommitdiff
path: root/cli/cache/parsed_source.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/cache/parsed_source.rs')
-rw-r--r--cli/cache/parsed_source.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/cli/cache/parsed_source.rs b/cli/cache/parsed_source.rs
index 9ab926874..28547dcf6 100644
--- a/cli/cache/parsed_source.rs
+++ b/cli/cache/parsed_source.rs
@@ -65,6 +65,14 @@ impl ParsedSourceCache {
}
}
+ pub fn reset_for_file_watcher(&self) -> Self {
+ Self {
+ db_cache_path: self.db_cache_path.clone(),
+ cli_version: self.cli_version.clone(),
+ sources: Default::default(),
+ }
+ }
+
pub fn get_parsed_source_from_module(
&self,
module: &deno_graph::Module,