Skip to content
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

fix: add missing package dependencies #509

Merged
merged 5 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
"jest-junit": "^15.0.0",
"lerna": "6.6.1",
"lint-staged": "^11.1.2",
"link-module-alias": "^1.2.0",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Module aliasing setup needs attention

The verification reveals potential issues with the module aliasing setup:

  • The root package.json doesn't have any link-module-alias related scripts, but the package is being added as a devDependency
  • Individual packages have _moduleAliases configurations (e.g., wallet-strategy uses ~wallet-strategy)
  • The project uses TypeScript path mappings in tsconfig.json for workspace packages
  • Both link-module-alias and tsc-alias are present, but neither appears to be properly integrated in the build process

This suggests that adding link-module-alias without corresponding script setup might not achieve the intended module aliasing functionality. The module aliasing strategy needs to be unified - either fully migrate to TypeScript paths with tsc-alias or properly configure link-module-alias in the build process.

🔗 Analysis chain

LGTM! Centralizing module aliasing in root package.

Moving link-module-alias to root devDependencies while removing it from individual packages is a good practice to avoid dependency duplication across the monorepo.

Let's verify the module aliasing setup:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for module alias configurations and potential conflicts

# Test 1: Look for _moduleAliases in package.json files
echo "Checking for module alias configurations..."
rg -l '"_moduleAliases"' --type json

# Test 2: Check for postinstall scripts that might use link-module-alias
echo "Checking for link-module-alias usage in scripts..."
rg -l 'link-module-alias' --type json

# Test 3: Look for tsconfig paths configurations
echo "Checking for path mappings in tsconfig..."
fd tsconfig.json --exec grep -l '"paths"' {} \;

Length of output: 1993


Script:

#!/bin/bash
# Let's check the actual module alias configurations and scripts

# Check root package.json scripts
echo "=== Root package.json scripts ==="
cat package.json | jq '.scripts'

# Check _moduleAliases configuration in one of the packages
echo -e "\n=== Sample _moduleAliases configuration from wallet-strategy ==="
cat packages/wallets/wallet-strategy/package.json | jq '._moduleAliases'

# Check tsconfig paths configuration
echo -e "\n=== TSConfig paths configuration ==="
cat tsconfig.json | jq '.compilerOptions.paths'

# Check if there are any tsc-alias usages in scripts
echo -e "\n=== Checking for tsc-alias usage ==="
rg -l 'tsc-alias' --type json

Length of output: 3602

"live-server": "^1.2.1",
"markdownlint-cli": "^0.28.1",
"prettier": "^2.4.1",
Expand Down
1 change: 0 additions & 1 deletion packages/exceptions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
"@injectivelabs/grpc-web": "^0.0.1",
"@injectivelabs/ts-types": "^1.14.15",
"http-status-codes": "^2.2.0",
"link-module-alias": "^1.2.0",
"shx": "^0.3.2"
},
"gitHead": "3364a2b1e58aba2387c509431cc1ae8ebf2c53d0"
Expand Down
1 change: 0 additions & 1 deletion packages/networks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
"@injectivelabs/exceptions": "^1.14.15",
"@injectivelabs/ts-types": "^1.14.15",
"@injectivelabs/utils": "^1.14.15",
"link-module-alias": "^1.2.0",
"shx": "^0.3.2"
},
"gitHead": "3364a2b1e58aba2387c509431cc1ae8ebf2c53d0"
Expand Down
1 change: 0 additions & 1 deletion packages/sdk-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
"js-sha3": "^0.8.0",
"jscrypto": "^1.0.3",
"keccak256": "^1.0.6",
"link-module-alias": "^1.2.0",
"secp256k1": "^4.0.3",
"shx": "^0.3.2",
"snakecase-keys": "^5.4.1"
Expand Down
1 change: 0 additions & 1 deletion packages/test-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
"@injectivelabs/utils": "^1.14.15",
"axios": "^1.6.4",
"bignumber.js": "^9.0.1",
"link-module-alias": "^1.2.0",
"shx": "^0.3.2",
"snakecase-keys": "^5.1.2",
"store2": "^2.12.0"
Expand Down
1 change: 0 additions & 1 deletion packages/ts-types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
"start": "node dist/index.js"
},
"dependencies": {
"link-module-alias": "^1.2.0",
"shx": "^0.3.2"
},
"gitHead": "00176548701ceed002a45fd690bac43653b88d60"
Expand Down
1 change: 0 additions & 1 deletion packages/utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
"axios": "^1.6.4",
"bignumber.js": "^9.0.1",
"http-status-codes": "^2.2.0",
"link-module-alias": "^1.2.0",
"shx": "^0.3.2",
"snakecase-keys": "^5.1.2",
"store2": "^2.12.0"
Expand Down
1 change: 0 additions & 1 deletion packages/wallet-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
"ethereumjs-util": "^7.1.0",
"ethers": "^6.5.1",
"hdkey": "^2.0.1",
"link-module-alias": "^1.2.0",
"long": "^5.2.1",
"magic-sdk": "28.9.0",
"shx": "^0.3.3"
Expand Down
1 change: 0 additions & 1 deletion packages/wallets/wallet-base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
"ethereumjs-util": "^7.1.0",
"ethers": "^6.5.1",
"hdkey": "^2.0.1",
"link-module-alias": "^1.2.0",
"long": "^5.2.1",
"shx": "^0.3.3"
},
Expand Down
1 change: 0 additions & 1 deletion packages/wallets/wallet-cosmos-strategy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
"ethereumjs-util": "^7.1.0",
"ethers": "^6.5.1",
"hdkey": "^2.0.1",
"link-module-alias": "^1.2.0",
"long": "^5.2.1",
"shx": "^0.3.3"
},
Expand Down
1 change: 0 additions & 1 deletion packages/wallets/wallet-cosmos/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
"@injectivelabs/wallet-base": "^0.0.2",
"@keplr-wallet/cosmos": "^0.12.71",
"@keplr-wallet/types": "^0.12.71",
"link-module-alias": "^1.2.0",
"shx": "^0.3.3"
},
"gitHead": "35bd09035587be3fd170cc48b5c13f231e699a79",
Expand Down
1 change: 0 additions & 1 deletion packages/wallets/wallet-evm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
"@injectivelabs/ts-types": "^1.14.14",
"@injectivelabs/utils": "^1.14.14",
"ethers": "^6.5.1",
"link-module-alias": "^1.2.0",
"long": "^5.2.1",
"shx": "^0.3.3"
},
Expand Down
3 changes: 1 addition & 2 deletions packages/wallets/wallet-ledger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@
"alchemy-sdk": "^2.6.3",
"eth-sig-util": "^3.0.1",
"ethereumjs-util": "^7.1.0",
"hdkey": "^2.0.1",
"link-module-alias": "^1.2.0"
"hdkey": "^2.0.1"
},
"devDependencies": {
"@types/eth-sig-util": "^2.1.1",
Expand Down
1 change: 0 additions & 1 deletion packages/wallets/wallet-strategy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
"ethereumjs-util": "^7.1.0",
"ethers": "^6.5.1",
"hdkey": "^2.0.1",
"link-module-alias": "^1.2.0",
"long": "^5.2.1",
"shx": "^0.3.3"
},
Expand Down
1 change: 0 additions & 1 deletion packages/wallets/wallet-trezor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
"ethereumjs-util": "^7.1.0",
"ethers": "^6.5.1",
"hdkey": "^2.0.1",
"link-module-alias": "^1.2.0",
"long": "^5.2.1",
"shx": "^0.3.3"
},
Expand Down
79 changes: 0 additions & 79 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2202,28 +2202,6 @@
protobufjs "^7.0.0"
rxjs "^7.4.0"

"@injectivelabs/exceptions@^1.14.13":
version "1.14.13"
resolved "https://registry.yarnpkg.com/@injectivelabs/exceptions/-/exceptions-1.14.13.tgz#42b3aec3c3a621886d387998981969e7551b7eff"
integrity sha512-yFtB0jQtZI6D3AuaP6ObYtlVgDB4vriCWuV+6GY3frduv7i3kz1ZYVsPKsKSKBCOD5QegZXcEmGJL4RiDi1OKA==
dependencies:
"@injectivelabs/grpc-web" "^0.0.1"
"@injectivelabs/ts-types" "^1.14.13"
http-status-codes "^2.2.0"
link-module-alias "^1.2.0"
shx "^0.3.2"

"@injectivelabs/exceptions@^1.14.14":
version "1.14.14"
resolved "https://registry.yarnpkg.com/@injectivelabs/exceptions/-/exceptions-1.14.14.tgz#fb6a2869c5304b4a87f78f15f4565be4ce4e0fd3"
integrity sha512-yJPfeptWtwyWPYwGDqns5GCi+rq1swAnyrGwySud8esI/mm9kl99j2j8hQhs8vAUg5+I/VKUCA+9X0JGypBczQ==
dependencies:
"@injectivelabs/grpc-web" "^0.0.1"
"@injectivelabs/ts-types" "^1.14.14"
http-status-codes "^2.2.0"
link-module-alias "^1.2.0"
shx "^0.3.2"

"@injectivelabs/grpc-web-node-http-transport@^0.0.2":
version "0.0.2"
resolved "https://registry.yarnpkg.com/@injectivelabs/grpc-web-node-http-transport/-/grpc-web-node-http-transport-0.0.2.tgz#87c9bbd4db1f70cf18d6a55b54b2cf17d3cf30c0"
Expand Down Expand Up @@ -2261,63 +2239,6 @@
protobufjs "^7.0.0"
rxjs "^7.4.0"

"@injectivelabs/networks@^1.14.13":
version "1.14.13"
resolved "https://registry.npmjs.org/@injectivelabs/networks/-/networks-1.14.13.tgz#6264b6249469c57b3b18e4803980ec26c576edba"
integrity sha512-P+eCQXWpbk4LbPxgTmi2gY7OzdZTNsIEUvDoh59Ma0CkqSFaYMtgB8fZVxpkKM0UPla587EDlEEIVxprDBcnZg==
dependencies:
"@injectivelabs/exceptions" "^1.14.13"
"@injectivelabs/ts-types" "^1.14.13"
"@injectivelabs/utils" "^1.14.13"
link-module-alias "^1.2.0"
shx "^0.3.2"

"@injectivelabs/ts-types@^1.14.13":
version "1.14.13"
resolved "https://registry.yarnpkg.com/@injectivelabs/ts-types/-/ts-types-1.14.13.tgz#d211467313b9cd3e2bc53d0900975124a51d3a1e"
integrity sha512-jkR4+JnQ91n7LWAdt+cZuvXFfqhv9RVlTE2pezAjZab7z7VeDonYwktjia5OcbqTKjlirvVHFALIZ0pmYd0j+A==
dependencies:
link-module-alias "^1.2.0"
shx "^0.3.2"

"@injectivelabs/ts-types@^1.14.14":
version "1.14.14"
resolved "https://registry.yarnpkg.com/@injectivelabs/ts-types/-/ts-types-1.14.14.tgz#7e9ad5f4ffe1a9f48261f5426eee49502479bd49"
integrity sha512-z7qNXHdwbeX8pJ+SLNcSWJDEjfeXTUuA4+zwpUeJQdCIjPBkSm3yiQZBQ5hSJE4Y+vuAuHqNgl3liFPpJ3KsbQ==
dependencies:
link-module-alias "^1.2.0"
shx "^0.3.2"

"@injectivelabs/utils@^1.14.13":
version "1.14.13"
resolved "https://registry.yarnpkg.com/@injectivelabs/utils/-/utils-1.14.13.tgz#97491f4f41c2aa546d4a619ff6516af0fa8dad08"
integrity sha512-djmSq28R7HDSb2Mezan+EFjqQgmDRydY+fLOmkODwOCYA04xOGQo7yna+WVovV85aKpwPjn864AWPy65xiHUZg==
dependencies:
"@injectivelabs/exceptions" "^1.14.13"
"@injectivelabs/ts-types" "^1.14.13"
axios "^1.6.4"
bignumber.js "^9.0.1"
http-status-codes "^2.2.0"
link-module-alias "^1.2.0"
shx "^0.3.2"
snakecase-keys "^5.1.2"
store2 "^2.12.0"

"@injectivelabs/utils@^1.14.14":
version "1.14.14"
resolved "https://registry.yarnpkg.com/@injectivelabs/utils/-/utils-1.14.14.tgz#1c76c23767a501fc9b82d7061165851fb0e55b24"
integrity sha512-SOpm8P7aZGdgs44+PJuYgUuxiBjdEbETZ5BVT5rtL+FUi9RCpTy8nfkTVRYF3meza/jlmTxjekD0F3wpGiPCBw==
dependencies:
"@injectivelabs/exceptions" "^1.14.14"
"@injectivelabs/ts-types" "^1.14.14"
axios "^1.6.4"
bignumber.js "^9.0.1"
http-status-codes "^2.2.0"
link-module-alias "^1.2.0"
shx "^0.3.2"
snakecase-keys "^5.1.2"
store2 "^2.12.0"

"@ioredis/commands@^1.1.1":
version "1.2.0"
resolved "https://registry.npmjs.org/@ioredis/commands/-/commands-1.2.0.tgz#6d61b3097470af1fdbbe622795b8921d42018e11"
Expand Down