-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Description
Update
after additional convo this is actually a feature request
Current Behavior
includeTransitiveDependencies does not work as expected (doesn't work at all? )
when enabled it doesn't parse transitive dependencies correctly and throws wrong lint errors
Error:
fluentui-contrib/packages/react-data-grid-react-window/package.json
4:3 error The "react-data-grid-react-window" project uses the following packages, but they are missing from "dependencies":
- @fluentui/react-utilities
- @fluentui/react-table @nx/dependency-checks
Source to problematic imports:
- https://github.com/microsoft/fluentui-contrib/blob/main/packages/react-data-grid-react-window/src/components/DataGrid/DataGrid.tsx#L10
- https://github.com/microsoft/fluentui-contrib/blob/main/packages/react-data-grid-react-window/src/components/DataGridBody/useDataGridBody.tsx
react-components dependencies:
- https://github.com/microsoft/fluentui/blob/master/packages/react-components/react-components/package.json#L55
- https://github.com/microsoft/fluentui/blob/master/packages/react-components/react-components/package.json#L64
Expected Behavior
includeTransitiveDependencies should traverse children and properly resolve lint issues
GitHub Repo
https://github.com/Hotell/fluentui-contrib/tree/migrate-to-version-plans
Steps to Reproduce
- checkout https://github.com/Hotell/fluentui-contrib/tree/migrate-to-version-plans
- run
yarn - run
yarn nx run react-data-grid-react-window:lint
Nx Report
NX Report complete - copy this into the issue template
Node : 20.18.0
OS : darwin-arm64
Native Target : aarch64-macos
yarn : 1.23.34
nx : 20.2.2
@nx/js : 20.2.2
@nx/jest : 20.2.2
@nx/eslint : 20.2.2
@nx/workspace : 20.2.2
@nx/cypress : 20.2.2
@nx/devkit : 20.2.2
@nx/eslint-plugin : 20.2.2
@nx/module-federation : 20.2.2
@nx/playwright : 20.2.2
@nx/plugin : 20.2.2
@nx/react : 20.2.2
@nx/storybook : 20.2.2
@nx/vite : 20.2.2
@nx/web : 20.2.2
@nx/webpack : 20.2.2
typescript : 5.6.3
---------------------------------------
Local workspace plugins:
@fluentui-contrib/nx-pluginFailure Logs
Package Manager Version
yarn
Operating System
- macOS
- Linux
- Windows
- Other (Please specify)
Additional Information
when checking actual source of this rule, it uses the flag within this function to set seen Set https://github.com/nrwl/nx/blob/master/packages/js/src/utils/find-npm-dependencies.ts#L35-L37
and then recursively call collectAll https://github.com/nrwl/nx/blob/master/packages/js/src/utils/find-npm-dependencies.ts#L67-L73
I checked tests for this logic but wasn't able to find anything
No response