Skip to content
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

fix(task): ensure root config always looks up dependencies in root #26959

Merged
merged 2 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions tests/specs/task/dependencies_root_not_cycle/__test__.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"args": "task a",
"cwd": "member",
"output": "task.out"
}
10 changes: 10 additions & 0 deletions tests/specs/task/dependencies_root_not_cycle/deno.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"tasks": {
"a": "echo root-a",
"b": {
"dependencies": ["a"],
"command": "echo b"
}
},
"workspace": ["./member"]
}
8 changes: 8 additions & 0 deletions tests/specs/task/dependencies_root_not_cycle/member/deno.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"tasks": {
"a": {
"dependencies": ["b"],
"command": "echo a"
}
}
}
6 changes: 6 additions & 0 deletions tests/specs/task/dependencies_root_not_cycle/task.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Task a echo root-a
a
Task b echo b
b
Task a echo a
a
14 changes: 14 additions & 0 deletions tests/specs/task/dependencies_shadowed_root_name/__test__.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"tests": {
"root_dependending_root": {
"args": "task root-depending-root",
"cwd": "member",
"output": "root_dependending_root.out"
},
"member_depending_root_and_member": {
"args": "task member-dependending-root-and-member",
"cwd": "member",
"output": "member_depending_root_and_member.out"
}
}
}
12 changes: 12 additions & 0 deletions tests/specs/task/dependencies_shadowed_root_name/deno.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"tasks": {
"build": "echo root",
"root-depending-root": {
"dependencies": [
"build"
],
"command": "echo test"
}
},
"workspace": ["./member"]
}
12 changes: 12 additions & 0 deletions tests/specs/task/dependencies_shadowed_root_name/member/deno.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"tasks": {
"build": "echo member",
"member-dependending-root-and-member": {
"dependencies": [
"build",
"root-depending-root"
],
"command": "echo member-test"
}
}
}
dsherret marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[UNORDERED_START]
Task build echo member
member
Task root-depending-root echo test
test
Task root echo root
root
[UNORDERED_END]
Task member-depending-root-and-member echo member-test
member-test
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Task build echo root
root
Task root-depending-root echo test
test