waku-org / js-waku

JavaScript implementation of Waku v2
https://js.waku.org
Apache License 2.0
171 stars 42 forks source link

take steps to avoid/debug breaking circular deps #1524

Open danisharora099 opened 1 year ago

danisharora099 commented 1 year ago

This is a feature request

Problem

There have been times where circular dependencies have creeped in to our codebase - one of these times was recently with https://github.com/waku-org/js-waku/pull/1520/commits/c421732c09d689070626ec40f2c0711392cb20e8 where the tests were failing because of a circular dependency introduced earlier which was not caught until now.

Proposed Solutions

Introduce a check for circular deps.

I used madge: https://www.npmjs.com/package/madge to debug

danisharora099 commented 1 year ago

TODO: