-
Notifications
You must be signed in to change notification settings - Fork 319
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
[BUG] Some path which omits '/index' should not be skipped #371
Comments
+1 Adding "/index" to some path resolves madge skipping files I have file
And my madge result with
But if I change model import for
|
same here, index.ts files seems to be ignored: all imports of dirs with index.ts are skipped( is there any way to fix it? |
Facing the same issue and digging a bit. Trying to dig further into |
OK, I think this is a
I'm not really able to see which update of |
…which should make it easy to fix 😁 So, I assume that simply making a new release would solve the problem… <= @pahen |
@Jym77, I ran into this same issue and I used package.json#pnpm.overrides to enforce pnpx madge --warning --circular ./src/**/*
WARN 1 deprecated subdependencies found: [email protected]
Packages: +179
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Progress: resolved 178, reused 178, downloaded 0, added 179, done
Processed 57 files (1.2s) (15 warnings)
✔ No circular dependency found!
✖ Skipped 15 files
drizzle-orm/postgres-js
drizzle-orm
postgres
@aws-sdk/rds-signer
@aws-sdk/client-secrets-manager
drizzle-orm/pg-core
@aws-lambda-powertools/logger
drizzle-kit
drizzle-orm/postgres-js/migrator
../adapters/secondary
./types
zod
../base
./adapters/secondary Then if I update all import specifiers with /index: pnpx madge --warning --circular ./src/**/*
> @lh/[email protected] check-circular-dependencies /Users/stickb/Code/dos/lighthouse/core
> madge --circular --warning src/**/*
Processed 40 files (1s) (10 warnings)
✖ Found 1 circular dependency!
1) adapters/secondary/db-adapter.ts > modules/new-user/index.server.ts > modules/new-user/update-new-user.usecase.ts > modules/new-user/new-user.repo.ts > adapters/secondary/index.ts
✖ Skipped 10 files
postgres
@aws-sdk/rds-signer
@aws-sdk/client-secrets-manager
drizzle-kit
drizzle-orm/postgres-js
drizzle-orm/postgres-js/migrator
drizzle-orm
zod
drizzle-orm/pg-core
@aws-lambda-powertools/logger Is there anything else you did to get it to work? |
Since I am only at the "experiment and play" step, I brutally edited |
I can confirm that upgrading dependency-tree >= 10 fixes the issue! Madge 6.1.0. Since I'm using pnpm I did the following in my package.json: "overrides": {
"madge>dependency-tree@<10": "10"
} I went from 1000s of skipped files to 7! |
For yarn, the workaround in
|
Thanks for workaround!
|
FYI, updating to madge 7.0.0 fixed this for me (no need for custom resolution anymore). The correct dependency-tree is now a dependency 🎉 |
Nice :) |
I found that some dependency
../store/mp
was ignored by Madge 6.0.0 . But the dependency is clearly stated. I checked it by use '--debug' mode, found this:Actually, the full paths should be
../store/mp/index
, but eslint will give a warning like this :import/no-useless-path-segments
is a common eslint plugin. I think it is necessary to checksomePath/index
when Madge find thatsomePath
is empty.The text was updated successfully, but these errors were encountered: