Skip to content

Conversation

@Coly010
Copy link
Contributor

@Coly010 Coly010 commented Sep 19, 2025

Current Behavior

The project graph build process incorrectly handles dependencies when workspace projects have
different versions or are referenced via specific version ranges. This causes several issues:

  1. NPM lockfile parser crashes when encountering symlinked nested dependencies in workspaces
    (which don't have versions)
  2. Package.json dependencies that reference workspace projects with specific versions (e.g.,
    "proj4": "1.0.0" when workspace has "version": "2.0.0") incorrectly resolve to the workspace
    project instead of the installed npm package
  3. Version ranges and file references to workspace projects are not properly validated

Expected Behavior

The dependency resolution should:

  • Handle symlinked workspace packages in npm lockfiles without crashing
  • Correctly differentiate between workspace projects and npm packages when specific versions are
    referenced
  • Properly validate version ranges against workspace package versions using semver
  • Support file references (e.g., "file:../proj6") for workspace dependencies
  • Only resolve to workspace projects when the version constraint is satisfied or when using
    wildcards

Notes

This has inadvertently caused issues when calculating which manifest files need to be updated in the JSVersionActions / Nx Release for Npm Packages

Related Issues

Fixes #31454

@Coly010 Coly010 self-assigned this Sep 19, 2025
@vercel
Copy link

vercel bot commented Sep 19, 2025

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

Project Deployment Preview Updated (UTC)
nx-dev Ready Ready Preview Sep 26, 2025 10:52am

@nx-cloud
Copy link
Contributor

nx-cloud bot commented Sep 19, 2025

View your CI Pipeline Execution ↗ for commit fcda2f9

Command Status Duration Result
nx affected --targets=lint,test,test-kt,build,e... ✅ Succeeded 5m 10s View ↗
nx run-many -t check-imports check-commit check... ✅ Succeeded 2m 28s View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded 3s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 3s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded <1s View ↗
nx documentation ✅ Succeeded 13s View ↗

☁️ Nx Cloud last updated this comment at 2025-09-26 18:10:56 UTC

nx-cloud[bot]

This comment was marked as outdated.

@Coly010 Coly010 force-pushed the core/process-project-dependencies-correctly branch from 213c25d to ed6b4ad Compare September 22, 2025 19:01
@Coly010 Coly010 changed the title fix(core): process project dependencies correctly fix(core): project graph creation processes project dependencies correctly Sep 22, 2025
@Coly010 Coly010 force-pushed the core/process-project-dependencies-correctly branch from ed6b4ad to bac9805 Compare September 22, 2025 20:15
@Coly010 Coly010 force-pushed the core/process-project-dependencies-correctly branch from bac9805 to 76472dc Compare September 23, 2025 19:36
nx-cloud[bot]

This comment was marked as outdated.

nx-cloud[bot]

This comment was marked as outdated.

nx-cloud[bot]

This comment was marked as outdated.

nx-cloud[bot]

This comment was marked as outdated.

nx-cloud[bot]

This comment was marked as outdated.

nx-cloud[bot]

This comment was marked as resolved.

@Coly010 Coly010 force-pushed the core/process-project-dependencies-correctly branch from 6ef92aa to fcda2f9 Compare September 26, 2025 10:40
@Coly010 Coly010 marked this pull request as ready for review September 26, 2025 10:55
@Coly010 Coly010 requested review from a team, FrozenPandaz and meeroslav as code owners September 26, 2025 10:55
@FrozenPandaz FrozenPandaz merged commit ad032ad into master Sep 26, 2025
15 checks passed
@FrozenPandaz FrozenPandaz deleted the core/process-project-dependencies-correctly branch September 26, 2025 18:13
@github-actions
Copy link
Contributor

github-actions bot commented Oct 2, 2025

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 Oct 2, 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.

New Versioning protocol incorrectly bumps downstream pinned versions

4 participants