Skip to content
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

fix(core): improve resolution of packages in package manager workspaces when constructing the project graph #29795

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

leosvelperez
Copy link
Member

@leosvelperez leosvelperez commented Jan 29, 2025

Main fixes:

  • Identify dependencies from packages that only expose named exports (no . export)
  • Identify dependencies from exports containing wildcards (e.g. "./utils/*": "./src/utils/*.js)
  • Disallow identifying dependencies from restricted exports (e.g. "./foo": null)
  • Handle conditional exports (e.g. "exports": { "import": "./dist/index.js", "default": "./dist/index.js" }
  • Handle invalid "exports": {} (by not falling back to main)
  • Handle projects included or not in package manager workspaces

Current Behavior

Expected Behavior

Related Issue(s)

Fixes #29486

@leosvelperez leosvelperez self-assigned this Jan 29, 2025
Copy link

vercel bot commented Jan 29, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Updated (UTC)
nx-dev ⬜️ Ignored (Inspect) Visit Preview Jan 31, 2025 4:20pm

Copy link

nx-cloud bot commented Jan 29, 2025

View your CI Pipeline Execution ↗ for commit b66407d.

Command Status Duration Result
nx affected --targets=lint,test,build,e2e,e2e-c... ✅ Succeeded 35s View ↗
nx run-many -t check-imports check-commit check... ✅ Succeeded 17s View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded 2s View ↗
nx-cloud record -- nx format:check --base= --he... ✅ Succeeded 6s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded 5s View ↗
nx documentation ✅ Succeeded <1s View ↗

☁️ Nx Cloud last updated this comment at 2025-01-31 16:42:10 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NX Packages without default export are excluded from dependencies
1 participant