Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: use project graph data structure directly #2326

Merged
merged 3 commits into from
Nov 28, 2024

Conversation

MaxKless
Copy link
Collaborator

@MaxKless MaxKless commented Nov 22, 2024

No description provided.

Copy link

nx-cloud bot commented Nov 22, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit b99dbdb. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

@MaxKless MaxKless force-pushed the use-project-graph-directly branch 2 times, most recently from a8577a3 to d3e5eff Compare November 27, 2024 14:26
return nxWorkspace.projectGraph
?.nodes
?.values
?.flatMap { p -> p.data.targets.keys.map { it to p.name } }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this handles if data and targets is null?

return nxWorkspace.workspace.projects
.filter { it.value.targets.contains(targetsListNode.targetName) }
return nxWorkspace.projectGraph.nodes
.filter { it.value.data.targets.contains(targetsListNode.targetName) }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar question to above

?.entries
?.map { entry -> entry.key to (entry.value.targets.keys) }
?.map { entry -> entry.key to (entry.value.data.targets.keys) }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

w.projects = Object.fromEntries(sortedProjects);
return w;
}
// export function sortWorkspaceProjects(
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this commenter section be removed?

@MaxKless MaxKless force-pushed the use-project-graph-directly branch from d3e5eff to 66c8285 Compare November 27, 2024 14:38
@MaxKless MaxKless force-pushed the use-project-graph-directly branch from 80e3bbd to b99dbdb Compare November 28, 2024 13:44
@MaxKless MaxKless merged commit 438659d into master Nov 28, 2024
4 checks passed
@MaxKless MaxKless deleted the use-project-graph-directly branch November 28, 2024 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants