From b39c737fbdc61f2a08aeaae9c158042942d09b28 Mon Sep 17 00:00:00 2001 From: Alfredo Garcia Date: Thu, 23 Jan 2025 18:36:41 -0600 Subject: [PATCH] Allowing 'tasks' instead of 'pipeline' in turbo.json --- src/providers/node/turborepo.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/providers/node/turborepo.rs b/src/providers/node/turborepo.rs index 604b12e78..f2a0ec84f 100644 --- a/src/providers/node/turborepo.rs +++ b/src/providers/node/turborepo.rs @@ -13,7 +13,10 @@ use super::{NodeProvider, PackageJson}; #[derive(Debug, Deserialize, Serialize)] pub struct TurboJson { + #[serde(default)] pub pipeline: HashMap, + #[serde(default)] + pub tasks: HashMap, } #[derive(Debug, Deserialize, Serialize)] @@ -39,7 +42,7 @@ impl Turborepo { } fn get_pipeline_cmd(cfg: &TurboJson, name: &str) -> Option { - if cfg.pipeline.contains_key(name) { + if cfg.pipeline.contains_key(name) || cfg.tasks.contains_key(name) { Some(format!("npx turbo run {name}")) } else { None