Skip to content

fix(misc): rename createNodesV2 value usages in v23 migration, not just imports#35930

Merged
AgentEnder merged 7 commits into
masterfrom
fix/migrate-create-nodes-v2-rename-usages
Jun 10, 2026
Merged

fix(misc): rename createNodesV2 value usages in v23 migration, not just imports#35930
AgentEnder merged 7 commits into
masterfrom
fix/migrate-create-nodes-v2-rename-usages

Conversation

@polygraph-app

@polygraph-app polygraph-app Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Current Behavior

The v23.0.0 migrate-create-nodes-v2-to-create-nodes migration (shipped in 22 plugins) rewrites only import/export named bindings of createNodesV2 to createNodes — it never touches value references in the file body.

So a lone import { createNodesV2 } (or one deduped against an existing createNodes) is renamed to import { createNodes }, but any value usage of createNodesV2 is left dangling:

import { createNodesV2 } from '@nx/js/typescript'; // → renamed to createNodes
addPlugin(graph, '@nx/js/typescript', createNodesV2, {}); // ← left as-is → TS2304: Cannot find name 'createNodesV2'

The existing specs only ever asserted on import lines, never on a file that uses createNodesV2 as a value, so the gap went unnoticed. (Found while running the migration against a real workspace.)

Expected Behavior

When the migration renames a local createNodesV2 import binding, it now also renames in-file value references to createNodes, so the file still compiles. The rename is AST-scoped and conservative — it skips:

  • property accesses (x.createNodesV2) and qualified type names
  • object-literal keys
  • declaration names that shadow the import
  • strings and comments (never Identifier nodes)

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 ↗

@netlify

netlify Bot commented Jun 10, 2026

Copy link
Copy Markdown

Deploy Preview for nx-docs ready!

Name Link
🔨 Latest commit 22ded30
🔍 Latest deploy log https://app.netlify.com/projects/nx-docs/deploys/6a2992437216800008c17ac0
😎 Deploy Preview https://deploy-preview-35930--nx-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Jun 10, 2026

Copy link
Copy Markdown

Deploy Preview for nx-dev ready!

Name Link
🔨 Latest commit 22ded30
🔍 Latest deploy log https://app.netlify.com/projects/nx-dev/deploys/6a29924302d2b50009e8e05d
😎 Deploy Preview https://deploy-preview-35930--nx-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@nx-cloud

nx-cloud Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

View your CI Pipeline Execution ↗ for commit 22ded30

Command Status Duration Result
nx affected --targets=lint,test,build,e2e,e2e-c... ✅ Succeeded 14m 5s View ↗
nx run-many -t check-imports check-lock-files c... ✅ Succeeded 3s View ↗
nx-cloud record -- pnpm nx-cloud conformance:check ✅ Succeeded 45s View ↗
nx build workspace-plugin ✅ Succeeded <1s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded 16s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 6s View ↗

☁️ Nx Cloud last updated this comment at 2026-06-10 18:28:23 UTC

nx-cloud[bot]

This comment was marked as outdated.

nx-cloud[bot]

This comment was marked as outdated.

FrozenPandaz and others added 2 commits June 10, 2026 11:51
…ns surface for the user to resolve [Self-Healing CI Rerun]
nx-cloud[bot]

This comment was marked as outdated.

@nx-cloud nx-cloud Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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:

Rerun CI

Nx Cloud View detailed reasoning on Nx Cloud ↗


🎓 Learn more about Self-Healing CI on nx.dev

@FrozenPandaz FrozenPandaz marked this pull request as ready for review June 10, 2026 18:43
@FrozenPandaz FrozenPandaz requested a review from a team as a code owner June 10, 2026 18:43
@AgentEnder AgentEnder merged commit aa9ce7a into master Jun 10, 2026
27 of 28 checks passed
@AgentEnder AgentEnder deleted the fix/migrate-create-nodes-v2-rename-usages branch June 10, 2026 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants