From 7617f67b064e9d3595f9588735a518cd0e39b38e Mon Sep 17 00:00:00 2001 From: Jonathan Cammisuli Date: Wed, 10 Aug 2022 10:48:42 -0400 Subject: [PATCH] fix: do not include workspace deps in project view --- .../vscode/nx-workspace/src/lib/get-nx-workspace-config.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libs/vscode/nx-workspace/src/lib/get-nx-workspace-config.ts b/libs/vscode/nx-workspace/src/lib/get-nx-workspace-config.ts index 735f10dfe2..77c867a59e 100644 --- a/libs/vscode/nx-workspace/src/lib/get-nx-workspace-config.ts +++ b/libs/vscode/nx-workspace/src/lib/get-nx-workspace-config.ts @@ -126,6 +126,13 @@ function addProjectTargets( const workspaceProject = workspaceConfiguration.projects[projectName]; if (!workspaceProject) { + // Certain versions of Nx will include npm, (or other third party dependencies) in the project graph nodes. + // These usually start with `npm:depname` + // We dont want to include them. + if (projectName.match(/:/)) { + continue; + } + workspaceConfiguration.projects[projectName] = { root: node.data.root, targets: node.data.targets ?? {},