Skip to content

Commit 084328e

Browse files
committed
add plan test
1 parent 9f815b2 commit 084328e

5 files changed

Lines changed: 99 additions & 0 deletions

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"name": "additional-envs",
3+
"private": true,
4+
"scripts": {
5+
"hello": "echo hello"
6+
}
7+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# no `packages` field
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[[plan]]
2+
name = "allow `packages` in pnpm-workspace.yaml to be optional"
3+
args = ["run", "hello"]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
source: crates/vite_task_plan/tests/plan_snapshots/main.rs
3+
expression: "&plan_json"
4+
input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/pnpm-workspace-packages-optional
5+
---
6+
{
7+
"root_node": {
8+
"Expanded": [
9+
{
10+
"key": [
11+
"<workspace>/",
12+
"hello"
13+
],
14+
"node": {
15+
"task_display": {
16+
"package_name": "additional-envs",
17+
"task_name": "hello",
18+
"package_path": "<workspace>/"
19+
},
20+
"items": [
21+
{
22+
"execution_item_display": {
23+
"task_display": {
24+
"package_name": "additional-envs",
25+
"task_name": "hello",
26+
"package_path": "<workspace>/"
27+
},
28+
"command": "echo hello",
29+
"and_item_index": null,
30+
"cwd": "<workspace>/"
31+
},
32+
"kind": {
33+
"Leaf": {
34+
"InProcess": {
35+
"kind": {
36+
"Echo": {
37+
"strings": [
38+
"hello"
39+
],
40+
"trailing_newline": true
41+
}
42+
}
43+
}
44+
}
45+
}
46+
}
47+
]
48+
},
49+
"neighbors": []
50+
}
51+
]
52+
}
53+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
source: crates/vite_task_plan/tests/plan_snapshots/main.rs
3+
expression: task_graph_json
4+
input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/pnpm-workspace-packages-optional
5+
---
6+
[
7+
{
8+
"key": [
9+
"<workspace>/",
10+
"hello"
11+
],
12+
"node": {
13+
"task_display": {
14+
"package_name": "additional-envs",
15+
"task_name": "hello",
16+
"package_path": "<workspace>/"
17+
},
18+
"resolved_config": {
19+
"command": "echo hello",
20+
"resolved_options": {
21+
"cwd": "<workspace>/",
22+
"cache_config": {
23+
"env_config": {
24+
"fingerprinted_envs": [],
25+
"pass_through_envs": [
26+
"<default pass-through envs>"
27+
]
28+
}
29+
}
30+
}
31+
}
32+
},
33+
"neighbors": []
34+
}
35+
]

0 commit comments

Comments
 (0)