-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
feat(core): add API entrypoint to register metadata #22773
feat(core): add API entrypoint to register metadata #22773
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
☁️ Nx Cloud ReportCI is running/has finished running commands for commit c721210. 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 6 targets
Sent with 💌 from NxCloud. |
export type ProjectsMetadata = Record< | ||
string, | ||
Pick<ProjectConfiguration, 'metadata'> & { | ||
targets: Record< |
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.
Do we need this? I'm not sure we do. I don't believe the graph provides information to determine metadata for targets anymore than the createNodes inputs does?
} | ||
>; | ||
|
||
export type CreateMetadata<T = unknown> = ( |
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.
Can we move the graph
out of the context to the first or second argument here?
I think the graph
is the primary input for this function. It should not be in context
along with stuff which is well contextual / environmental.
return await applyProjectMetadata(result, plugins, { | ||
graph: result, | ||
nxJsonConfiguration: context.nxJsonConfiguration, | ||
workspaceRoot, | ||
}); |
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.
I don't think we should return directly... I think should do the same as nodes and dependencies.
If we have a partial graph, we should still be able to create metadata right? Is there any issue with that?
Just because a project is missing say... a lint target, does not mean we cannot identify that project as a React project.
So I think we should collect errors.. and return/throw afterwards.
|
||
for (const result of metadataResults) { | ||
if (isCreateMetadataError(result)) { | ||
errors.push(result); |
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.
As far as I can see, these errors are not used anywhere.
dab73c1
to
178e75f
Compare
178e75f
to
1eba01b
Compare
1eba01b
to
5b691f2
Compare
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request. |
Current Behavior
Expected Behavior
Related Issue(s)
Fixes #