fix(misc): rename createNodesV2 value usages in v23 migration, not just imports#35930
Conversation
✅ Deploy Preview for nx-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for nx-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
View your CI Pipeline Execution ↗ for commit 22ded30
☁️ Nx Cloud last updated this comment at |
…st imports [Self-Healing CI Rerun]
…ed locally [Self-Healing CI Rerun]
…ns surface for the user to resolve
…ns surface for the user to resolve [Self-Healing CI Rerun]
There was a problem hiding this comment.
Important
At least one additional CI pipeline execution has run since the conclusion below was written and it may no longer be applicable.
Nx Cloud has identified a possible root cause for your failed CI:
We investigated the four failing e2e-gradle tasks and found the failures are caused by a Kotlin 2.3.21 / JDK 24 incompatibility in the CI environment (BackendException during psi2ir compilation and OutOfMemoryError: Java heap space), which are unrelated to the TypeScript migration changes in this PR. No code fix can address these infrastructure-level failures — they require environment remediation such as JDK version alignment or increased JVM heap allocation.
No code changes were suggested for this issue.
Trigger a rerun:
🎓 Learn more about Self-Healing CI on nx.dev
Current Behavior
The v23.0.0
migrate-create-nodes-v2-to-create-nodesmigration (shipped in 22 plugins) rewrites only import/export named bindings ofcreateNodesV2tocreateNodes— it never touches value references in the file body.So a lone
import { createNodesV2 }(or one deduped against an existingcreateNodes) is renamed toimport { createNodes }, but any value usage ofcreateNodesV2is left dangling:The existing specs only ever asserted on import lines, never on a file that uses
createNodesV2as a value, so the gap went unnoticed. (Found while running the migration against a real workspace.)Expected Behavior
When the migration renames a local
createNodesV2import binding, it now also renames in-file value references tocreateNodes, so the file still compiles. The rename is AST-scoped and conservative — it skips:x.createNodesV2) and qualified type namesIdentifiernodes)and expands a shorthand property (
{ createNodesV2 }→{ createNodesV2: createNodes }) to preserve the key. Aliased imports ({ createNodesV2 as cn }) and re-exports keep their local name, so they never trigger a usage rewrite.Applied to all 22 plugin copies of the migration; regression tests added for the value-usage cases (21 specs;
@nx/gradle's multi-specifier spec keeps its existing structure and the shared logic is covered by the others).Related Issue(s)
N/A — follow-up hardening of the v23 migration.
View session information ↗