tronprotocol / tronweb

Javascript API Library for interacting with the TRON Network
MIT License
423 stars 271 forks source link

Many require cycles in V6 #547

Open alienzhangyw opened 3 weeks ago

alienzhangyw commented 3 weeks ago

λ WARN Require cycle: node_modules\tronweb\lib\commonjs\utils\crypto.js -> node_modules\tronweb\lib\commonjs\utils\address.js -> node_modules\tronweb\lib\commonjs\utils\crypto.js

λ WARN Require cycle: node_modules\tronweb\lib\commonjs\utils\address.js -> node_modules\tronweb\lib\commonjs\utils\validations.js -> node_modules\tronweb\lib\commonjs\utils\address.js

λ WARN Require cycle: node_modules\tronweb\lib\commonjs\utils\index.js -> node_modules\tronweb\lib\commonjs\utils\accounts.js -> node_modules\tronweb\lib\commonjs\utils\crypto.js -> node_modules\tronweb\lib\commonjs\utils\typedData.js -> node_modules\tronweb\lib\commonjs\tronweb.js -> node_modules\tronweb\lib\commonjs\utils\index.js

λ WARN Require cycle: node_modules\tronweb\lib\commonjs\tronweb.js -> node_modules\tronweb\lib\commonjs\lib\TransactionBuilder\TransactionBuilder.js -> node_modules\tronweb\lib\commonjs\tronweb.js

λ WARN Require cycle: node_modules\tronweb\lib\commonjs\tronweb.js -> node_modules\tronweb\lib\commonjs\lib\TransactionBuilder\TransactionBuilder.js -> node_modules\tronweb\lib\commonjs\utils\abi.js -> node_modules\tronweb\lib\commonjs\tronweb.js

λ WARN Require cycle: node_modules\tronweb\lib\commonjs\tronweb.js -> node_modules\tronweb\lib\commonjs\lib\TransactionBuilder\TransactionBuilder.js -> node_modules\tronweb\lib\commonjs\lib\TransactionBuilder\helper.js -> node_modules\tronweb\lib\commonjs\tronweb.js

λ WARN Require cycle: node_modules\tronweb\lib\commonjs\tronweb.js -> node_modules\tronweb\lib\commonjs\lib\TransactionBuilder\TransactionBuilder.js -> node_modules\tronweb\lib\commonjs\lib\TransactionBuilder\helper.js -> node_modules\tronweb\lib\commonjs\utils\transaction.js -> node_modules\tronweb\lib\commonjs\tronweb.js

λ WARN Require cycle: node_modules\tronweb\lib\commonjs\tronweb.js -> node_modules\tronweb\lib\commonjs\lib\trx.js -> node_modules\tronweb\lib\commonjs\tronweb.js

λ WARN Require cycle: node_modules\tronweb\lib\commonjs\utils\index.js -> node_modules\tronweb\lib\commonjs\utils\accounts.js -> node_modules\tronweb\lib\commonjs\utils\crypto.js -> node_modules\tronweb\lib\commonjs\utils\typedData.js -> node_modules\tronweb\lib\commonjs\tronweb.js -> node_modules\tronweb\lib\commonjs\lib\trx.js -> node_modules\tronweb\lib\commonjs\utils\index.js

λ WARN Require cycle: node_modules\tronweb\lib\commonjs\utils\crypto.js -> node_modules\tronweb\lib\commonjs\utils\typedData.js -> node_modules\tronweb\lib\commonjs\tronweb.js -> node_modules\tronweb\lib\commonjs\lib\trx.js -> node_modules\tronweb\lib\commonjs\utils\crypto.js

λ WARN Require cycle: node_modules\tronweb\lib\commonjs\tronweb.js -> node_modules\tronweb\lib\commonjs\lib\contract\index.js -> node_modules\tronweb\lib\commonjs\tronweb.js

λ WARN Require cycle: node_modules\tronweb\lib\commonjs\utils\index.js -> node_modules\tronweb\lib\commonjs\utils\accounts.js -> node_modules\tronweb\lib\commonjs\utils\crypto.js -> node_modules\tronweb\lib\commonjs\utils\typedData.js -> node_modules\tronweb\lib\commonjs\tronweb.js -> node_modules\tronweb\lib\commonjs\lib\contract\index.js -> node_modules\tronweb\lib\commonjs\utils\index.js

λ WARN Require cycle: node_modules\tronweb\lib\commonjs\utils\index.js -> node_modules\tronweb\lib\commonjs\utils\accounts.js -> node_modules\tronweb\lib\commonjs\utils\crypto.js -> node_modules\tronweb\lib\commonjs\utils\typedData.js -> node_modules\tronweb\lib\commonjs\tronweb.js -> node_modules\tronweb\lib\commonjs\lib\contract\index.js -> node_modules\tronweb\lib\commonjs\lib\contract\method.js -> node_modules\tronweb\lib\commonjs\utils\index.js

λ WARN Require cycle: node_modules\tronweb\lib\commonjs\utils\crypto.js -> node_modules\tronweb\lib\commonjs\utils\typedData.js -> node_modules\tronweb\lib\commonjs\tronweb.js -> node_modules\tronweb\lib\commonjs\lib\contract\index.js -> node_modules\tronweb\lib\commonjs\lib\contract\method.js -> node_modules\tronweb\lib\commonjs\utils\crypto.js

λ WARN Require cycle: node_modules\tronweb\lib\commonjs\tronweb.js -> node_modules\tronweb\lib\commonjs\lib\plugin.js -> node_modules\tronweb\lib\commonjs\tronweb.js

λ WARN Require cycle: node_modules\tronweb\lib\commonjs\utils\index.js -> node_modules\tronweb\lib\commonjs\utils\accounts.js -> node_modules\tronweb\lib\commonjs\utils\crypto.js -> node_modules\tronweb\lib\commonjs\utils\typedData.js -> node_modules\tronweb\lib\commonjs\tronweb.js -> node_modules\tronweb\lib\commonjs\lib\plugin.js -> node_modules\tronweb\lib\commonjs\utils\index.js

λ WARN Require cycle: node_modules\tronweb\lib\commonjs\tronweb.js -> node_modules\tronweb\lib\commonjs\lib\event.js -> node_modules\tronweb\lib\commonjs\tronweb.js

λ WARN Require cycle: node_modules\tronweb\lib\commonjs\utils\index.js -> node_modules\tronweb\lib\commonjs\utils\accounts.js -> node_modules\trodules\tronweb\lib\commonjs\utils\crypto.js -> node_modules\tronweb\lib\commonjs\utils\typedData.js -> node_modules\tronweb\lib\commonjs\tronweb.js -> node_modules\tronweb\lib\commonjs\lib\event.js -> node_modules\tronweb\lib\commonjs\utils\index.js

Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.

Satan-web3 commented 3 weeks ago

We didn't remove the cycles because refactoring can introduce many api changes. It will be confusing for those who have been familiar with TronWeb.