Skip to content

Commit

Permalink
add comments about file discovery
Browse files Browse the repository at this point in the history
  • Loading branch information
bartlomieju committed Nov 4, 2024
1 parent e3dd2bb commit 51d9510
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/workspace/discovery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -767,6 +767,9 @@ fn resolve_workspace_for_config_folder(
.iter()
.partition(|member| is_glob_pattern(member) || member.starts_with('!'));

// Deno workspaces can discover wildcard members that use either `deno.json`, `deno.jsonc` or `package.json`.
// But it only works for Deno workspaces, npm workspaces don't discover `deno.json(c)` files, otherwise
// we'd be incompatible with npm workspaces if we discovered more files.
let deno_json_paths = collect_member_config_folders(
"Deno",
pattern_members,
Expand Down Expand Up @@ -824,6 +827,8 @@ fn resolve_workspace_for_config_folder(
.iter()
.partition(|member| is_glob_pattern(member) || member.starts_with('!'));

// npm workspaces can discover wildcard members `package.json` files, but not `deno.json(c)` files, otherwise
// we'd be incompatible with npm workspaces if we discovered more files than just `package.json`.
let pkg_json_paths = collect_member_config_folders(
"npm",
pattern_members,
Expand Down

0 comments on commit 51d9510

Please sign in to comment.