diff --git a/.yarn/versions/3fdb67ef.yml b/.yarn/versions/3fdb67ef.yml new file mode 100644 index 00000000000..1f2a5d9c201 --- /dev/null +++ b/.yarn/versions/3fdb67ef.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/Cargo.lock b/Cargo.lock index cdd1b66f575..2fb70193564 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -518,9 +518,9 @@ checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" [[package]] name = "cached" -version = "0.46.0" +version = "0.46.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cead8ece0da6b744b2ad8ef9c58a4cdc7ef2921e60a6ddfb9eaaa86839b5fc5" +checksum = "c7c8c50262271cdf5abc979a5f76515c234e764fa025d1ba4862c0f0bcda0e95" dependencies = [ "ahash 0.8.3", "cached_proc_macro", @@ -533,9 +533,9 @@ dependencies = [ [[package]] name = "cached_proc_macro" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7da8245dd5f576a41c3b76247b54c15b0e43139ceeb4f732033e15be7c005176" +checksum = "c878c71c2821aa2058722038a59a67583a4240524687c6028571c9b395ded61f" dependencies = [ "darling 0.14.4", "proc-macro2", @@ -4562,9 +4562,9 @@ dependencies = [ [[package]] name = "proto_core" -version = "0.21.0" +version = "0.22.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f881a9776f74945cfa8045332c5c6811e05642f6ebde1e87fc1845a6610ee178" +checksum = "7d9a5d9c3dd0b60d7c1edaf3b034aa8df9a5e8fd80274f267877a78adf974e3e" dependencies = [ "cached", "extism", @@ -4593,9 +4593,9 @@ dependencies = [ [[package]] name = "proto_pdk_api" -version = "0.9.0" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0d49bf81e0c2033a4660270a2c8ff6f331ba0cb61500c6d3dc41d8f18cd5ce3" +checksum = "21bbe68a00cf53fea3cede44415daac87e994024bc9c67138c1870c17d7fbef7" dependencies = [ "anyhow", "semver", @@ -5087,9 +5087,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.190" +version = "1.0.192" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91d3c334ca1ee894a2c6f6ad698fe8c435b76d504b13d436f0685d648d6d96f7" +checksum = "bca2a08484b285dcb282d0f67b26cadc0df8b19f8c12502c13d966bf9482f001" dependencies = [ "serde_derive", ] @@ -5106,9 +5106,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.190" +version = "1.0.192" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c5609f394e5c2bd7fc51efda478004ea80ef42fee983d5c67a65e34f32c0e3" +checksum = "d6c7207fbec9faa48073f3e3074cbe553af6ea512d7c21ba46e434e70ea9fbc1" dependencies = [ "proc-macro2", "quote", @@ -5117,9 +5117,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.107" +version = "1.0.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65" +checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" dependencies = [ "indexmap 2.0.2", "itoa", @@ -5621,9 +5621,9 @@ dependencies = [ [[package]] name = "system_env" -version = "0.1.2" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9a9eb72230d28d8116aab631232e98675a7fd3e69b81b046d54205bd21e16d5" +checksum = "fb5430c2b1d8315d22edaebbd40617f9110ccfd95e95684802d0d17907f44966" dependencies = [ "serde", "serde_json", @@ -6336,12 +6336,11 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "version_spec" -version = "0.1.2" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4b04ad32a44cc11c64dfea589d20cd36c82f0662ac683c022a185b7c6a7dfb0" +checksum = "a874b9ff438ee535ce27c6099a76f23483b475e5942b85fd97d4a6806abaa3f3" dependencies = [ "human-sort", - "once_cell", "regex", "semver", "serde", @@ -6390,9 +6389,9 @@ dependencies = [ [[package]] name = "warpgate" -version = "0.5.13" +version = "0.5.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31378533107129c8dcc2cc8b2333768a21374ccecc735d33c468b4ebe747b225" +checksum = "2662e91ce31608be2b2f653bb7d7f4b35f4862721c9b4439110cd21a22684279" dependencies = [ "extism", "miette", @@ -6413,9 +6412,9 @@ dependencies = [ [[package]] name = "warpgate_api" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88d55e21fc85ba24a15b008acf53638354e81d14ba966bb909918271b1f0138d" +checksum = "9a4834d752d83450aab41986e1b9a08d069bbe09a83fe016532de19d0a87e24e" dependencies = [ "serde", ] diff --git a/Cargo.toml b/Cargo.toml index 68c73231281..8f8e023a3bb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -38,7 +38,7 @@ pathdiff = "0.2.1" petgraph = { version = "0.6.4", default-features = false, features = [ "serde-1", ] } -proto_core = "=0.21.0" +proto_core = "0.22.5" relative-path = { version = "1.9.0", features = ["serde"] } regex = "1.10.2" reqwest = { version = "0.11.22", default-features = false, features = [ @@ -90,5 +90,3 @@ tokio-util = "0.7.10" tracing = "0.1.40" url = "2.4.1" uuid = { version = "1.5.0", features = ["v4"] } - -warpgate = "=0.5.13" diff --git a/crates/node/platform/src/actions/run_target.rs b/crates/node/platform/src/actions/run_target.rs index 602040a5fa2..7b6b1bd4bbf 100644 --- a/crates/node/platform/src/actions/run_target.rs +++ b/crates/node/platform/src/actions/run_target.rs @@ -208,7 +208,7 @@ pub fn create_target_command( if !is_package_manager && !node.global { command.env( "PATH", - prepend_path_env_var([node.tool.get_bin_path()?.parent().unwrap()]), + prepend_path_env_var([node.tool.get_exe_path()?.parent().unwrap()]), ); } diff --git a/crates/node/tool/src/bun_tool.rs b/crates/node/tool/src/bun_tool.rs index 7618752ce25..f7daba04813 100644 --- a/crates/node/tool/src/bun_tool.rs +++ b/crates/node/tool/src/bun_tool.rs @@ -57,18 +57,10 @@ impl Tool for BunTool { Ok(if self.global { "bun".into() } else { - self.tool.get_bin_path()?.to_path_buf() + self.tool.get_exe_path()?.to_path_buf() }) } - fn get_shim_path(&self) -> Option { - if self.global { - return None; - } - - self.tool.get_shim_path().map(|p| p.to_path_buf()) - } - async fn setup( &mut self, last_versions: &mut FxHashMap, @@ -138,7 +130,7 @@ impl DependencyManager for BunTool { if !self.global { cmd.env( "PATH", - prepend_path_env_var([self.tool.get_bin_path()?.parent().unwrap()]), + prepend_path_env_var([self.tool.get_exe_path()?.parent().unwrap()]), ); } diff --git a/crates/node/tool/src/node_tool.rs b/crates/node/tool/src/node_tool.rs index 65dee483c7e..a3200334019 100644 --- a/crates/node/tool/src/node_tool.rs +++ b/crates/node/tool/src/node_tool.rs @@ -104,7 +104,7 @@ impl NodeTool { if !self.global { cmd.env( "PATH", - prepend_path_env_var([self.tool.get_bin_path()?.parent().unwrap()]), + prepend_path_env_var([self.tool.get_exe_path()?.parent().unwrap()]), ); } @@ -195,7 +195,7 @@ impl Tool for NodeTool { Ok(if self.global { "node".into() } else { - self.tool.get_bin_path()?.to_path_buf() + self.tool.get_exe_path()?.to_path_buf() }) } diff --git a/crates/node/tool/src/npm_tool.rs b/crates/node/tool/src/npm_tool.rs index 05b0adb6375..4fec3bac988 100644 --- a/crates/node/tool/src/npm_tool.rs +++ b/crates/node/tool/src/npm_tool.rs @@ -43,18 +43,10 @@ impl Tool for NpmTool { Ok(if self.global { "npm".into() } else { - self.tool.get_bin_path()?.to_path_buf() + self.tool.get_exe_path()?.to_path_buf() }) } - fn get_shim_path(&self) -> Option { - if self.global { - return None; - } - - self.tool.get_shim_path().map(|p| p.to_path_buf()) - } - async fn setup( &mut self, last_versions: &mut FxHashMap, @@ -134,7 +126,7 @@ impl DependencyManager for NpmTool { "PATH", prepend_path_env_var([ node.get_bin_path()?.parent().unwrap(), - self.tool.get_bin_path()?.parent().unwrap(), + self.tool.get_exe_path()?.parent().unwrap(), ]), ); } diff --git a/crates/node/tool/src/pnpm_tool.rs b/crates/node/tool/src/pnpm_tool.rs index fb5a54bea2b..e23b88a0028 100644 --- a/crates/node/tool/src/pnpm_tool.rs +++ b/crates/node/tool/src/pnpm_tool.rs @@ -51,18 +51,10 @@ impl Tool for PnpmTool { Ok(if self.global { "pnpm".into() } else { - self.tool.get_bin_path()?.to_path_buf() + self.tool.get_exe_path()?.to_path_buf() }) } - fn get_shim_path(&self) -> Option { - if self.global { - return None; - } - - self.tool.get_shim_path().map(|p| p.to_path_buf()) - } - async fn setup( &mut self, last_versions: &mut FxHashMap, @@ -142,7 +134,7 @@ impl DependencyManager for PnpmTool { "PATH", prepend_path_env_var([ node.get_bin_path()?.parent().unwrap(), - self.tool.get_bin_path()?.parent().unwrap(), + self.tool.get_exe_path()?.parent().unwrap(), ]), ); } diff --git a/crates/node/tool/src/yarn_tool.rs b/crates/node/tool/src/yarn_tool.rs index d4354b772a6..6ee7094d1c0 100644 --- a/crates/node/tool/src/yarn_tool.rs +++ b/crates/node/tool/src/yarn_tool.rs @@ -113,18 +113,10 @@ impl Tool for YarnTool { Ok(if self.global { "yarn".into() } else { - self.tool.get_bin_path()?.to_path_buf() + self.tool.get_exe_path()?.to_path_buf() }) } - fn get_shim_path(&self) -> Option { - if self.global { - return None; - } - - self.tool.get_shim_path().map(|p| p.to_path_buf()) - } - async fn setup( &mut self, last_versions: &mut FxHashMap, @@ -204,7 +196,7 @@ impl DependencyManager for YarnTool { "PATH", prepend_path_env_var([ node.get_bin_path()?.parent().unwrap(), - self.tool.get_bin_path()?.parent().unwrap(), + self.tool.get_exe_path()?.parent().unwrap(), ]), ); } diff --git a/nextgen/config/src/toolchain/mod.rs b/nextgen/config/src/toolchain/mod.rs index 92f4cc947ba..5760ad474fd 100644 --- a/nextgen/config/src/toolchain/mod.rs +++ b/nextgen/config/src/toolchain/mod.rs @@ -12,7 +12,7 @@ pub use typescript_config::*; #[macro_export] macro_rules! inherit_tool { - ($config:ident, $tool:ident, $key:expr, $method:ident, $plugin:literal) => { + ($config:ident, $tool:ident, $key:expr, $method:ident) => { pub fn $method(&mut self, proto_tools: &ToolsConfig) -> miette::Result<()> { if let Some(version) = proto_tools.tools.get($key) { let config = self.$tool.get_or_insert_with($config::default); @@ -24,10 +24,10 @@ macro_rules! inherit_tool { if let Some(config) = &mut self.$tool { if config.plugin.is_none() { - // config.plugin = proto_tools.plugins.get($key).cloned(); - config.plugin = Some(PluginLocator::SourceUrl { - url: $plugin.into(), - }); + config.plugin = proto_tools.plugins.get($key).cloned(); + // config.plugin = Some(PluginLocator::SourceUrl { + // url: $plugin.into(), + // }); } } @@ -38,7 +38,7 @@ macro_rules! inherit_tool { #[macro_export] macro_rules! inherit_tool_required { - ($config:ident, $tool:ident, $key:expr, $method:ident, $plugin:literal) => { + ($config:ident, $tool:ident, $key:expr, $method:ident) => { pub fn $method(&mut self, proto_tools: &ToolsConfig) -> miette::Result<()> { if let Some(version) = proto_tools.tools.get($key) { if self.$tool.version.is_none() { @@ -47,10 +47,7 @@ macro_rules! inherit_tool_required { } if self.$tool.plugin.is_none() { - // self.$tool.plugin = proto_tools.plugins.get($key).cloned(); - self.$tool.plugin = Some(PluginLocator::SourceUrl { - url: $plugin.into(), - }); + self.$tool.plugin = proto_tools.plugins.get($key).cloned(); } Ok(()) diff --git a/nextgen/config/src/toolchain/node_config.rs b/nextgen/config/src/toolchain/node_config.rs index 62431dbebbf..a987b056ab7 100644 --- a/nextgen/config/src/toolchain/node_config.rs +++ b/nextgen/config/src/toolchain/node_config.rs @@ -162,37 +162,13 @@ pub struct NodeConfig { } impl NodeConfig { - inherit_tool_required!( - NpmConfig, - npm, - "npm", - inherit_proto_npm, - "https://github.com/moonrepo/node-plugin/releases/download/v0.4.3/node_depman_plugin.wasm" - ); - - inherit_tool!( - BunpmConfig, - bun, - "bun", - inherit_proto_bun, - "https://github.com/moonrepo/bun-plugin/releases/download/v0.4.0/bun_plugin.wasm" - ); - - inherit_tool!( - PnpmConfig, - pnpm, - "pnpm", - inherit_proto_pnpm, - "https://github.com/moonrepo/node-plugin/releases/download/v0.4.3/node_depman_plugin.wasm" - ); - - inherit_tool!( - YarnConfig, - yarn, - "yarn", - inherit_proto_yarn, - "https://github.com/moonrepo/node-plugin/releases/download/v0.4.3/node_depman_plugin.wasm" - ); + inherit_tool_required!(NpmConfig, npm, "npm", inherit_proto_npm); + + inherit_tool!(BunpmConfig, bun, "bun", inherit_proto_bun); + + inherit_tool!(PnpmConfig, pnpm, "pnpm", inherit_proto_pnpm); + + inherit_tool!(YarnConfig, yarn, "yarn", inherit_proto_yarn); pub fn inherit_proto(&mut self, proto_tools: &ToolsConfig) -> miette::Result<()> { match &self.package_manager { @@ -243,7 +219,7 @@ impl NodeConfig { if self.plugin.is_none() { self.plugin = Some(PluginLocator::SourceUrl { - url: "https://github.com/moonrepo/node-plugin/releases/download/v0.4.3/node_plugin.wasm".into() + url: "https://github.com/moonrepo/node-plugin/releases/download/v0.5.0/node_plugin.wasm".into() }); } diff --git a/nextgen/config/src/toolchain_config.rs b/nextgen/config/src/toolchain_config.rs index 54ec973041e..151448f0307 100644 --- a/nextgen/config/src/toolchain_config.rs +++ b/nextgen/config/src/toolchain_config.rs @@ -5,7 +5,7 @@ use crate::toolchain::*; use crate::validate::check_yml_extension; use crate::{inherit_tool, inherit_tool_without_version}; use moon_common::consts; -use proto_core::{PluginLocator, ToolsConfig}; +use proto_core::ToolsConfig; use schematic::{validate, Config, ConfigLoader}; use std::path::Path; @@ -37,21 +37,9 @@ pub struct ToolchainConfig { impl ToolchainConfig { inherit_tool_without_version!(DenoConfig, deno, "deno", inherit_proto_deno); - inherit_tool!( - RustConfig, - rust, - "rust", - inherit_proto_rust, - "https://github.com/moonrepo/rust-plugin/releases/download/v0.3.1/rust_plugin.wasm" - ); + inherit_tool!(RustConfig, rust, "rust", inherit_proto_rust); - inherit_tool!( - NodeConfig, - node, - "node", - inherit_proto_node, - "https://github.com/moonrepo/node-plugin/releases/download/v0.4.3/node_plugin.wasm" - ); + inherit_tool!(NodeConfig, node, "node", inherit_proto_node); inherit_tool_without_version!( TypeScriptConfig, diff --git a/nextgen/config/tests/toolchain_config_test.rs b/nextgen/config/tests/toolchain_config_test.rs index 7b3e89564e6..97db26c8960 100644 --- a/nextgen/config/tests/toolchain_config_test.rs +++ b/nextgen/config/tests/toolchain_config_test.rs @@ -221,7 +221,7 @@ node: assert_eq!( config.node.unwrap().plugin.unwrap(), PluginLocator::SourceUrl { - url: "https://github.com/moonrepo/node-plugin/releases/download/v0.4.3/node_plugin.wasm".into() + url: "https://github.com/moonrepo/node-plugin/releases/download/v0.5.0/node_plugin.wasm".into() } ); } @@ -322,7 +322,7 @@ node: assert_eq!( config.node.unwrap().npm.plugin.unwrap(), PluginLocator::SourceUrl { - url: "https://github.com/moonrepo/node-plugin/releases/download/v0.4.3/node_depman_plugin.wasm".into() + url: "https://github.com/moonrepo/node-plugin/releases/download/v0.5.0/node_depman_plugin.wasm".into() } ); } @@ -413,7 +413,7 @@ node: assert_eq!( config.node.unwrap().pnpm.unwrap().plugin.unwrap(), PluginLocator::SourceUrl { - url: "https://github.com/moonrepo/node-plugin/releases/download/v0.4.3/node_depman_plugin.wasm".into() + url: "https://github.com/moonrepo/node-plugin/releases/download/v0.5.0/node_depman_plugin.wasm".into() } ); } @@ -437,7 +437,7 @@ node: assert_eq!( config.node.unwrap().pnpm.unwrap().plugin.unwrap(), PluginLocator::SourceUrl { - url: "https://github.com/moonrepo/node-plugin/releases/download/v0.4.3/node_depman_plugin.wasm".into() + url: "https://github.com/moonrepo/node-plugin/releases/download/v0.5.0/node_depman_plugin.wasm".into() } ); } @@ -537,7 +537,7 @@ node: assert_eq!( config.node.unwrap().yarn.unwrap().plugin.unwrap(), PluginLocator::SourceUrl { - url: "https://github.com/moonrepo/node-plugin/releases/download/v0.4.3/node_depman_plugin.wasm".into() + url: "https://github.com/moonrepo/node-plugin/releases/download/v0.5.0/node_depman_plugin.wasm".into() } ); } @@ -561,7 +561,7 @@ node: assert_eq!( config.node.unwrap().yarn.unwrap().plugin.unwrap(), PluginLocator::SourceUrl { - url: "https://github.com/moonrepo/node-plugin/releases/download/v0.4.3/node_depman_plugin.wasm".into() + url: "https://github.com/moonrepo/node-plugin/releases/download/v0.5.0/node_depman_plugin.wasm".into() } ); } @@ -661,7 +661,7 @@ node: assert_eq!( config.node.unwrap().bun.unwrap().plugin.unwrap(), PluginLocator::SourceUrl { - url: "https://github.com/moonrepo/bun-plugin/releases/download/v0.4.0/bun_plugin.wasm".into() + url: "https://github.com/moonrepo/bun-plugin/releases/download/v0.5.0/bun_plugin.wasm".into() } ); } @@ -685,7 +685,7 @@ node: assert_eq!( config.node.unwrap().bun.unwrap().plugin.unwrap(), PluginLocator::SourceUrl { - url: "https://github.com/moonrepo/bun-plugin/releases/download/v0.4.0/bun_plugin.wasm".into() + url: "https://github.com/moonrepo/bun-plugin/releases/download/v0.5.0/bun_plugin.wasm".into() } ); } @@ -867,7 +867,7 @@ rust: assert_eq!( config.rust.unwrap().plugin.unwrap(), PluginLocator::SourceUrl { - url: "https://github.com/moonrepo/rust-plugin/releases/download/v0.3.1/rust_plugin.wasm".into() + url: "https://github.com/moonrepo/rust-plugin/releases/download/v0.4.0/rust_plugin.wasm".into() } ); } diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index 30f6793e320..271125d52a5 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -17,12 +17,23 @@ - Updated `projects` globs to support ending in `moon.yml`. - Updated `node.dependencyVersionFormat` to fallback to a supported format when the chosen `node.packageManager` does not support the configured (or default) version format. +- Updated to proto v0.21.0. #### 🐞 Fixes - Fixed an issue where dependencies were being injected into the root `package.json`, when a root-level project was dependending on non-root project tasks. +#### 🧩 Plugins + +- Updated `bun_plugin` to v0.5. +- Updated `deno_plugin` to v0.5. +- Updated `go_plugin` to v0.5. +- Updated `node_plugin` and `node_depman_plugin` to v0.5. +- Updated `python_plugin` to v0.2. +- Updated `rust_plugin` to v0.4. +- Updated `schema_plugin` (TOML) to v0.5. + ## 1.16.1 #### 🐞 Fixes