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

chore: Remove a a bunch of old dependencies #1528

Merged
merged 3 commits into from
Jan 22, 2025
Merged

Conversation

alexrisch
Copy link
Contributor

@alexrisch alexrisch commented Jan 16, 2025

Removed a large bit of dependencies

Summary by CodeRabbit

  • Configuration Updates

    • Updated chain imports from wagmi/chains to viem/chains
    • Modified Jest configuration to adjust module transformation
  • Dependency Management

    • Moved Babel-related dependencies from runtime to development
    • Removed several dependencies including react-native-device-info
    • Added babel-plugin-module-resolver
    • Updated react-native-svg-transformer and @types/jest versions
    • Updated jest-expo version
  • Testing

    • Removed mock for react-native-device-info
    • Updated Jest configuration to modify module transformation rules

@alexrisch alexrisch requested a review from a team as a code owner January 16, 2025 12:55
Copy link
Contributor

coderabbitai bot commented Jan 16, 2025

Walkthrough

This pull request involves configuration updates across multiple files in the project. The changes primarily focus on modifying dependencies in package.json, adjusting Jest configuration in jest.config.ts and jest.setup.ts, and updating chain imports in config.ts. The modifications include moving Babel-related dependencies from dependencies to devDependencies, removing certain package mocks, and changing the source of blockchain chain imports from wagmi/chains to viem/chains.

Changes

File Change Summary
config.ts Updated chain imports from wagmi/chains to viem/chains, modifying defaultChain references for privy configurations
jest.config.ts Removed several package names from transformIgnorePatterns regular expression
jest.setup.ts Removed mock for react-native-device-info
package.json - Moved Babel dependencies to devDependencies
- Added babel-plugin-module-resolver
- Removed multiple dependencies like eciesjs, react-native-device-info
- Updated react-native-svg-transformer version

Suggested reviewers

  • nplasterer
  • thierryskoda

Possibly related PRs

  • fix: EAS Build Fixes #1099: The changes in config.ts regarding the import statements for base and baseSepolia may relate to the overall configuration updates in the eas.json file, which also deals with build configurations and environment settings.
  • fix: EAS Node Versions #1435: This PR modifies the eas.json file, which is closely related to the changes in config.ts as both involve configuration management for builds and environments.
  • chore: Build Cleanup #1451: The build cleanup and workflow adjustments may connect to the configuration changes in config.ts, as both aim to streamline the development and build processes.

Poem

🐰 In configs we dance and twirl,
Dependencies shift, our code unfurl
Babel moves, chains realign
Jest mocks fade, new paths define
A rabbit's config ballet, so bright! 🔧✨


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?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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 comments (1)
package.json (1)

Line range hint 1-256: Add ts-node as a devDependency to fix the TypeScript CI pipeline.

The TypeScript CI pipeline is failing due to a missing ts-node dependency, which is required for parsing TypeScript configuration files.

Add the following to devDependencies:

  "devDependencies": {
+   "ts-node": "^10.9.2",
    // ... other devDependencies
  }
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d404973 and 099b4be.

