mirror of
https://github.com/denoland/deno.git
synced 2025-08-03 10:33:54 +00:00
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.
This commit is contained in:
parent
4e2f02639e
commit
b9c0e7cd55
25 changed files with 142 additions and 184 deletions
|
@ -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)?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue