-
Notifications
You must be signed in to change notification settings - Fork 317
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
False positives when folder name equals node_module name #306
Comments
I am also running into this, though in my case my structure looks like this:
// index.server.ts
export { SomeOtherType } from "./config/webpack";
// config/webpack.ts
import { SomeOtherType } from "./types";
// config/types.ts
import { SomeType } from 'webpack';
export type SomeOtherType = Record<string, any>; and I am getting
in our Madge GitHub Action. Interestingly, it was adding the export to EDIT: When I run madge locally, it only lists the last two files (not Running it with The second-to-last line shouldn't be |
…dependency check (#4598) The library we use to detect circular dependencies, `madge`, has a bug wherein local files whose names match node modules cause false positives. (For more details, see pahen/madge#306.) In our case, it was triggered by #4597, which added an export from file (`config/types.ts`) which depends on the node module `webpack` and which is depended upon by the local file `config/webpack.ts`. To solve this for the moment, this excludes the problematic file from the check.
Seems to happen with files, too, not just folders; I have a import {knex} from 'knex'
export default knex(require('./knexfile')) ... and
|
I just ran into this, too, having forgotten that this was something I needed to worry about. Any progress here? Can we do anything to help move this fix along? (UPDATE: Just found #334. TL;DR - Life happens, so we probably won't see any movement here until early next year.) |
Hi!
Madge version: 5.0.1
Steps to reproduce:
src/
--react/
----a.js
----index.js
madge src --circular
Error:
Adding "react" dependency doesn't change anything
The text was updated successfully, but these errors were encountered: