From e5c3c21e95bd6c8cfb0d26de8f79684709d64e81 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Tue, 9 Jul 2024 17:06:50 -0400 Subject: feat(workspace): support object config (#24483) This adds object config for the workspace config: ```json { "workspace": { "members": ["./member-1", "./member-2"] } } ``` This is a more verbose version of `"workspace": ["./member-1", "./member-2"]`. Although we don't need it at the moment, it makes the naming of `"workspace"` more clear and leaves the object open for more config in the future. Closes https://github.com/denoland/deno/issues/24456 --- cli/lsp/config.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cli/lsp') diff --git a/cli/lsp/config.rs b/cli/lsp/config.rs index 481273930..d207b81a9 100644 --- a/cli/lsp/config.rs +++ b/cli/lsp/config.rs @@ -1534,11 +1534,12 @@ impl ConfigData { let workspace = config_file .as_ref() - .and_then(|c| c.json.workspace.as_ref().map(|w| (c, w))); + .and_then(|c| c.to_workspace_config().ok().flatten().map(|w| (c, w))); let is_workspace_root = workspace.is_some(); let workspace_members = if let Some((config, workspace)) = workspace { Arc::new( workspace + .members .iter() .flat_map(|p| { let dir_specifier = config.specifier.join(p).ok()?; -- cgit v1.2.3