You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've came across this issue while using @nx/dependency-checks eslint rule, where it failed to detect the dependencies in my source files. After debugging the linter I've realized that the actual problem is with how Nx parses pnpm lock file.
I've added a breakpoint on the following line to see how does this rule understands dependencies:
It turns out it cannot match the discovered dependency with the ones extracted from lock file because the version is bundled with the package name. Which you can see in the following screenshot.
I expect @nx/dependency-checks to work properly and tell me which dependencies are missing from my package.json file.
GitHub Repo
No response
Steps to Reproduce
Install pnpm@^9 and run @nx/dependency-checks rule on a project
Removing or adding dependencies in your source files shouldn't change the output of this eslint rule
Note
To me this seems like a very basic problem so I sincerely belive this should be easily reproducible. If not, let me know and I'll create a devbox for it.
Current Behavior
I've came across this issue while using
@nx/dependency-checks
eslint rule, where it failed to detect the dependencies in my source files. After debugging the linter I've realized that the actual problem is with how Nx parses pnpm lock file.I've added a breakpoint on the following line to see how does this rule understands dependencies:
nx/packages/js/src/utils/find-npm-dependencies.ts
Line 126 in abd80cf
It turns out it cannot match the discovered dependency with the ones extracted from lock file because the version is bundled with the package name. Which you can see in the following screenshot.
related #22247
Expected Behavior
I expect
@nx/dependency-checks
to work properly and tell me which dependencies are missing from mypackage.json
file.GitHub Repo
No response
Steps to Reproduce
pnpm@^9
and run@nx/dependency-checks
rule on a projectNote
To me this seems like a very basic problem so I sincerely belive this should be easily reproducible. If not, let me know and I'll create a devbox for it.
Nx Report
Failure Logs
No response
Package Manager Version
No response
Operating System
Additional Information
Using
pnpm@^8
is working fineThe text was updated successfully, but these errors were encountered: