-
Notifications
You must be signed in to change notification settings - Fork 82
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 deprecation, isDecryptionEnabled function and lerna caching #1502
Conversation
WalkthroughThe pull request introduces several changes across multiple files, primarily focusing on updating the configuration in Changes
Possibly related PRs
Suggested reviewers
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (5)
🧰 Additional context used📓 Learnings (2)packages/epk-decryption/src/ethereum-private-key-decryption-provider.ts (1)
packages/epk-cipher/src/ethereum-private-key-cipher-provider.ts (1)
🔇 Additional comments (9)nx.json (1)
The changes to improve caching and build dependencies look good. The addition of the "clean" operation and its dependencies creates a more robust build pipeline. Let's verify the clean target implementation across packages: Also applies to: 15-18 ✅ Verification successfulClean scripts are properly implemented across all packages All packages have appropriate clean scripts defined:
🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Description: Check for clean scripts in package.json files
# Expected: Each package should have a clean script defined
# Find all package.json files and check for clean scripts
fd package.json --type f --exec sh -c 'echo "=== {} ===" && cat {} | jq -r ".scripts.clean"'
Length of output: 2694 packages/types/src/cipher-provider-types.ts (1)
The new packages/epk-decryption/src/ethereum-private-key-decryption-provider.ts (2)
The
The runtime warning helps users identify deprecated usage. Let's verify the availability of the replacement implementation. ✅ Verification successfulLet me gather more information about both classes to compare their interfaces. Let me get the implementation of the deprecated class to complete the comparison. Migration path to EthereumPrivateKeyCipherProvider is clear and complete The replacement
🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Description: Verify the existence and compatibility of EthereumPrivateKeyCipherProvider
# Expected: Find the replacement class and compare interfaces
# Check for the replacement class
echo "=== Searching for replacement class ==="
rg -l "class EthereumPrivateKeyCipherProvider"
# Compare method signatures to ensure compatibility
echo "=== Comparing interfaces ==="
ast-grep --pattern 'class EthereumPrivateKeyCipherProvider {
$$$
}'
Length of output: 340 Script: #!/bin/bash
# Get the interface of both classes for comparison
echo "=== EthereumPrivateKeyDecryptionProvider interface ==="
ast-grep --pattern 'class EthereumPrivateKeyDecryptionProvider {
$$$
}'
echo -e "\n=== EthereumPrivateKeyCipherProvider interface ==="
cat packages/epk-cipher/src/ethereum-private-key-cipher-provider.ts
Length of output: 6894 Script: #!/bin/bash
echo "=== EthereumPrivateKeyDecryptionProvider implementation ==="
cat packages/epk-decryption/src/ethereum-private-key-decryption-provider.ts
Length of output: 5159 packages/epk-cipher/src/ethereum-private-key-cipher-provider.ts (2)
The renaming of Also applies to: 47-47, 56-56
The addition of packages/lit-protocol-cipher/src/lit-protocol-cipher-provider.ts (3)
The renaming of Also applies to: 287-288, 345-345
The implementation of
The ✅ Verification successfulDifferent isDecryptionAvailable implementations are correct by design The implementations differ based on their specific requirements:
These differences are intentional and align with each provider's unique encryption/decryption mechanism:
🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Check if other cipher providers have similar checks in their isDecryptionAvailable methods
ast-grep --pattern 'isDecryptionAvailable() {
$$$
}'
Length of output: 56 Script: #!/bin/bash
# Search for isDecryptionAvailable method implementations with context
rg "isDecryptionAvailable" -A 5 --type typescript
# Also search for class definitions containing cipher provider to ensure we find all implementations
rg "class.*CipherProvider" -A 20 --type typescript
Length of output: 172 Script: #!/bin/bash
# Search for isDecryptionAvailable method implementations with context
rg "isDecryptionAvailable" -A 5
# Also search for class definitions containing cipher provider to ensure we find all implementations
rg "class.*CipherProvider" -A 20
Length of output: 11619 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 (
|
Description of the changes
After reviewing the changes with @MantisClone we decided to
EthereumPrivateKeyCipherProvider.isDecryptionEnabled
to True, to match legacy behavior ofEthereumPrivateKeyDecryptionProvider
Summary by CodeRabbit
New Features
isDecryptionEnabled()
across various providers to check if decryption is enabled.clean
task to enhance task management.Deprecations
EthereumPrivateKeyDecryptionProvider
as deprecated, recommending the use ofEthereumPrivateKeyCipherProvider
instead.Bug Fixes