Skip to content

Commit

Permalink
Dedupe bn.js (#20199)
Browse files Browse the repository at this point in the history
* force latest version of dependency bn.js to @5.2.1
* test - fix broken standin data given to bn.js
---------

Co-authored-by: kumavis <[email protected]>
Co-authored-by: Brad Decker <[email protected]>
  • Loading branch information
3 people authored Jul 26, 2023
1 parent 6e5ab2a commit 41f6627
Show file tree
Hide file tree
Showing 8 changed files with 142 additions and 512 deletions.
110 changes: 19 additions & 91 deletions lavamoat/browserify/beta/policy.json
Original file line number Diff line number Diff line change
Expand Up @@ -308,15 +308,7 @@
"packages": {
"@ethersproject/abi>@ethersproject/bytes": true,
"@ethersproject/abi>@ethersproject/logger": true,
"@ethersproject/bignumber>bn.js": true
}
},
"@ethersproject/bignumber>bn.js": {
"globals": {
"Buffer": true
},
"packages": {
"browserify>browser-resolve": true
"bn.js": true
}
},
"@ethersproject/contracts": {
Expand Down Expand Up @@ -1200,11 +1192,11 @@
"setInterval": true
},
"packages": {
"@metamask/eth-token-tracker>ethjs>bn.js": true,
"@metamask/eth-token-tracker>ethjs>ethjs-abi": true,
"@metamask/eth-token-tracker>ethjs>ethjs-contract": true,
"@metamask/eth-token-tracker>ethjs>ethjs-query": true,
"@metamask/eth-token-tracker>ethjs>ethjs-util": true,
"bn.js": true,
"browserify>buffer": true,
"ethjs>ethjs-filter": true,
"ethjs>ethjs-provider-http": true,
Expand All @@ -1215,7 +1207,7 @@
},
"@metamask/eth-token-tracker>ethjs>ethjs-abi": {
"packages": {
"@metamask/eth-token-tracker>ethjs>bn.js": true,
"bn.js": true,
"browserify>buffer": true,
"ethjs>js-sha3": true,
"ethjs>number-to-bn": true
Expand All @@ -1233,7 +1225,7 @@
},
"@metamask/eth-token-tracker>ethjs>ethjs-contract>ethjs-abi": {
"packages": {
"@metamask/eth-token-tracker>ethjs>bn.js": true,
"bn.js": true,
"browserify>buffer": true,
"ethjs>js-sha3": true,
"ethjs>number-to-bn": true
Expand Down Expand Up @@ -1595,7 +1587,7 @@
},
"@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util": {
"packages": {
"@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util>bn.js": true,
"bn.js": true,
"browserify>assert": true,
"browserify>buffer": true,
"browserify>insert-module-globals>is-buffer": true,
Expand All @@ -1604,14 +1596,6 @@
"ethereumjs-util>rlp": true
}
},
"@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util>bn.js": {
"globals": {
"Buffer": true
},
"packages": {
"browserify>browser-resolve": true
}
},
"@metamask/logo": {
"globals": {
"addEventListener": true,
Expand Down Expand Up @@ -2271,11 +2255,11 @@
"@truffle/codec>@truffle/abi-utils": true,
"@truffle/codec>@truffle/compile-common": true,
"@truffle/codec>big.js": true,
"@truffle/codec>bn.js": true,
"@truffle/codec>cbor": true,
"@truffle/codec>semver": true,
"@truffle/codec>utf8": true,
"@truffle/codec>web3-utils": true,
"bn.js": true,
"browserify>buffer": true,
"browserify>os-browserify": true,
"browserify>util": true,
Expand Down Expand Up @@ -2432,14 +2416,6 @@
"define": true
}
},
"@truffle/codec>bn.js": {
"globals": {
"Buffer": true
},
"packages": {
"browserify>browser-resolve": true
}
},
"@truffle/codec>cbor": {
"globals": {
"TextDecoder": true
Expand Down Expand Up @@ -2482,23 +2458,15 @@
},
"packages": {
"@truffle/codec>utf8": true,
"@truffle/codec>web3-utils>bn.js": true,
"@truffle/codec>web3-utils>ethereum-bloom-filters": true,
"bn.js": true,
"browserify>buffer": true,
"ethereumjs-util": true,
"ethereumjs-wallet>randombytes": true,
"ethjs>ethjs-unit": true,
"ethjs>number-to-bn": true
}
},
"@truffle/codec>web3-utils>bn.js": {
"globals": {
"Buffer": true
},
"packages": {
"browserify>browser-resolve": true
}
},
"@truffle/codec>web3-utils>ethereum-bloom-filters": {
"packages": {
"@truffle/codec>web3-utils>ethereum-bloom-filters>js-sha3": true
Expand All @@ -2520,7 +2488,7 @@
"@truffle/codec>web3-utils": true,
"@truffle/decoder>@truffle/encoder": true,
"@truffle/decoder>@truffle/source-map-utils": true,
"@truffle/decoder>bn.js": true,
"bn.js": true,
"nock>debug": true
}
},
Expand Down Expand Up @@ -2742,14 +2710,6 @@
"@truffle/decoder>@truffle/source-map-utils>node-interval-tree>shallowequal": true
}
},
"@truffle/decoder>bn.js": {
"globals": {
"Buffer": true
},
"packages": {
"browserify>browser-resolve": true
}
},
"@zxing/browser": {
"globals": {
"HTMLElement": true,
Expand Down Expand Up @@ -3289,11 +3249,11 @@
},
"packages": {
"@ethereumjs/tx>@ethereumjs/util": true,
"bn.js": true,
"browserify>buffer": true,
"browserify>crypto-browserify": true,
"browserify>events": true,
"eth-lattice-keyring>@ethereumjs/tx": true,
"eth-lattice-keyring>bn.js": true,
"eth-lattice-keyring>gridplus-sdk": true,
"eth-lattice-keyring>rlp": true
}
Expand Down Expand Up @@ -3341,14 +3301,6 @@
"crypto": true
}
},
"eth-lattice-keyring>bn.js": {
"globals": {
"Buffer": true
},
"packages": {
"browserify>browser-resolve": true
}
},
"eth-lattice-keyring>gridplus-sdk": {
"globals": {
"AbortController": true,
Expand Down Expand Up @@ -3469,19 +3421,11 @@
"intToBuffer": true
},
"packages": {
"eth-lattice-keyring>gridplus-sdk>eth-eip712-util-browser>bn.js": true,
"bn.js": true,
"eth-lattice-keyring>gridplus-sdk>eth-eip712-util-browser>buffer": true,
"eth-lattice-keyring>gridplus-sdk>eth-eip712-util-browser>js-sha3": true
}
},
"eth-lattice-keyring>gridplus-sdk>eth-eip712-util-browser>bn.js": {
"globals": {
"Buffer": true
},
"packages": {
"browserify>browser-resolve": true
}
},
"eth-lattice-keyring>gridplus-sdk>eth-eip712-util-browser>buffer": {
"globals": {
"console": true
Expand Down Expand Up @@ -3613,23 +3557,15 @@
},
"ethereumjs-util": {
"packages": {
"bn.js": true,
"browserify>assert": true,
"browserify>buffer": true,
"browserify>insert-module-globals>is-buffer": true,
"ethereumjs-util>bn.js": true,
"ethereumjs-util>create-hash": true,
"ethereumjs-util>ethereum-cryptography": true,
"ethereumjs-util>rlp": true
}
},
"ethereumjs-util>bn.js": {
"globals": {
"Buffer": true
},
"packages": {
"browserify>browser-resolve": true
}
},
"ethereumjs-util>create-hash": {
"packages": {
"addons-linter>sha.js": true,
Expand Down Expand Up @@ -3746,16 +3682,8 @@
},
"ethereumjs-util>rlp": {
"packages": {
"browserify>buffer": true,
"ethereumjs-util>rlp>bn.js": true
}
},
"ethereumjs-util>rlp>bn.js": {
"globals": {
"Buffer": true
},
"packages": {
"browserify>browser-resolve": true
"bn.js": true,
"browserify>buffer": true
}
},
"ethereumjs-wallet": {
Expand Down Expand Up @@ -3843,10 +3771,10 @@
"setInterval": true
},
"packages": {
"bn.js": true,
"browserify>buffer": true,
"ethjs-contract": true,
"ethjs-query": true,
"ethjs>bn.js": true,
"ethjs>ethjs-abi": true,
"ethjs>ethjs-filter": true,
"ethjs>ethjs-provider-http": true,
Expand All @@ -3868,8 +3796,8 @@
},
"ethjs-contract>ethjs-abi": {
"packages": {
"bn.js": true,
"browserify>buffer": true,
"ethjs-contract>ethjs-abi>bn.js": true,
"ethjs>js-sha3": true,
"ethjs>number-to-bn": true
}
Expand Down Expand Up @@ -3930,8 +3858,8 @@
},
"ethjs>ethjs-abi": {
"packages": {
"bn.js": true,
"browserify>buffer": true,
"ethjs>bn.js": true,
"ethjs>js-sha3": true,
"ethjs>number-to-bn": true
}
Expand All @@ -3954,7 +3882,7 @@
},
"ethjs>ethjs-unit": {
"packages": {
"ethjs>ethjs-unit>bn.js": true,
"bn.js": true,
"ethjs>number-to-bn": true
}
},
Expand All @@ -3977,8 +3905,8 @@
},
"ethjs>number-to-bn": {
"packages": {
"ethjs>ethjs-util>strip-hex-prefix": true,
"ethjs>number-to-bn>bn.js": true
"bn.js": true,
"ethjs>ethjs-util>strip-hex-prefix": true
}
},
"extension-port-stream": {
Expand Down
Loading

0 comments on commit 41f6627

Please sign in to comment.