From e7f8965cefe31668c9d1512bd60d50708fa159d2 Mon Sep 17 00:00:00 2001 From: Miles Johnson Date: Tue, 22 Oct 2024 21:54:35 -0700 Subject: [PATCH 1/3] Fix npx. --- legacy/node/tool/src/node_tool.rs | 2 +- legacy/node/tool/src/pnpm_tool.rs | 2 +- legacy/node/tool/src/yarn_tool.rs | 8 ++------ 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/legacy/node/tool/src/node_tool.rs b/legacy/node/tool/src/node_tool.rs index 17d15dd9b25..75f9b6f74f1 100644 --- a/legacy/node/tool/src/node_tool.rs +++ b/legacy/node/tool/src/node_tool.rs @@ -137,7 +137,7 @@ impl NodeTool { _ => { let mut cmd = Command::new(self.get_npx_path()?); cmd.with_console(self.console.clone()); - cmd.args(["--silent", "--", package]); + cmd.args(["--quiet", "--package", package, "--", package]); cmd.envs(get_proto_env_vars()); if let Some(version) = get_proto_version_env(&self.tool) { diff --git a/legacy/node/tool/src/pnpm_tool.rs b/legacy/node/tool/src/pnpm_tool.rs index 3ae225ce14b..8b592cad230 100644 --- a/legacy/node/tool/src/pnpm_tool.rs +++ b/legacy/node/tool/src/pnpm_tool.rs @@ -183,7 +183,7 @@ impl DependencyManager for PnpmTool { return Ok(()); } else { - node.exec_package("pnpm-deduplicate", &["pnpm-deduplicate"], working_dir) + node.exec_package("pnpm-deduplicate", &[], working_dir) .await?; } } diff --git a/legacy/node/tool/src/yarn_tool.rs b/legacy/node/tool/src/yarn_tool.rs index 4170bb6d5a8..cd493e9cd6d 100644 --- a/legacy/node/tool/src/yarn_tool.rs +++ b/legacy/node/tool/src/yarn_tool.rs @@ -213,12 +213,8 @@ impl DependencyManager for YarnTool { } else { // Will error if the lockfile does not exist! if working_dir.join(self.get_lock_filename()).exists() { - node.exec_package( - "yarn-deduplicate", - &["yarn-deduplicate", "yarn.lock"], - working_dir, - ) - .await?; + node.exec_package("yarn-deduplicate", &["yarn.lock"], working_dir) + .await?; } } From cdf473b625f7cf3dabb36c36cf7d39cb9f5a1991 Mon Sep 17 00:00:00 2001 From: Miles Johnson Date: Tue, 22 Oct 2024 21:55:27 -0700 Subject: [PATCH 2/3] Bump. --- .yarn/versions/2f71348d.yml | 9 +++++++++ CHANGELOG.md | 6 ++++++ 2 files changed, 15 insertions(+) create mode 100644 .yarn/versions/2f71348d.yml diff --git a/.yarn/versions/2f71348d.yml b/.yarn/versions/2f71348d.yml new file mode 100644 index 00000000000..1f2a5d9c201 --- /dev/null +++ b/.yarn/versions/2f71348d.yml @@ -0,0 +1,9 @@ +releases: + "@moonrepo/cli": patch + "@moonrepo/core-linux-arm64-gnu": patch + "@moonrepo/core-linux-arm64-musl": patch + "@moonrepo/core-linux-x64-gnu": patch + "@moonrepo/core-linux-x64-musl": patch + "@moonrepo/core-macos-arm64": patch + "@moonrepo/core-macos-x64": patch + "@moonrepo/core-windows-x64-msvc": patch diff --git a/CHANGELOG.md b/CHANGELOG.md index 74dd1494b10..a058b2f0b6a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## Unreleased + +#### 🐞 Fixes + +- Fixed an issue running `npx` commands (primarily through lockfile deduping). + ## 1.29.2 #### 🚀 Updates From c7dbc0655ba62754598e5aa56d741e3f89ab583d Mon Sep 17 00:00:00 2001 From: Miles Johnson Date: Tue, 22 Oct 2024 21:58:43 -0700 Subject: [PATCH 3/3] Change args. --- legacy/node/tool/src/node_tool.rs | 2 +- legacy/node/tool/src/pnpm_tool.rs | 2 +- legacy/node/tool/src/yarn_tool.rs | 8 ++++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/legacy/node/tool/src/node_tool.rs b/legacy/node/tool/src/node_tool.rs index 75f9b6f74f1..17ce7329f28 100644 --- a/legacy/node/tool/src/node_tool.rs +++ b/legacy/node/tool/src/node_tool.rs @@ -137,7 +137,7 @@ impl NodeTool { _ => { let mut cmd = Command::new(self.get_npx_path()?); cmd.with_console(self.console.clone()); - cmd.args(["--quiet", "--package", package, "--", package]); + cmd.args(["--quiet", "--package", package, "--"]); cmd.envs(get_proto_env_vars()); if let Some(version) = get_proto_version_env(&self.tool) { diff --git a/legacy/node/tool/src/pnpm_tool.rs b/legacy/node/tool/src/pnpm_tool.rs index 8b592cad230..3ae225ce14b 100644 --- a/legacy/node/tool/src/pnpm_tool.rs +++ b/legacy/node/tool/src/pnpm_tool.rs @@ -183,7 +183,7 @@ impl DependencyManager for PnpmTool { return Ok(()); } else { - node.exec_package("pnpm-deduplicate", &[], working_dir) + node.exec_package("pnpm-deduplicate", &["pnpm-deduplicate"], working_dir) .await?; } } diff --git a/legacy/node/tool/src/yarn_tool.rs b/legacy/node/tool/src/yarn_tool.rs index cd493e9cd6d..4170bb6d5a8 100644 --- a/legacy/node/tool/src/yarn_tool.rs +++ b/legacy/node/tool/src/yarn_tool.rs @@ -213,8 +213,12 @@ impl DependencyManager for YarnTool { } else { // Will error if the lockfile does not exist! if working_dir.join(self.get_lock_filename()).exists() { - node.exec_package("yarn-deduplicate", &["yarn.lock"], working_dir) - .await?; + node.exec_package( + "yarn-deduplicate", + &["yarn-deduplicate", "yarn.lock"], + working_dir, + ) + .await?; } }