From eba48ace9702159e5b431142783743039f120427 Mon Sep 17 00:00:00 2001 From: Nathan Whitaker <17734409+nathanwhit@users.noreply.github.com> Date: Thu, 24 Oct 2024 16:46:48 -0700 Subject: [PATCH] fix(install): don't cache json exports of JSR packages (for now) (#26530) Temporary fix for #26509, so people don't get errors. --- cli/tools/registry/pm/cache_deps.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cli/tools/registry/pm/cache_deps.rs b/cli/tools/registry/pm/cache_deps.rs index 365622d11f5f03..9883deb1d5f3a9 100644 --- a/cli/tools/registry/pm/cache_deps.rs +++ b/cli/tools/registry/pm/cache_deps.rs @@ -90,8 +90,13 @@ pub async fn cache_top_level_deps( while let Some(info_future) = info_futures.next().await { if let Some((specifier, info)) = info_future { let exports = info.exports(); - for (k, _) in exports { + for (k, v) in exports { if let Ok(spec) = specifier.join(k) { + if v.ends_with(".json") { + // TODO(nathanwhit): this should work, there's a bug with + // json roots in deno_graph. skip it for now + continue; + } roots.push(spec); } }