diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2024-01-31 22:15:22 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-01 03:15:22 +0000 |
commit | 4b7c6049ef9d40394eb823859c82cbf8d293430d (patch) | |
tree | 61e6de7c69c9d00faeef0ff7e6c223224a53de9e /cli/cache | |
parent | 830d096b66696ad9f4e67b3ed8460fb1ff7a9170 (diff) |
refactor: load bytes in deno_graph (#22212)
Upgrades deno_graph to 0.64 where deno_graph is now responsible for
turning bytes into a string. This is in preparation for Wasm modules.
Diffstat (limited to 'cli/cache')
-rw-r--r-- | cli/cache/mod.rs | 4 | ||||
-rw-r--r-- | cli/cache/parsed_source.rs | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/cli/cache/mod.rs b/cli/cache/mod.rs index 13efc24ff..7004f11af 100644 --- a/cli/cache/mod.rs +++ b/cli/cache/mod.rs @@ -279,10 +279,10 @@ impl Loader for FetchCacher { fn cache_module_info( &mut self, specifier: &ModuleSpecifier, - source: &str, + source: &Arc<[u8]>, module_info: &deno_graph::ModuleInfo, ) { - let source_hash = ModuleInfoCacheSourceHash::from_source(source.as_bytes()); + let source_hash = ModuleInfoCacheSourceHash::from_source(source); let result = self.module_info_cache.set_module_info( specifier, MediaType::from_specifier(specifier), diff --git a/cli/cache/parsed_source.rs b/cli/cache/parsed_source.rs index 77f2e5953..7bb1a72a7 100644 --- a/cli/cache/parsed_source.rs +++ b/cli/cache/parsed_source.rs @@ -17,9 +17,9 @@ pub struct ParsedSourceCache { } impl ParsedSourceCache { - pub fn get_parsed_source_from_esm_module( + pub fn get_parsed_source_from_js_module( &self, - module: &deno_graph::EsmModule, + module: &deno_graph::JsModule, ) -> Result<ParsedSource, deno_ast::Diagnostic> { self.get_or_parse_module( &module.specifier, |