summaryrefslogtreecommitdiff
path: root/cli/node/mod.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2022-11-16 01:40:03 +0100
committerGitHub <noreply@github.com>2022-11-16 01:40:03 +0100
commit300fd07fad3dee74730517ba91b2e7314632fc3f (patch)
tree5af343873fecc859e5c62ad5eb2895c8f746e605 /cli/node/mod.rs
parent7aa8e9c0351eabe822916394942c576381a13c6c (diff)
fix(npm): don't fail if conditional exports don't contains types (#16651)
If resolving types for an npm package, we didn't find "types" entry in the conditional exports declaration we were falling-through to regular resolution, instead of short-circuiting and giving up on resolving types, which might lead to unwarranted errors. Closes https://github.com/denoland/deno/issues/16649
Diffstat (limited to 'cli/node/mod.rs')
-rw-r--r--cli/node/mod.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/cli/node/mod.rs b/cli/node/mod.rs
index f2a645b5f..7bb28d984 100644
--- a/cli/node/mod.rs
+++ b/cli/node/mod.rs
@@ -688,6 +688,8 @@ fn package_config_resolve(
legacy_main_resolve(&package_config, referrer_kind, conditions)
{
return Ok(Some(path));
+ } else {
+ return Ok(None);
}
}
return package_exports_resolve(