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(synapse-interface): deprecate unused dependencies #2287

Merged
merged 4 commits into from
Mar 14, 2024

Conversation

abtestingalpha
Copy link
Collaborator

@abtestingalpha abtestingalpha commented Mar 14, 2024

  • Move deps that are for development into devDeps
  • Remove unused deps
  • Remove deprecated code

Summary by CodeRabbit

  • Refactor
    • Updated import sources for utility functions across components for consistency and efficiency.
    • Modified import statements in documentation to reflect new utility function sources.
  • Chores
    • Streamlined dependencies by removing unused ones and adding relevant new dependencies.
    • Updated dependency versions for improved performance and security.
  • Documentation
    • Adjusted import statements in documentation to reflect the new sources of utility functions.

044f370ab4472dfb774d93b5fc21e1e3e8adedfe: synapse-interface preview link
da8090ad090f19e7b91d2a3f5df311bd13c1f9b5: synapse-interface preview link
6e6fb45e27395aeb8ba6f36db84f4f61de0ceb06: synapse-interface preview link
6d55f9483ff30cb035b5f0d4196458510ae639ff: synapse-interface preview link

* Move deps that are for development into devDeps
* Remove unused deps
* Remove deprecated code
Copy link
Contributor

coderabbitai bot commented Mar 14, 2024

Walkthrough

The project has undergone a significant transformation, focusing on dependency management and code optimization. Key changes include transitioning from @ethersproject libraries to viem for Ethereum address and blockchain interactions, removing unused dependencies, and updating various packages. This overhaul streamlines the codebase and aligns it with the latest web3 development practices.

Changes

File Path Change Summary
.../StateManagedBridge/BridgeTransactionButton.tsx
.../pool/poolManagement/Deposit.tsx
.../utils/types/index.tsx
Replaced @ethersproject/address imports with viem.
.../package.json - Removed multiple dependencies including @ethersproject/*, cypress, lodash.debounce, etc.
- Added @depay/web3-mock, @testing-library/cypress, and updated versions for others.
.../state-managed-bridge/index.tsx Adjusted imports, removing createPublicClient and http from viem, adding isAddress.
yarn.lock Updated and removed various @types packages and dependencies.

🐇✨
In the realm of code, where changes abound,
A rabbit hopped, leaving footprints on the ground.
From ethers' grasp to viem's embrace,
Dependencies shifted, finding their new place.
With every hop, the garden grew,
A project blooms, refreshed and new.
🌱🚀

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>.
    • Generate unit-tests 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 tests 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

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 as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • 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/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

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.

Review Status

Actionable comments generated: 0

Configuration used: .coderabbit.yaml

Commits Files that changed from the base of the PR and between 0adb96b and 1c1b3bc.
Files selected for processing (6)
  • packages/synapse-interface/components/StateManagedBridge/BridgeTransactionButton.tsx (1 hunks)
  • packages/synapse-interface/package.json (4 hunks)
  • packages/synapse-interface/pages/pool/poolManagement/Deposit.tsx (3 hunks)
  • packages/synapse-interface/pages/state-managed-bridge/index.tsx (1 hunks)
  • packages/synapse-interface/utils/types/index.tsx (1 hunks)
  • yarn.lock (15 hunks)
Files skipped from review due to trivial changes (1)
  • packages/synapse-interface/package.json
Additional comments: 4
packages/synapse-interface/components/StateManagedBridge/BridgeTransactionButton.tsx (1)
  • 8-8: The import of isAddress has been successfully updated from @ethersproject/address to viem. Please ensure that the functionality of isAddress from viem matches the expected behavior and that all instances where isAddress is used have been tested to confirm correct operation.
packages/synapse-interface/utils/types/index.tsx (1)
  • 3-3: The import of getAddress has been successfully updated from @ethersproject/address to viem. Please ensure that the functionality of getAddress from viem matches the expected behavior and that all instances where getAddress is used have been tested to confirm correct operation.
packages/synapse-interface/pages/pool/poolManagement/Deposit.tsx (1)
  • 43-43: The import of getAddress and zeroAddress has been successfully updated to use viem instead of @ethersproject/address. Please ensure that the functionality of these functions from viem matches the expected behavior and that all instances where they are used have been tested to confirm correct operation.
packages/synapse-interface/pages/state-managed-bridge/index.tsx (1)
  • 64-64: The import of isAddress has been successfully updated to use viem, and the removal of createPublicClient and http imports suggests a cleanup of unused imports. Please ensure that the functionality of isAddress from viem matches the expected behavior and that all instances where it is used have been tested to confirm correct operation. Additionally, confirm that the removal of createPublicClient and http does not affect any functionality.

Copy link

cloudflare-workers-and-pages bot commented Mar 14, 2024

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: c043f28
Status: ✅  Deploy successful!
Preview URL: https://9c0ce9df.sanguine.pages.dev
Branch Preview URL: https://fe-shuffle-deps.sanguine.pages.dev

View logs

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.

Review Status

Actionable comments generated: 0

Configuration used: .coderabbit.yaml

Commits Files that changed from the base of the PR and between 1c1b3bc and c043f28.
Files selected for processing (2)
  • packages/synapse-interface/package.json (4 hunks)
  • yarn.lock (17 hunks)
Files skipped from review as they are similar to previous changes (1)
  • yarn.lock
Additional comments: 1
packages/synapse-interface/package.json (1)
  • 99-107: The addition of testing-related dependencies (cypress, @depay/web3-mock, @testing-library/cypress, start-server-and-test, @graphql-codegen/cli, @graphql-codegen/client-preset, @graphql-codegen/introspection, @graphql-codegen/typescript-rtk-query, @testing-library/jest-dom, @testing-library/react, @types/redux-persist, jest, jest-environment-jsdom) is a positive change, enhancing the project's testing capabilities. However, ensure that the newly added dependencies are indeed used within the project's tests to avoid bloating the devDependencies. If some of these packages are not utilized, consider removing them to keep the project lean.

@abtestingalpha abtestingalpha merged commit e14071b into master Mar 14, 2024
39 of 41 checks passed
@abtestingalpha abtestingalpha deleted the fe/shuffle-deps branch March 14, 2024 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants