-
Notifications
You must be signed in to change notification settings - Fork 195
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
Conversation
Caution Review failedThe pull request is closed. WalkthroughThis pull request involves updates to multiple Changes
Possibly related PRs
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎ This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. |
Report too large to display inline |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Outside diff range and nitpick comments (2)
packages/wallets/wallet-ledger/package.json (1)
Line range hint 15-18
: Consider documenting module alias usage.
The package uses module aliases (_moduleAliases
) but the mechanism to apply them is being changed. Consider adding a comment in the package.json to document how these aliases are now being handled across the workspace.
package.json (1)
89-89
: Document the module aliasing strategy.
Since you're centralizing the module aliasing configuration, consider adding documentation about:
- How module aliases are configured and managed
- The relationship between
link-module-alias
andtsc-alias
- Any required steps for developers when adding new aliases
Would you like me to help create a documentation template for this?
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (15)
- package.json (1 hunks)
- packages/exceptions/package.json (0 hunks)
- packages/networks/package.json (0 hunks)
- packages/sdk-ts/package.json (0 hunks)
- packages/test-utils/package.json (0 hunks)
- packages/ts-types/package.json (0 hunks)
- packages/utils/package.json (0 hunks)
- packages/wallet-ts/package.json (0 hunks)
- packages/wallets/wallet-base/package.json (0 hunks)
- packages/wallets/wallet-cosmos-strategy/package.json (0 hunks)
- packages/wallets/wallet-cosmos/package.json (0 hunks)
- packages/wallets/wallet-evm/package.json (0 hunks)
- packages/wallets/wallet-ledger/package.json (1 hunks)
- packages/wallets/wallet-strategy/package.json (0 hunks)
- packages/wallets/wallet-trezor/package.json (0 hunks)
💤 Files with no reviewable changes (13)
- packages/exceptions/package.json
- packages/networks/package.json
- packages/sdk-ts/package.json
- packages/test-utils/package.json
- packages/ts-types/package.json
- packages/utils/package.json
- packages/wallet-ts/package.json
- packages/wallets/wallet-base/package.json
- packages/wallets/wallet-cosmos-strategy/package.json
- packages/wallets/wallet-cosmos/package.json
- packages/wallets/wallet-evm/package.json
- packages/wallets/wallet-strategy/package.json
- packages/wallets/wallet-trezor/package.json
🔇 Additional comments (1)
packages/wallets/wallet-ledger/package.json (1)
Line range hint 1-67
: Verify the availability of link-module-alias for build scripts.
The package still uses link-module-alias
in its scripts (postinstall and build) but the dependency has been removed. This could break the build process if the dependency isn't available through the workspace.
Let's verify the dependency availability:
✅ Verification successful
link-module-alias
dependency is available through workspace root
The dependency is correctly managed at the workspace level:
- Found in root package.json as version
^1.2.0
- Also available in
@injectivelabs/injective-ts
package
The removal of the direct dependency while maintaining the scripts is the correct approach for workspace-level dependency management. The build process will continue to work as expected since the dependency is available through the workspace root.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Check if link-module-alias is available in the root package.json
echo "Checking root package.json for link-module-alias..."
jq '.dependencies["link-module-alias"] // .devDependencies["link-module-alias"] // empty' package.json
# Check if any workspace package still has link-module-alias
echo "Checking workspace packages for link-module-alias..."
fd --type f package.json --exec jq -r 'select(.dependencies["link-module-alias"] // .devDependencies["link-module-alias"]) | "\(.name): link-module-alias found"'
Length of output: 558
package.json
Outdated
@@ -86,6 +86,7 @@ | |||
"jest-junit": "^15.0.0", | |||
"lerna": "6.6.1", | |||
"lint-staged": "^11.1.2", | |||
"link-module-alias": "^1.2.0", |
There was a problem hiding this comment.
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 anylink-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
andtsc-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
Summary by CodeRabbit
Bug Fixes
link-module-alias
dependency across multiple packages, which may improve module aliasing behavior.New Features
gitHead
field to various packages for better version control tracking.Chores
build
andbuild:watch
scripts to include the--force
flag for TypeScript compilation, enhancing build reliability.