diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2024-07-10 14:46:25 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-10 14:46:25 -0400 |
commit | a49d0bd10ba2a4745c291f3f413d97396213e4ec (patch) | |
tree | 0c63c25304f465e969d2bcfb8bd71df8575c4033 /cli/factory.rs | |
parent | 4d2d764816d266e42f3b2251248b100abb667c83 (diff) |
fix(check): CJS types importing dual ESM/CJS package should prefer CJS types (#24492)
Closes #16370
Diffstat (limited to 'cli/factory.rs')
-rw-r--r-- | cli/factory.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cli/factory.rs b/cli/factory.rs index e3147e49f..df7b2c868 100644 --- a/cli/factory.rs +++ b/cli/factory.rs @@ -409,13 +409,13 @@ impl CliFactory { create_cli_npm_resolver(if self.options.use_byonm() && !matches!(self.options.sub_command(), DenoSubcommand::Install(_)) { CliNpmResolverCreateOptions::Byonm(CliNpmResolverByonmCreateOptions { fs: fs.clone(), - root_node_modules_dir: match self.options.node_modules_dir_path() { + root_node_modules_dir: Some(match self.options.node_modules_dir_path() { Some(node_modules_path) => node_modules_path.to_path_buf(), // path needs to be canonicalized for node resolution // (node_modules_dir_path above is already canonicalized) None => canonicalize_path_maybe_not_exists(self.options.initial_cwd())? .join("node_modules"), - }, + }), }) } else { CliNpmResolverCreateOptions::Managed(CliNpmResolverManagedCreateOptions { @@ -732,7 +732,7 @@ impl CliFactory { .cli_node_resolver .get_or_try_init_async(async { Ok(Arc::new(CliNodeResolver::new( - Some(self.cjs_resolutions().clone()), + self.cjs_resolutions().clone(), self.fs().clone(), self.node_resolver().await?.clone(), self.npm_resolver().await?.clone(), |