-
Notifications
You must be signed in to change notification settings - Fork 2.6k
docs(devkit): document the createNodes compat for Nx versions #33102
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
View your CI Pipeline Execution ↗ for commit 217a652
☁️ Nx Cloud last updated this comment at |
✅ Deploy Preview for nx-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
776422c to
4f393e4
Compare
astro-docs/src/content/docs/extending-nx/createnodes-compatibility.mdoc
Outdated
Show resolved
Hide resolved
astro-docs/src/content/docs/extending-nx/createnodes-compatibility.mdoc
Outdated
Show resolved
Hide resolved
astro-docs/src/content/docs/extending-nx/createnodes-compatibility.mdoc
Outdated
Show resolved
Hide resolved
Nx 22 removed the V1 of the createNodes types. For those supporting older versions of Nx we recommend inlining types if needed.
astro-docs/src/content/docs/extending-nx/createnodes-compatibility.mdoc
Outdated
Show resolved
Hide resolved
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.
Nx Cloud is proposing a fix for your failed CI:
We've formatted the newly added createnodes-compatibility.mdoc file to meet Prettier code style requirements. The formatting adjustments include proper indentation, trailing commas, line wrapping for long type declarations, and removal of extra blank lines.
We verified this fix by re-running astro-docs:format.
Suggested Fix changes
diff --git a/astro-docs/src/content/docs/extending-nx/createnodes-compatibility.mdoc b/astro-docs/src/content/docs/extending-nx/createnodes-compatibility.mdoc
index 7be429f6da..26a3aa6441 100644
--- a/astro-docs/src/content/docs/extending-nx/createnodes-compatibility.mdoc
+++ b/astro-docs/src/content/docs/extending-nx/createnodes-compatibility.mdoc
@@ -91,26 +91,28 @@ In Nx 22 the type for v1 of the create nodes api are removed, you can inline the
import {
CreateNodesV2,
CreateNodesContextV2,
- CreateNodesResult
+ CreateNodesResult,
} from '@nx/devkit';
-
// inlined types for backwards compat to v1 of createNodes
// removed in Nx 22
export interface OldCreateNodesContext extends CreateNodesContextV2 {
- /**
- * The subset of configuration files which match the createNodes pattern
- */
- readonly configFiles: readonly string[];
+ /**
+ * The subset of configuration files which match the createNodes pattern
+ */
+ readonly configFiles: readonly string[];
}
-
type OldCreateNodes<T = unknown> = readonly [
projectFilePattern: string,
createNodesFunction: CreateNodesFunction<T>
];
-export type OldCreateNodesFunction<T = unknown> = (projectConfigurationFile: string, options: T | undefined, context: OldCreateNodesContext) => CreateNodesResult | Promise<CreateNodesResult>;
+export type OldCreateNodesFunction<T = unknown> = (
+ projectConfigurationFile: string,
+ options: T | undefined,
+ context: OldCreateNodesContext
+) => CreateNodesResult | Promise<CreateNodesResult>;
export interface MyPluginOptions {
// your options
Or Apply changes locally with:
npx nx-cloud apply-locally oxic-Yu5e
Apply fix locally with your editor ↗ View interactive diff ↗
🎓 To learn more about Self Healing CI, please visit nx.dev
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
4eb9f82 to
217a652
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. |
add new page for the createNodes api compat
add callouts to extending project graph and tooling plugin page
fixes DOC-255