diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2023-07-26 17:23:07 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-26 17:23:07 -0400 |
commit | cf16df00d9ba87de643abc6d80c860a2733917cc (patch) | |
tree | d8e17df213941675c8eecba89931b8417cd0367f /cli/standalone | |
parent | 53e077133f9c95e4ed23d838129158b6e4b88d6f (diff) |
fix(check): should bust check cache when json module or npm resolution changes (#19941)
A small part of #19928.
Diffstat (limited to 'cli/standalone')
-rw-r--r-- | cli/standalone/mod.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cli/standalone/mod.rs b/cli/standalone/mod.rs index dfa71cf6f..a090dd4fa 100644 --- a/cli/standalone/mod.rs +++ b/cli/standalone/mod.rs @@ -191,7 +191,7 @@ impl ModuleLoader for EmbeddedModuleLoader { } let module = module?; - let code = module.source().await.unwrap_or_default(); + let code = module.source().await.unwrap_or_else(|| Arc::new([])); let code = std::str::from_utf8(&code) .map_err(|_| type_error("Module source is not utf-8"))? .to_owned() @@ -204,6 +204,9 @@ impl ModuleLoader for EmbeddedModuleLoader { eszip::ModuleKind::Jsonc => { return Err(type_error("jsonc modules not supported")) } + eszip::ModuleKind::OpaqueData => { + unreachable!(); + } }, code, &module_specifier, |