Skip to content

fix(module-federation): skip non-npm external dependencies in getDependencies#33951

Merged
Coly010 merged 1 commit intomasterfrom
mf/handle-other-dep-types
Dec 19, 2025
Merged

fix(module-federation): skip non-npm external dependencies in getDependencies#33951
Coly010 merged 1 commit intomasterfrom
mf/handle-other-dep-types

Conversation

@Coly010
Copy link
Copy Markdown
Contributor

@Coly010 Coly010 commented Dec 19, 2025

The getDependentPackagesForProject function was crashing when processing
projects with non-npm external nodes (e.g., cargo: prefixed nodes from
@monodon/rust plugin). The code only handled npm: prefixed externals and
treated everything else as workspace libraries, causing undefined access
errors when cargo externals were encountered.

This fix adds a check to skip external nodes that aren't npm-prefixed by
detecting the presence of a colon in the dependency target. Only npm:
prefixed externals are processed as npm packages, and other external
prefixes (cargo:, maven:, etc.) are now properly skipped.

Fixes #32819

…ndencies

The getDependentPackagesForProject function was crashing when processing
projects with non-npm external nodes (e.g., cargo: prefixed nodes from
@monodon/rust plugin). The code only handled npm: prefixed externals and
treated everything else as workspace libraries, causing undefined access
errors when cargo externals were encountered.

This fix adds a check to skip external nodes that aren't npm-prefixed by
detecting the presence of a colon in the dependency target. Only npm:
prefixed externals are processed as npm packages, and other external
prefixes (cargo:, maven:, etc.) are now properly skipped.

Fixes #32819
@Coly010 Coly010 requested a review from a team as a code owner December 19, 2025 11:13
@Coly010 Coly010 requested a review from JamesHenry December 19, 2025 11:13
@Coly010 Coly010 self-assigned this Dec 19, 2025
@netlify
Copy link
Copy Markdown

netlify Bot commented Dec 19, 2025

Deploy Preview for nx-docs ready!

Name Link
🔨 Latest commit 91ed9d2
🔍 Latest deploy log https://app.netlify.com/projects/nx-docs/deploys/69453354b124790008234e91
😎 Deploy Preview https://deploy-preview-33951--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.

@vercel
Copy link
Copy Markdown

vercel Bot commented Dec 19, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
nx-dev Ready Ready Preview Dec 19, 2025 11:19am

@nx-cloud
Copy link
Copy Markdown
Contributor

nx-cloud Bot commented Dec 19, 2025

View your CI Pipeline Execution ↗ for commit 91ed9d2

Command Status Duration Result
nx affected --targets=lint,test,test-kt,build,e... ✅ Succeeded 37m 33s View ↗
nx run-many -t check-imports check-lock-files c... ✅ Succeeded 1m 31s View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded 7s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 3s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded <1s View ↗

☁️ Nx Cloud last updated this comment at 2025-12-19 11:55:38 UTC

@Coly010 Coly010 merged commit 841f1ef into master Dec 19, 2025
20 checks passed
@Coly010 Coly010 deleted the mf/handle-other-dep-types branch December 19, 2025 12:31
jaysoo pushed a commit that referenced this pull request Dec 19, 2025
…ndencies (#33951)

The getDependentPackagesForProject function was crashing when processing
projects with non-npm external nodes (e.g., cargo: prefixed nodes from
@monodon/rust plugin). The code only handled npm: prefixed externals and
treated everything else as workspace libraries, causing undefined access
errors when cargo externals were encountered.

This fix adds a check to skip external nodes that aren't npm-prefixed by
detecting the presence of a colon in the dependency target. Only npm:
prefixed externals are processed as npm packages, and other external
prefixes (cargo:, maven:, etc.) are now properly skipped.

Fixes #32819
@github-actions
Copy link
Copy Markdown
Contributor

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.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Dec 25, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@nx/module-federation "getDependencies" does not support cargo externalNodes

2 participants