-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat(task): add [monorepo].config_roots for explicit config root listing #7705
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
2858526
feat(task): add [monorepo].config_roots for explicit config root listing
jdx 6678402
[autofix.ci] apply automated fixes
autofix-ci[bot] c31d437
[autofix.ci] apply automated fixes (attempt 2/3)
autofix-ci[bot] 494a290
test(e2e): update monorepo tests to use [monorepo].config_roots
jdx 31729e0
[autofix.ci] apply automated fixes
autofix-ci[bot] d9526aa
[autofix.ci] apply automated fixes (attempt 2/3)
autofix-ci[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,88 @@ | ||
| #!/usr/bin/env bash | ||
| # Test [monorepo].config_roots for explicit config root listing | ||
| export MISE_EXPERIMENTAL=1 | ||
|
|
||
| # Create monorepo root config with explicit config_roots | ||
| cat <<'TOML' >mise.toml | ||
| experimental_monorepo_root = true | ||
|
|
||
| [monorepo] | ||
| config_roots = [ | ||
| "packages/frontend", | ||
| "packages/backend", | ||
| "services/*", | ||
| ] | ||
|
|
||
| [tasks.root] | ||
| run = 'echo "root task"' | ||
| TOML | ||
|
|
||
| # Create packages that ARE in config_roots | ||
| mkdir -p packages/frontend | ||
| cat <<'TOML' >packages/frontend/mise.toml | ||
| [tasks.build] | ||
| run = 'echo "frontend build"' | ||
| TOML | ||
|
|
||
| mkdir -p packages/backend | ||
| cat <<'TOML' >packages/backend/mise.toml | ||
| [tasks.build] | ||
| run = 'echo "backend build"' | ||
| TOML | ||
|
|
||
| # Create services/* for glob test | ||
| mkdir -p services/api | ||
| cat <<'TOML' >services/api/mise.toml | ||
| [tasks.serve] | ||
| run = 'echo "api serve"' | ||
| TOML | ||
|
|
||
| mkdir -p services/worker | ||
| cat <<'TOML' >services/worker/mise.toml | ||
| [tasks.process] | ||
| run = 'echo "worker process"' | ||
| TOML | ||
|
|
||
| # Create a package that is NOT in config_roots (should NOT be discovered) | ||
| mkdir -p packages/ignored | ||
| cat <<'TOML' >packages/ignored/mise.toml | ||
| [tasks.hidden] | ||
| run = 'echo "this should not appear"' | ||
| TOML | ||
|
|
||
| # Create another directory that is NOT in config_roots | ||
| mkdir -p libs/common | ||
| cat <<'TOML' >libs/common/mise.toml | ||
| [tasks.test] | ||
| run = 'echo "this should not appear either"' | ||
| TOML | ||
|
|
||
| # Test 1: Listed explicit paths are discovered | ||
| echo "=== Test 1: Explicit paths are discovered ===" | ||
| output=$(mise tasks --all 2>&1) | ||
| echo "$output" | ||
| echo "$output" | grep -q "//packages/frontend:build" || (echo "FAIL: frontend not found" && exit 1) | ||
| echo "$output" | grep -q "//packages/backend:build" || (echo "FAIL: backend not found" && exit 1) | ||
|
|
||
| # Test 2: Glob patterns work (services/*) | ||
| echo "=== Test 2: Glob patterns work ===" | ||
| echo "$output" | grep -q "//services/api:serve" || (echo "FAIL: services/api not found via glob" && exit 1) | ||
| echo "$output" | grep -q "//services/worker:process" || (echo "FAIL: services/worker not found via glob" && exit 1) | ||
|
|
||
| # Test 3: Unlisted paths are NOT discovered | ||
| echo "=== Test 3: Unlisted paths are not discovered ===" | ||
| if echo "$output" | grep -q "//packages/ignored:hidden"; then | ||
| echo "FAIL: packages/ignored should NOT be discovered" | ||
| exit 1 | ||
| fi | ||
| if echo "$output" | grep -q "//libs/common:test"; then | ||
| echo "FAIL: libs/common should NOT be discovered" | ||
| exit 1 | ||
| fi | ||
|
|
||
| # Test 4: Tasks can still be run | ||
| echo "=== Test 4: Tasks can be run ===" | ||
| mise run '//packages/frontend:build' | grep -q "frontend build" || (echo "FAIL: couldn't run frontend task" && exit 1) | ||
| mise run '//services/api:serve' | grep -q "api serve" || (echo "FAIL: couldn't run api task" && exit 1) | ||
|
|
||
| echo "=== All config_roots tests passed! ===" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The deprecation notice should include information about when this feature will be removed (if planned) to help users understand the urgency of migrating.