Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "additional-envs",
"private": true,
"scripts": {
"hello": "echo hello"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# no `packages` field
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[[plan]]
name = "allow `packages` in pnpm-workspace.yaml to be optional"
args = ["run", "hello"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
source: crates/vite_task_plan/tests/plan_snapshots/main.rs
expression: "&plan_json"
input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/pnpm-workspace-packages-optional
---
{
"root_node": {
"Expanded": [
{
"key": [
"<workspace>/",
"hello"
],
"node": {
"task_display": {
"package_name": "additional-envs",
"task_name": "hello",
"package_path": "<workspace>/"
},
"items": [
{
"execution_item_display": {
"task_display": {
"package_name": "additional-envs",
"task_name": "hello",
"package_path": "<workspace>/"
},
"command": "echo hello",
"and_item_index": null,
"cwd": "<workspace>/"
},
"kind": {
"Leaf": {
"InProcess": {
"kind": {
"Echo": {
"strings": [
"hello"
],
"trailing_newline": true
}
}
}
}
}
}
]
},
"neighbors": []
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
source: crates/vite_task_plan/tests/plan_snapshots/main.rs
expression: task_graph_json
input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/pnpm-workspace-packages-optional
---
[
{
"key": [
"<workspace>/",
"hello"
],
"node": {
"task_display": {
"package_name": "additional-envs",
"task_name": "hello",
"package_path": "<workspace>/"
},
"resolved_config": {
"command": "echo hello",
"resolved_options": {
"cwd": "<workspace>/",
"cache_config": {
"env_config": {
"fingerprinted_envs": [],
"pass_through_envs": [
"<default pass-through envs>"
]
}
}
}
}
},
"neighbors": []
}
]
1 change: 1 addition & 0 deletions crates/vite_workspace/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ struct PnpmWorkspace {
/// The packages to include in the workspace.
///
/// <https://pnpm.io/pnpm-workspace_yaml>
#[serde(default)]
packages: Vec<Str>,
}

Expand Down