summaryrefslogtreecommitdiff
path: root/cli/factory.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2024-04-05 10:34:51 -0400
committerGitHub <noreply@github.com>2024-04-05 10:34:51 -0400
commit049e703331409db8c4b4e2cc7d969f471c229df3 (patch)
treea31458a651e931d2047c348bdcbe0379470bf925 /cli/factory.rs
parentee4bfe16009c3a04c9015bf9fca0c9b0f9a3a601 (diff)
FUTURE: override byonm with nodeModulesDir setting (#23222)
Makes the `"nodeModulesDir"` setting take precedence over byonm when using `DENO_FUTURE`.
Diffstat (limited to 'cli/factory.rs')
-rw-r--r--cli/factory.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/cli/factory.rs b/cli/factory.rs
index bd8fa7ef6..18f6b6b2a 100644
--- a/cli/factory.rs
+++ b/cli/factory.rs
@@ -402,11 +402,11 @@ impl CliFactory {
.npm_resolver
.get_or_try_init_async(async {
let fs = self.fs();
- create_cli_npm_resolver(if self.options.use_byonm() || self.options.unstable_byonm() {
+ create_cli_npm_resolver(if self.options.use_byonm() {
CliNpmResolverCreateOptions::Byonm(CliNpmResolverByonmCreateOptions {
fs: fs.clone(),
- root_node_modules_dir: match self.options.node_modules_dir_path().clone() {
- Some(node_modules_path) => node_modules_path,
+ root_node_modules_dir: 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())?
@@ -434,7 +434,7 @@ impl CliFactory {
npm_global_cache_dir: self.deno_dir()?.npm_folder_path(),
cache_setting: self.options.cache_setting(),
text_only_progress_bar: self.text_only_progress_bar().clone(),
- maybe_node_modules_path: self.options.node_modules_dir_path(),
+ maybe_node_modules_path: self.options.node_modules_dir_path().cloned(),
package_json_installer:
CliNpmResolverManagedPackageJsonInstallerOption::ConditionalInstall(
self.package_json_deps_provider().clone(),