summaryrefslogtreecommitdiff
path: root/cli/cache/module_info.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2024-05-28 14:58:43 -0400
committerGitHub <noreply@github.com>2024-05-28 14:58:43 -0400
commit448fe67b7a2142f62332b651f9d215534dceb1f5 (patch)
tree3cfc763f39bf275a537e6228767b3e43866f5d0f /cli/cache/module_info.rs
parentcd8f5f53f7616e4c74de0f1ff5eadd6ef024118a (diff)
feat(vendor): support modifying remote files in vendor folder without checksum errors (#23979)
Includes: * https://github.com/denoland/deno_graph/pull/486 * https://github.com/denoland/deno_graph/pull/488 * https://github.com/denoland/deno_lockfile/pull/25 * https://github.com/denoland/deno_lockfile/pull/22 * https://github.com/denoland/deno_graph/pull/483 * https://github.com/denoland/deno_graph/pull/470
Diffstat (limited to 'cli/cache/module_info.rs')
-rw-r--r--cli/cache/module_info.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/cli/cache/module_info.rs b/cli/cache/module_info.rs
index 0e7a97678..e34b8d2bb 100644
--- a/cli/cache/module_info.rs
+++ b/cli/cache/module_info.rs
@@ -150,8 +150,9 @@ pub struct ModuleInfoCacheModuleAnalyzer<'a> {
parser: &'a dyn ModuleParser,
}
+#[async_trait::async_trait(?Send)]
impl<'a> deno_graph::ModuleAnalyzer for ModuleInfoCacheModuleAnalyzer<'a> {
- fn analyze(
+ async fn analyze(
&self,
specifier: &ModuleSpecifier,
source: Arc<str>,
@@ -176,8 +177,9 @@ impl<'a> deno_graph::ModuleAnalyzer for ModuleInfoCacheModuleAnalyzer<'a> {
}
// otherwise, get the module info from the parsed source cache
+ // todo(23858): take advantage of this being async
let analyzer = ParserModuleAnalyzer::new(self.parser);
- let module_info = analyzer.analyze(specifier, source, media_type)?;
+ let module_info = analyzer.analyze(specifier, source, media_type).await?;
// then attempt to cache it
if let Err(err) = self.module_info_cache.set_module_info(