Skip to content

Commit

Permalink
deps(proto): Upgrade to v0.22.5. (#1177)
Browse files Browse the repository at this point in the history
* Update proto.

* Fix tests.

* Bump.
  • Loading branch information
milesj authored Nov 14, 2023
1 parent b90f9a0 commit 21ebd34
Show file tree
Hide file tree
Showing 14 changed files with 81 additions and 135 deletions.
9 changes: 9 additions & 0 deletions .yarn/versions/3fdb67ef.yml
Original file line number Diff line number Diff line change
@@ -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
45 changes: 22 additions & 23 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down Expand Up @@ -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"
2 changes: 1 addition & 1 deletion crates/node/platform/src/actions/run_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()]),
);
}

Expand Down
12 changes: 2 additions & 10 deletions crates/node/tool/src/bun_tool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<PathBuf> {
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<String, UnresolvedVersionSpec>,
Expand Down Expand Up @@ -138,7 +130,7 @@ impl DependencyManager<NodeTool> 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()]),
);
}

Expand Down
4 changes: 2 additions & 2 deletions crates/node/tool/src/node_tool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()]),
);
}

Expand Down Expand Up @@ -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()
})
}

Expand Down
12 changes: 2 additions & 10 deletions crates/node/tool/src/npm_tool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<PathBuf> {
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<String, UnresolvedVersionSpec>,
Expand Down Expand Up @@ -134,7 +126,7 @@ impl DependencyManager<NodeTool> 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(),
]),
);
}
Expand Down
12 changes: 2 additions & 10 deletions crates/node/tool/src/pnpm_tool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<PathBuf> {
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<String, UnresolvedVersionSpec>,
Expand Down Expand Up @@ -142,7 +134,7 @@ impl DependencyManager<NodeTool> 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(),
]),
);
}
Expand Down
12 changes: 2 additions & 10 deletions crates/node/tool/src/yarn_tool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<PathBuf> {
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<String, UnresolvedVersionSpec>,
Expand Down Expand Up @@ -204,7 +196,7 @@ impl DependencyManager<NodeTool> 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(),
]),
);
}
Expand Down
17 changes: 7 additions & 10 deletions nextgen/config/src/toolchain/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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(),
// });
}
}

Expand All @@ -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() {
Expand All @@ -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(())
Expand Down
Loading

0 comments on commit 21ebd34

Please sign in to comment.