diff options
author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2023-07-01 23:52:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-02 00:52:30 +0200 |
commit | b9c0e7cd550ab14fa7da7e33ed87cbeeeb9785a0 (patch) | |
tree | 9212eb183ab3c21ee71531e54f2c16163d1792b7 /cli/lsp/cache.rs | |
parent | 4e2f02639ef2cbcfdd335c4446f6faa6a29ad264 (diff) |
Reland "fix(cli): don't store blob and data urls in the module cache" (#18581)
Relands #18261 now that
https://github.com/lucacasonato/esbuild_deno_loader/pull/54 is landed
and used by fresh.
Fixes #18260.
Diffstat (limited to 'cli/lsp/cache.rs')
-rw-r--r-- | cli/lsp/cache.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/cli/lsp/cache.rs b/cli/lsp/cache.rs index df88254ee..9ce47a11b 100644 --- a/cli/lsp/cache.rs +++ b/cli/lsp/cache.rs @@ -69,7 +69,10 @@ impl CacheMetadata { &self, specifier: &ModuleSpecifier, ) -> Option<Arc<HashMap<MetadataKey, String>>> { - if matches!(specifier.scheme(), "file" | "npm" | "node") { + if matches!( + specifier.scheme(), + "file" | "npm" | "node" | "data" | "blob" + ) { return None; } let version = self @@ -85,7 +88,10 @@ impl CacheMetadata { } fn refresh(&self, specifier: &ModuleSpecifier) -> Option<Metadata> { - if matches!(specifier.scheme(), "file" | "npm" | "node") { + if matches!( + specifier.scheme(), + "file" | "npm" | "node" | "data" | "blob" + ) { return None; } let cache_filename = self.cache.get_cache_filename(specifier)?; |