If you're working on a reasonably large JS app fighting circular dependencies, I just discovered "madge". It's a tool to analyze and detect all these circles.
I wish I had known about this earlier... 😅
https://github.com/pahen/madge
I wish I had known about this earlier... 😅
https://github.com/pahen/madge
Comments
I wish there was more static analysis tooling like this. Makes Clean Code much easier.
https://blog.codepen.io/2023/01/25/398-devoops/#t=07:54
Hopefully they've updated so that's no longer a problem.
I only tried a simple example because right now I'm lucky and don't face circular deps. 🫣
You import one file, everything falls apart and you spend hours (if not days) shuffling things around to get rid of the circle constantly fearing that there might be a major refactoring hiding under the cryptic errors.
I'm not missing these times. :D