-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
fix(core): add cargo and gradle to external graph node type #29610
base: master
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
View your CI Pipeline Execution ↗ for commit 7591790.
☁️ Nx Cloud last updated this comment at |
b609459
to
e17c98b
Compare
@@ -14,8 +14,8 @@ while allowing tracking of the full tree of different nested versions | |||
### Properties | |||
|
|||
- [data](../../devkit/documents/ProjectGraphExternalNode#data): Object | |||
- [name](../../devkit/documents/ProjectGraphExternalNode#name): `npm:${string}` | |||
- [type](../../devkit/documents/ProjectGraphExternalNode#type): "npm" | |||
- [name](../../devkit/documents/ProjectGraphExternalNode#name): `npm:${string}` | `cargo:${string}` | `gradle:${string}` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
imho this should just be string
, nx-dotnet would likely add a new one, nxlv/poetry would add a new one etc.
e17c98b
to
929f773
Compare
@@ -114,15 +120,21 @@ export interface ProjectGraphProjectNode { | |||
* | |||
*/ | |||
export interface ProjectGraphExternalNode { | |||
type: 'npm'; | |||
name: `npm:${string}`; | |||
type: 'npm' | 'cargo' | 'gradle'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to the name
just being a string, nx-dotnet would add external nodes that had type nuget
or similar so this should also probably just be a string.
export function isProjectGraphExternalNode( | ||
node: ProjectGraphProjectNode | ProjectGraphExternalNode | ||
): node is ProjectGraphExternalNode { | ||
return node.type === 'npm' || node.type === 'cargo' || node.type === 'gradle'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If node.type is just a string to support things like nuget
and pip
, this check should probably be checking that the node is not a library, app, or e2e instead of a whitelist of external node types.
929f773
to
7591790
Compare
Current Behavior
Expected Behavior
Related Issue(s)
Fixes #