⛔ Files ignored due to path filters (2)
  • ios/Podfile.lock is excluded by !**/*.lock
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (4)
  • config.ts (1 hunks)
  • jest.config.ts (1 hunks)
  • jest.setup.ts (0 hunks)
  • package.json (3 hunks)
💤 Files with no reviewable changes (1)
  • jest.setup.ts
🧰 Additional context used
🪛 GitHub Actions: Typescript CI
jest.config.ts

[error] Failed to parse TypeScript config file due to missing 'ts-node' package dependency. Install 'ts-node' to resolve this issue.

config.ts

[error] Failed to parse TypeScript config file due to missing 'ts-node' package dependency. Install 'ts-node' to resolve this issue.

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: build
🔇 Additional comments (2)
package.json (1)

188-195: LGTM! Correctly moved Babel dependencies to devDependencies.

Moving Babel-related packages to devDependencies is the right approach as these are build-time dependencies, not runtime dependencies.

config.ts (1)

4-4: LGTM! Correctly migrated from wagmi to viem chains.

The change aligns with the removal of the wagmi dependency, and the chain configurations remain functionally equivalent.

Let's verify that all wagmi imports have been migrated:

✅ Verification successful

Verified: All wagmi chain imports have been successfully migrated

The codebase shows consistent use of:

  • viem/chains for base configuration
  • thirdweb/chains for wallet and ethereum-specific functionality

No remaining wagmi imports were found.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Verify no remaining wagmi chain imports
rg "from ['\"]wagmi/chains['\"]"

Length of output: 38


Script:

#!/bin/bash
# Search for any wagmi imports
echo "=== Checking for any wagmi imports ==="
rg "from ['\"]wagmi['/]"

# Search for chain imports to verify they're using viem
echo -e "\n=== Checking all chain imports ==="
rg "from ['\"].*chains['\"]"

Length of output: 700

🧰 Tools
🪛 GitHub Actions: Typescript CI

[error] Failed to parse TypeScript config file due to missing 'ts-node' package dependency. Install 'ts-node' to resolve this issue.

@@ -87,7 +87,7 @@ const config: Config = {
* Won't transform: "lodash", "moment"
*/
transformIgnorePatterns: [
"node_modules/(?!((jest-)?react-native|@react-native(-community)?|expo(nent)?|@expo(nent)?/.*|@expo-google-fonts/.*|react-navigation|@react-navigation/.*|@unimodules/.*|unimodules|sentry-expo|native-base|react-native-svg|rn-fetch-blob|@xmtp|uuid|wagmi))",
"node_modules/(?!((jest-)?react-native|@react-native(-community)?|expo(nent)?|@expo(nent)?/.*|@expo-google-fonts/.*|react-navigation|@react-navigation/.*|@unimodules/.*|unimodules|sentry-expo|native-base|react-native-svg|rn-fetch-blob|@xmtp|uuid))",
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Codebase verification

Keep react-navigation patterns in transformIgnorePatterns

The react-navigation packages are actively used in the codebase with multiple dependencies in package.json and 40+ imports across various files. Removing these patterns could break test execution. While @expo-google-fonts can be safely removed, please keep the following patterns:

  • @react-navigation/.*
  • react-navigation
🔗 Analysis chain

Verify the impact of removing packages from transformIgnorePatterns.

The removal of @expo-google-fonts/., react-navigation, and @react-navigation/. from transformIgnorePatterns needs verification to ensure it doesn't affect test execution.

Let's verify if these packages are still in use and require transformation:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for usage of removed packages
echo "Checking for @expo-google-fonts usage..."
rg "from ['\"]\@expo-google-fonts/"

echo "Checking for react-navigation usage..."
rg "from ['\"]\@?react-navigation/"

Length of output: 467


Script:

#!/bin/bash
# Check package.json for dependencies
echo "Checking package.json for dependencies..."
cat package.json | jq '.dependencies, .devDependencies' 2>/dev/null | grep -E "@expo-google-fonts|react-navigation"

echo -e "\nChecking for @expo-google-fonts imports..."
rg "from .*@expo-google-fonts"

echo -e "\nChecking for react-navigation imports..."
rg "from .*react-navigation"

echo -e "\nChecking for additional jest config files..."
fd -e js -e json -e ts "jest.config"

Length of output: 6315

🧰 Tools
🪛 GitHub Actions: Typescript CI

[error] Failed to parse TypeScript config file due to missing 'ts-node' package dependency. Install 'ts-node' to resolve this issue.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
package.json (1)

Line range hint 1-256: Consider using strict versions for critical dependencies.

Several critical dependencies use caret (^) versioning which may lead to unexpected updates. Consider using fixed versions for critical dependencies like:

  • ethers
  • @xmtp/xmtp-js
  • react-native
  • expo
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 099b4be and 13f09aa.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (1)
  • package.json (3 hunks)
🔇 Additional comments (3)
package.json (3)

188-195: Correct move of Babel dependencies to devDependencies.

Moving Babel-related packages to devDependencies is the right approach since these are build-time dependencies not required at runtime.


86-86: Verify module resolver configuration.

The addition of babel-plugin-module-resolver suggests path aliasing is being implemented. This is good for maintainability, but requires proper configuration.

Run this script to check for the Babel configuration:

✅ Verification successful

Module resolver configuration is properly implemented

The babel-plugin-module-resolver is correctly configured in babel.config.js and serves specific module aliasing needs for compatibility and bundling purposes, rather than path aliasing for maintainability as initially assumed.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for babel.config.js and verify module-resolver configuration

# Look for babel config files
echo "Checking for Babel configuration files..."
fd -t f "babel\.config\.(js|json)"

# Check module-resolver configuration in babel config
echo "Checking module-resolver configuration..."
rg -A 10 "module-resolver" 

Length of output: 2514


203-203: Verify compatibility with updated dev dependencies.

The following version updates need verification:

  • @types/jest: ^29.5.14
  • jest: ~29.7.0
  • jest-expo: ~52.0.3
  • react-native-svg-transformer: ^1.5.0

Run this script to check for potential compatibility issues:

Also applies to: 222-223, 233-233

✅ Verification successful

Dependencies are compatible with each other

The updated dependencies maintain version compatibility:

  • jest-expo ~52.0.3 matches expo ^52.0.0
  • @types/jest ^29.5.14 matches jest ~29.7.0
  • react-native-svg-transformer ^1.5.0 is compatible with the current setup
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for potential compatibility issues in package.json

# Check if jest-expo version matches the expo version
echo "Checking jest-expo compatibility..."
rg '"expo":.*"52\.0\.0"' package.json
rg '"jest-expo":.*"52\.0\.3"' package.json

# Check React Native version compatibility
echo "Checking React Native compatibility..."
rg '"react-native":.*"0\.76\.5"' package.json

Length of output: 330


Script:

#!/bin/bash
# Get all relevant dependency versions
echo "Checking dependency versions..."
rg -A1 '"dependencies": \{' package.json
rg -A1 '"devDependencies": \{' package.json
rg '@types/jest|jest":|jest-expo|react-native-svg-transformer|expo":' package.json

# Check expo SDK version from app.json/app.config.js
echo -e "\nChecking Expo SDK version..."
fd -e json -e js -x grep -l "sdkVersion" {}

Length of output: 686

Copy link
Contributor

github-actions bot commented Jan 16, 2025

Performance Comparison Report

  • Current: c08025b - 2025-01-22 08:37:20Z
  • Baseline: main (a506922) - 2025-01-22 08:36:10Z

Significant Changes To Duration

There are no entries

Meaningless Changes To Duration

Show entries
Name Type Duration Count
Avatar Image 10 runs render 0.7 ms → 0.9 ms (+0.2 ms, +28.6%) 🔴 1 → 1
Avatar Image 50 runs render 0.6 ms → 0.6 ms (+0.0 ms, +3.2%) 1 → 1
Empty Avatar 10 runs render 1.0 ms → 1.0 ms 1 → 1
Empty Avatar 50 runs render 0.9 ms → 0.9 ms (-0.1 ms, -8.5%) 1 → 1
Text Component with color prop - 10 runs render 0.5 ms → 0.1 ms (-0.4 ms, -80.0%) 🟢 1 → 1
Text Component with default props - 10 runs render 1.0 ms → 0.8 ms (-0.2 ms, -20.0%) 🟢 1 → 1
Text Component with translation key - 10 runs render 0.6 ms → 0.8 ms (+0.2 ms, +33.3%) 🔴 1 → 1
Text Component with weight and size - 10 runs render 0.3 ms → 0.7 ms (+0.4 ms, +133.3%) 🔴 1 → 1
Show details
Name Type Duration Count
Avatar Image 10 runs render Baseline
Mean: 0.7 ms
Stdev: 0.7 ms (96.4%)
Runs: 1 1 0 1 0 0 0 1 2 1
Warmup runs: 0

Current
Mean: 0.9 ms
Stdev: 0.6 ms (63.1%)
Runs: 1 1 1 0 1 1 1 1 2 0
Warmup runs: 1
Baseline
Mean: 1
Stdev: 0 (0.0%)
Runs: 1 1 1 1 1 1 1 1 1 1
Render issues:

Current
Mean: 1
Stdev: 0 (0.0%)
Runs: 1 1 1 1 1 1 1 1 1 1
Render issues:
Avatar Image 50 runs render Baseline
Mean: 0.6 ms
Stdev: 0.5 ms (79.1%)
Runs: 1 1 1 1 1 1 1 1 1 0 0 0 1 1 1 1 0 1 0 1 0 1 0 0 0 1 0 1 1 1 1 0 0 1 0 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1
Warmup runs: 1

Current
Mean: 0.6 ms
Stdev: 0.5 ms (75.8%)
Runs: 1 0 0 0 1 1 1 0 0 0 1 1 1 1 0 1 0 1 1 1 1 0 1 0 0 1 1 0 1 1 1 0 1 1 1 1 0 1 1 1 1 1 1 0 1 1 1 0 0 0
Warmup runs: 1
Baseline
Mean: 1
Stdev: 0 (0.0%)
Runs: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
Render issues:

Current
Mean: 1
Stdev: 0 (0.0%)
Runs: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
Render issues:
Empty Avatar 10 runs render Baseline
Mean: 1.0 ms
Stdev: 0.0 ms (0.0%)
Runs: 1 1 1 1 1 1 1 1 1 1
Warmup runs: 2

Current
Mean: 1.0 ms
Stdev: 0.0 ms (0.0%)
Runs: 1 1 1 1 1 1 1 1 1 1
Warmup runs: 2
Baseline
Mean: 1
Stdev: 0 (0.0%)
Runs: 1 1 1 1 1 1 1 1 1 1
Render issues:

Current
Mean: 1
Stdev: 0 (0.0%)
Runs: 1 1 1 1 1 1 1 1 1 1
Render issues:
Empty Avatar 50 runs render Baseline
Mean: 0.9 ms
Stdev: 0.2 ms (25.5%)
Runs: 1 1 1 1 1 1 1 1 1 1 1 0 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1
Warmup runs: 1

Current
Mean: 0.9 ms
Stdev: 0.4 ms (40.8%)
Runs: 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 0 1 1 1 1 1 1 0 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 1 1 0 1 1
Warmup runs: 1
Baseline
Mean: 1
Stdev: 0 (0.0%)
Runs: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
Render issues:

Current
Mean: 1
Stdev: 0 (0.0%)
Runs: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
Render issues:
Text Component with color prop - 10 runs render Baseline
Mean: 0.5 ms
Stdev: 0.5 ms (105.4%)
Runs: 0 1 1 0 0 1 0 0 1 1
Warmup runs: 0

Current
Mean: 0.1 ms
Stdev: 0.3 ms (316.2%)
Runs: 1 0 0 0 0 0 0 0 0 0
Warmup runs: 1
Baseline
Mean: 1
Stdev: 0 (0.0%)
Runs: 1 1 1 1 1 1 1 1 1 1
Render issues:

Current
Mean: 1
Stdev: 0 (0.0%)
Runs: 1 1 1 1 1 1 1 1 1 1
Render issues:
Text Component with default props - 10 runs render Baseline
Mean: 1.0 ms
Stdev: 0.7 ms (66.7%)
Runs: 2 2 1 1 1 0 1 1 1 0
Warmup runs: 3

Current
Mean: 0.8 ms
Stdev: 0.6 ms (79.1%)
Runs: 1 2 0 1 1 1 1 0 0 1
Warmup runs: 3
Baseline
Mean: 1
Stdev: 0 (0.0%)
Runs: 1 1 1 1 1 1 1 1 1 1
Render issues:

Current
Mean: 1
Stdev: 0 (0.0%)
Runs: 1 1 1 1 1 1 1 1 1 1
Render issues:
Text Component with translation key - 10 runs render Baseline
Mean: 0.6 ms
Stdev: 0.5 ms (86.1%)
Runs: 1 0 0 1 1 1 0 1 0 1
Warmup runs: 1

Current
Mean: 0.8 ms
Stdev: 0.4 ms (52.7%)
Runs: 1 1 1 1 1 0 1 1 1 0
Warmup runs: 1
Baseline
Mean: 1
Stdev: 0 (0.0%)
Runs: 1 1 1 1 1 1 1 1 1 1
Render issues:

Current
Mean: 1
Stdev: 0 (0.0%)
Runs: 1 1 1 1 1 1 1 1 1 1
Render issues:
Text Component with weight and size - 10 runs render Baseline
Mean: 0.3 ms
Stdev: 0.5 ms (161.0%)
Runs: 0 0 0 0 1 0 1 0 0 1
Warmup runs: 0

Current
Mean: 0.7 ms
Stdev: 0.5 ms (69.0%)
Runs: 1 1 0 1 1 0 1 0 1 1
Warmup runs: 0
Baseline
Mean: 1
Stdev: 0 (0.0%)
Runs: 1 1 1 1 1 1 1 1 1 1
Render issues:

Current
Mean: 1
Stdev: 0 (0.0%)
Runs: 1 1 1 1 1 1 1 1 1 1
Render issues:

Render Count Changes

There are no entries

Render Issues

There are no entries

Added Scenarios

There are no entries

Removed Scenarios

There are no entries

Generated by 🚫 dangerJS against 7bbb4fa

@alexrisch
Copy link
Contributor Author

Going to hold this until after the Preview build Friday morning

package.json Show resolved Hide resolved
@alexrisch alexrisch force-pushed the ar/remove-old-packages branch from 13f09aa to 4019c0e Compare January 20, 2025 07:29
@alexrisch
Copy link
Contributor Author

Should be fine to merge once we get a consistent build

Removed a large bit of dependencies
TS Node is required when using jest.config.ts
@alexrisch alexrisch force-pushed the ar/remove-old-packages branch from 4019c0e to 226c46c Compare January 22, 2025 08:30
@alexrisch alexrisch merged commit 3bcb307 into main Jan 22, 2025
11 checks passed
@alexrisch alexrisch deleted the ar/remove-old-packages branch January 22, 2025 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants