Skip to content

Commit 8753e1b

Browse files
authored
feat: improve monorepo support, search tasks (#249)
1 parent 93469b4 commit 8753e1b

35 files changed

Lines changed: 926 additions & 54 deletions

docs/src/content/docs/reference/Tasks.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,15 @@ Navigation understands all the ways tasks can reference each other:
119119
- `depends = ["//projects/...:build"]`, `depends = ["//projects/frontend:*"]`
120120
wildcards. Hovering shows all the matching tasks, and go-to-definition opens
121121
each of them.
122+
- `depends = ["^build"]` — the `build` tasks of the projects the current
123+
project depends on, following the workspace projects graph
122124
- task aliases (`alias = "fmt"`), including in other projects
123125

126+
Tasks declared with `extends = "<name>"` support go-to-definition to the
127+
`[task_templates.<name>]` entry, in the same file or a parent config file.
128+
Dependencies added by `[monorepo.task_defaults]` in the root config are shown
129+
in the task tooltips and included when searching for task references.
130+
124131
### package.json scripts
125132

126133
If the monorepo defines a Node workspace (`workspaces` in the root
@@ -130,12 +137,30 @@ as tasks (e.g. `node:frontend#test`, also addressable as
130137
`package.json` file and can be run like any other task. Go-to-definition on a
131138
reference to such a task jumps to the script in the `package.json` file.
132139

140+
If a mise task in the project's `mise.toml` has the same name as a script, the
141+
toml task takes precedence and keeps the script name as an alias.
142+
143+
With a `turbo.json` file, mise (2026.8.0+) imports the supported metadata of
144+
each script (`dependsOn`, `inputs`, `outputs`, `cache`). Imported dependencies
145+
show up in task tooltips and are included when searching for task references.
146+
133147
### Workspace projects graph
134148

135149
`Mise: Visualize task dependencies` (also available from the mise status bar
136150
menu, under _Task dependencies_) shows the workspace project graph inferred by
137151
mise from ecosystem manifests, in addition to the task dependency graph.
138152

153+
With mise `2026.8.0` or later, projects and their dependency edges are
154+
inferred from Node (`package.json` workspaces or `pnpm-workspace.yaml`), Cargo,
155+
uv, and Go workspace manifests, without needing the underlying toolchains
156+
installed. Go dependency edges are not inferred from `go.mod`; they can be
157+
declared with `[monorepo.projects]` in the monorepo root config:
158+
159+
```toml
160+
[monorepo.projects."go:example.com/fixture/gateway"]
161+
depends = ["go:example.com/fixture/auth"]
162+
```
163+
139164
### Tools and environment variables
140165

141166
Tools and environment variables declared in a monorepo project config (e.g.

package.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -697,6 +697,12 @@
697697
"icon": "$(play)",
698698
"enablement": "!isWeb"
699699
},
700+
{
701+
"command": "mise.searchTasks",
702+
"title": "Mise: Search tasks",
703+
"icon": "$(search)",
704+
"enablement": "!isWeb"
705+
},
700706
{
701707
"command": "mise.watchTask",
702708
"title": "Mise: Run Task in Watch Mode",
@@ -952,6 +958,11 @@
952958
}
953959
],
954960
"view/title": [
961+
{
962+
"command": "mise.searchTasks",
963+
"when": "view == miseTasksView",
964+
"group": "navigation@0"
965+
},
955966
{
956967
"command": "mise.createTomlTaskTopMenu",
957968
"when": "view == miseTasksView",

src/commands.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ export const MISE_RUN_BOOTSTRAP = "mise.runBootstrap";
3131
export const MISE_RUN_BOOTSTRAP_DRY_RUN = "mise.runBootstrapDryRun";
3232
export const MISE_SHOW_BOOTSTRAP = "mise.showBootstrap";
3333
export const MISE_RUN_TASK = "mise.runTask";
34+
export const MISE_SEARCH_TASKS = "mise.searchTasks";
3435
export const MISE_SET_ENV_VARIABLE = "mise.setEnvVariable";
3536
export const MISE_USE_TOOL = "mise.useTool";
3637
export const MISE_USE_TOOL_TOP_MENU = "mise.useToolTopMenu";
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[workspace]
2+
members = ["crates/agent", "crates/protocol", "crates/shared"]
3+
resolver = "2"
4+
5+
[workspace.dependencies]
6+
shared = { path = "crates/shared" }
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[package]
2+
name = "agent"
3+
version = "0.1.0"
4+
edition = "2021"
5+
6+
[dependencies]
7+
renamed-protocol = { package = "protocol", path = "../protocol" }
8+
9+
[dev-dependencies]
10+
shared = { workspace = true }
11+
12+
[target.'cfg(unix)'.build-dependencies]
13+
build-helper = { path = "../build-helper" }
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[tasks.build]
2+
description = "Depends on a task of another crate"
3+
depends = ["//crates/protocol:build"]
4+
run = "echo 'Building agent crate'"
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[package]
2+
name = "build-helper"
3+
version = "0.1.0"
4+
edition = "2021"
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[package]
2+
name = "protocol"
3+
version = "0.1.0"
4+
edition = "2021"
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[tasks.build]
2+
description = "Build the protocol crate"
3+
run = "echo 'Building protocol crate'"
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[package]
2+
name = "shared"
3+
version = "0.1.0"
4+
edition = "2021"

0 commit comments

Comments
 (0)