Skip to content

fix(spaceward): updated dependencies to fix build issue #1353

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

Merged
merged 5 commits into from
Mar 17, 2025
Merged

Conversation

jjheywood
Copy link
Collaborator

No description provided.

@jjheywood jjheywood requested a review from Pitasi March 17, 2025 14:35
Copy link

vercel bot commented Mar 17, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
warden-help-center ⬜️ Ignored (Inspect) Visit Preview Mar 17, 2025 3:04pm

Copy link
Contributor

coderabbitai bot commented Mar 17, 2025

📝 Walkthrough

Walkthrough

This pull request removes the mplex() stream muxer from the Libp2p configuration and updates the wallet interface across multiple modules by replacing IWeb3Wallet with IWalletKit. Additionally, it upgrades various dependency versions in both the spaceward and wardenjs package.json files, and adds a new dependency for galaxy-station. There are also minor formatting improvements without altering underlying logic or control flow.

Changes

File(s) Change Summary
spaceward/bin/relay.mjs Removed mplex() from the streamMuxers array in the Libp2p configuration, retaining only yamux().
spaceward/package.json, wardenjs/package.json Upgraded multiple dependency versions (e.g., various @cosmjs packages, rimraf, and others) and added a new dependency @cosmos-kit/galaxy-station in spaceward’s package.json.
spaceward/src/features/actions/util.ts,
spaceward/src/features/walletconnect/util.ts,
spaceward/src/hooks/useWeb3Wallet.ts
Replaced wallet interface types and references from IWeb3Wallet to IWalletKit, updated function signatures and initialization calls, and applied minor formatting improvements.

Possibly related PRs

  • feat(spaceward): fix walletconnect and snap handlers #1055: The changes in the main PR, which involve modifying the handleEthRaw, handleEth, and handleCosmos functions to update wallet interface types, are related to the changes in the retrieved PR that also modify the handleEthRaw, handleEth, and handleCosmos functions by refactoring their parameters for WalletConnect functionality.

Suggested labels

protocol

Suggested reviewers

  • artur-abliazimov
  • backsapc
  • mn13

Tip

⚡🧪 Multi-step agentic review comment chat (experimental)
  • We're introducing multi-step agentic chat in review comments. This experimental feature enhances review discussions with the CodeRabbit agentic chat by enabling advanced interactions, including the ability to create pull requests directly from comments.
    - To enable this feature, set early_access to true under in the settings.

📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f548613 and 8a7fead.

⛔ Files ignored due to path filters (1)
  • wardenjs/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (1)
  • wardenjs/package.json (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • wardenjs/package.json
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: build
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: Analyze (go)

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • 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.
  • @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.

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

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5daf112 and f548613.

⛔ Files ignored due to path filters (35)
  • spaceward/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • wardenjs/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • wardenjs/src/codegen/cosmos/auth/v1beta1/genesis.ts is excluded by !wardenjs/src/codegen/**
  • wardenjs/src/codegen/cosmos/bank/v1beta1/genesis.ts is excluded by !wardenjs/src/codegen/**
  • wardenjs/src/codegen/cosmos/bundle.ts is excluded by !wardenjs/src/codegen/**
  • wardenjs/src/codegen/cosmos/distribution/v1beta1/genesis.ts is excluded by !wardenjs/src/codegen/**
  • wardenjs/src/codegen/cosmos/gov/v1/genesis.ts is excluded by !wardenjs/src/codegen/**
  • wardenjs/src/codegen/ethermint/bundle.ts is excluded by !wardenjs/src/codegen/**
  • wardenjs/src/codegen/google/bundle.ts is excluded by !wardenjs/src/codegen/**
  • wardenjs/src/codegen/google/protobuf/struct.ts is excluded by !wardenjs/src/codegen/**
  • wardenjs/src/codegen/hooks.ts is excluded by !wardenjs/src/codegen/**
  • wardenjs/src/codegen/shield/bundle.ts is excluded by !wardenjs/src/codegen/**
  • wardenjs/src/codegen/slinky/bundle.ts is excluded by !wardenjs/src/codegen/**
  • wardenjs/src/codegen/tendermint/bundle.ts is excluded by !wardenjs/src/codegen/**
  • wardenjs/src/codegen/warden/async/module/module.ts is excluded by !wardenjs/src/codegen/**
  • wardenjs/src/codegen/warden/async/v1beta1/events.ts is excluded by !wardenjs/src/codegen/**
  • wardenjs/src/codegen/warden/async/v1beta1/future.ts is excluded by !wardenjs/src/codegen/**
  • wardenjs/src/codegen/warden/async/v1beta1/genesis.ts is excluded by !wardenjs/src/codegen/**
  • wardenjs/src/codegen/warden/async/v1beta1/params.ts is excluded by !wardenjs/src/codegen/**
  • wardenjs/src/codegen/warden/async/v1beta1/query.lcd.ts is excluded by !wardenjs/src/codegen/**
  • wardenjs/src/codegen/warden/async/v1beta1/query.rpc.Query.ts is excluded by !wardenjs/src/codegen/**
  • wardenjs/src/codegen/warden/async/v1beta1/query.ts is excluded by !wardenjs/src/codegen/**
  • wardenjs/src/codegen/warden/async/v1beta1/tx.amino.ts is excluded by !wardenjs/src/codegen/**
  • wardenjs/src/codegen/warden/async/v1beta1/tx.registry.ts is excluded by !wardenjs/src/codegen/**
  • wardenjs/src/codegen/warden/async/v1beta1/tx.rpc.msg.ts is excluded by !wardenjs/src/codegen/**
  • wardenjs/src/codegen/warden/async/v1beta1/tx.ts is excluded by !wardenjs/src/codegen/**
  • wardenjs/src/codegen/warden/async/v1beta1/ve.ts is excluded by !wardenjs/src/codegen/**
  • wardenjs/src/codegen/warden/bundle.ts is excluded by !wardenjs/src/codegen/**
  • wardenjs/src/codegen/warden/client.ts is excluded by !wardenjs/src/codegen/**
  • wardenjs/src/codegen/warden/lcd.ts is excluded by !wardenjs/src/codegen/**
  • wardenjs/src/codegen/warden/rpc.query.ts is excluded by !wardenjs/src/codegen/**
  • wardenjs/src/codegen/warden/rpc.tx.ts is excluded by !wardenjs/src/codegen/**
  • wardenjs/src/codegen/warden/vemanager/vemanager.ts is excluded by !wardenjs/src/codegen/**
  • wardenjs/src/codegen/warden/warden/v1beta3/query.lcd.ts is excluded by !wardenjs/src/codegen/**
  • wardenjs/src/codegen/warden/warden/v1beta3/query.ts is excluded by !wardenjs/src/codegen/**
📒 Files selected for processing (6)
  • spaceward/bin/relay.mjs (1 hunks)
  • spaceward/package.json (7 hunks)
  • spaceward/src/features/actions/util.ts (5 hunks)
  • spaceward/src/features/walletconnect/util.ts (4 hunks)
  • spaceward/src/hooks/useWeb3Wallet.ts (2 hunks)
  • wardenjs/package.json (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Analyze (go)
🔇 Additional comments (18)
wardenjs/package.json (1)

60-60: Dependency updates look good.

Updating rimraf to v6 and the cosmjs packages to 0.32.4 should help resolve the build issues mentioned in the PR description.

Also applies to: 65-69

spaceward/bin/relay.mjs (1)

72-72:

✅ Verification successful

Removal of mplex stream muxer is appropriate.

Removing the mplex stream muxer from the Libp2p configuration is likely related to fixing the build issue. The mplex protocol has been deprecated in newer versions of libp2p in favor of yamux, which provides better performance and stability.


🏁 Script executed:

#!/bin/bash
# Check if there are any other references to mplex in the codebase
echo "Searching for any remaining references to mplex..."
rg "mplex" --type js --type ts

Length of output: 141


Verify Removal of mplex References Across File Types

The Libp2p configuration update in spaceward/bin/relay.mjs (line 72), which replaces the deprecated mplex stream muxer with yamux, appears correct based on the initial search in JS and TS files. However, the previous search did not cover .mjs files, so please run the above script to manually verify that there are no lingering references to mplex across the entire repository.

  • Verify that no mplex references remain (including in .mjs files).
  • Confirm that the updated configuration is aligned with current libp2p requirements.

🏁 Script executed:

#!/bin/bash
# Searching for any remaining references to 'mplex' across all files (including .mjs, .js, and .ts)
echo "Searching for any remaining references to 'mplex' across the entire repository..."
rg "mplex"

Length of output: 2553


Libp2p Configuration Verified – mplex Removal is Correct

The removal of the mplex stream muxer in favor of yamux in spaceward/bin/relay.mjs (line 72) is appropriate. Our comprehensive search across the repository only returned unrelated false positives from documentation files where "mplex" appears as part of words like "complex." There are no unintended references to the mplex muxer, confirming the update aligns with the latest libp2p standards.

  • File: spaceward/bin/relay.mjs (line 72) – now correctly uses streamMuxers: [yamux()].
  • No remaining functional references to mplex in the codebase.
spaceward/src/hooks/useWeb3Wallet.ts (3)

13-13: Library migration from Web3Wallet to WalletKit looks good.

The substitution of @walletconnect/web3wallet with @reown/walletkit appears to be a comprehensive change. The interface update correctly reflects the new library's type system.

Also applies to: 18-18


63-63: Initialization updated correctly for new wallet library.

The initialization method has been properly updated from Web3Wallet.init to WalletKit.init with the same configuration structure, maintaining compatibility with the rest of the codebase.


111-178:

✅ Verification successful

Verify WalletKit event compatibility.

The event handling code remains unchanged while the underlying library has changed. Ensure that WalletKit uses the same event names and provides the same event data structure as Web3Wallet.


🏁 Script executed:

#!/bin/bash
# Search for documentation or types of WalletKit events
echo "Checking imports and usages of WalletKit events..."
rg -A 3 "WalletKitTypes" --type ts

Length of output: 479


WalletKit event compatibility verified.

After checking the code in spaceward/src/hooks/useWeb3Wallet.ts and confirming that WalletKitTypes is correctly imported from @reown/walletkit, the event names used (e.g., "session_proposal", "proposal_expire", "auth_request", "session_request", "session_request_expire", and "session_delete") are consistent with the expected implementation. There’s no evidence from our search that WalletKit has modified its event names or structures compared to Web3Wallet.

No changes are required at this time. Please continue to monitor any future updates to WalletKit for potential event data structure changes.

spaceward/src/features/actions/util.ts (3)

13-13: Import changed correctly to use new wallet library.

The import has been properly updated from the Web3Wallet library to the WalletKit library.


198-198: Type definitions consistently updated across all methods.

The wallet parameter type has been correctly updated from IWeb3Wallet | null to IWalletKit | null across all three handler functions, ensuring type consistency throughout the file.

Also applies to: 264-264, 345-345


349-357: Minor formatting improvements look good.

The code formatting changes improve readability without affecting functionality.

spaceward/src/features/walletconnect/util.ts (4)

3-3: Interface transition from IWeb3Wallet to IWalletKit

This import change corresponds to the replacement of @walletconnect/web3wallet with @reown/walletkit in package.json, which is part of the dependency update to fix build issues.


87-87: Function signature updated to use IWalletKit

The function signature has been updated to use the new interface type while maintaining the same functionality. Make sure that the rejectSession method exists with compatible parameters in the new interface.


99-101: Function signature updated to use IWalletKit

The approveSession function now uses IWalletKit instead of IWeb3Wallet, aligning with the interface change throughout the codebase. Functionality remains the same.


256-258: Parameter type updated to IWalletKit

The optional parameter type for w has been updated to IWalletKit | null to align with the interface transition while maintaining the same functionality and null checks.

spaceward/package.json (6)

20-30: Cosmos-related packages updated

All Cosmos-related packages have been updated to newer versions, and a new dependency @cosmos-kit/galaxy-station has been added. These updates should improve compatibility and fix build issues.


76-81: Wallet interface package replacement

The @walletconnect/web3wallet package has been replaced with @reown/walletkit, which corresponds to the interface changes in the code from IWeb3Wallet to IWalletKit. The Wagmi packages have also been updated.


95-95: cosmos-kit updated to a specific version

The cosmos-kit package has been updated to version 2.23.9. This is a significant version change that should be compatible with the other Cosmos-related package updates.


45-50:

❓ Verification inconclusive

Libp2p packages updated to newer versions

The libp2p packages have been updated to newer major versions. These significant version jumps might introduce breaking changes - ensure they've been properly tested.


🏁 Script executed:

#!/bin/bash
# Check for breaking changes in libp2p packages by looking at their changelogs
echo "Checking for breaking changes in libp2p packages..."
curl -s https://api.github.com/repos/libp2p/js-libp2p/releases | grep -A 3 "BREAKING CHANGES" | head -n 10

Length of output: 221


Libp2p Packages Update – Verify for Breaking Changes

The libp2p packages in spaceward/package.json have been updated to newer major versions:

  • An automated check of the changelogs (using GitHub releases data) did not return any explicit "BREAKING CHANGES" indicators.
  • Despite the absence of flagged breaking changes in the initial scan, major version updates can still hide subtle API or behavioral changes.
  • It is recommended to conduct a thorough manual review of the full release notes and perform comprehensive testing to ensure no unintentional regressions occur.

106-106:

❓ Verification inconclusive

match-sorter updated to v8.0.0

The match-sorter package has been updated from ^6.3.1 to ^8.0.0, which is a major version update that might include breaking changes.


🌐 Web query:

What are the breaking changes in match-sorter 8.0.0?

💡 Result:

The breaking changes in match-sorter 8.0.0 primarily revolve around versioning and TypeScript compatibility:

  1. Semantic Versioning Correction
    Version 8.0.0 was released to properly enforce semantic versioning after prior releases introduced breaking changes that weren't correctly versioned. This deprecates versions like 6.4.0[10][15].

  2. TypeScript Interface Updates
    The library now uses stricter TypeScript definitions, including:

    • New KeyAttributesOptions and MatchSorterOptions interfaces[4]
    • A KeyOption type alias combining multiple key configuration formats (string | ValueGetterKey | object)[4]
    • Explicit generics for type safety in the matchSorter function[4]
  3. Ranking Threshold Behavior
    While not explicitly stated in the changelog, examples suggest stricter handling of ranking thresholds (e.g., using minRanking now requires explicit configuration for key-specific ranking constraints)[1][5].

For most users, upgrading should primarily require attention to TypeScript type definitions if previously using loose configurations. The core matching algorithm remains consistent with previous versions[10][15].

Citations:


Verify TypeScript and Ranking Behavior for match-sorter v8.0.0

The dependency "match-sorter": "^8.0.0" in spaceward/package.json has been upgraded from ^6.3.1 to ^8.0.0. This major version bump introduces breaking changes, which include:

  • Semantic Versioning Enforcement: The version update now properly reflects breaking API changes.
  • Updated TypeScript Definitions: New interfaces such as KeyAttributesOptions and MatchSorterOptions and explicit generic usage have been introduced, which may require updates to our TypeScript configurations.
  • Modified Ranking Threshold Behavior: Stricter handling of ranking thresholds might require explicit configuration changes if our usage depends on previous defaults.

Please review any usage of match-sorter in our codebase to ensure they align with these changes.


149-155:

❓ Verification inconclusive

ESLint and related plugins updated

The TypeScript ESLint plugins and ESLint itself have been updated to significantly newer versions. Version 9 of ESLint is relatively recent and may require configuration changes.


🌐 Web query:

What are the major changes in ESLint 9?

💡 Result:

ESLint 9 introduces significant updates aimed at modernizing JavaScript/TypeScript development workflows, improving performance, and simplifying configurations. Here are the key changes:

Configuration Overhaul

  • Flat Config as Default: ESLint 9 replaces .eslintrc files with a single eslint.config.js (or .mjs/.cjs) configuration format[1][5][7]. This simplifies setup by:
    • Using explicit JavaScript imports instead of magic extends/plugins strings
    • Combining rules, plugins, and parsers in a flat array structure[7]
    • Providing better performance through reduced file lookups[5]
Legacy Config Flat Config
.eslintrc.* files Single eslint.config.js
Implicit plugin resolution Explicit plugin imports
Complex hierarchical merging Clear array-based composition
  • Migration Tool: A migrator helps convert legacy configs[5], though manual adjustments are often needed for TypeScript/plugin setups[5].

Performance Improvements

  • 20-30% faster linting in large projects via:
    • Parallel processing optimizations[2]
    • Smarter file caching (skips unchanged files)[2][5]
    • Optimized TypeScript analysis[2]
    • Reduced config lookup overhead[4][9]

Rule and Formatter Changes

  • New Rules:
    • no-useless-assignment: Flags unused variable assignments[6][8]
    • Enhanced no-implicit-coercion: Detects patterns like -(-foo)[8]
  • Deprecated/Removed:
    • require-jsdoc/valid-jsdoc (use eslint-plugin-jsdoc instead)[6][8]
    • 7 legacy formatters (checkstyle, junit, etc.)[6][10]
  • Updated Defaults:
    • Stricter eslint:recommended ruleset[6][8]
    • no-unused-vars now checks caught errors by default[8]

Modern JavaScript Support

  • ECMAScript 2025 Features:
    • Import Attributes: import json from "file.json" with { type: "json" }[4][9]
    • RegExp Modifiers: /(?i:[a-z])/[4]
  • Enhanced TypeScript Handling:
    • Better decorator parsing[2]
    • Reduced false positives in Angular projects[2]

Breaking Changes

  • Node.js v18.18+ Required: Drops support for older Node versions[5][8]
  • Plugin Compatibility: Some plugins like eslint-plugin-sonarjs required updates for v9 APIs[3][13]
  • Configuration Comments:
    • Multiple comments for same rule now trigger errors[6][8]
    • Severity-only comments preserve existing rule options[8][10]

Developer Experience

  • Custom Rules: Simplified creation/extension for project-specific standards[2]
  • Performance Stats: --stats flag exposes rule timing data[6][10]
  • Improved Defaults: Modern JS syntax enabled by default[1][5]
// Example Flat Config for TypeScript
import tsParser from '@typescript-eslint/parser';
import eslintJs from '@eslint/js';

export default [
  eslintJs.configs.recommended,
  {
    files: ['**/*.ts'],
    languageOptions: {
      parser: tsParser,
      parserOptions: {
        project: './tsconfig.json'
      }
    },
    rules: {
      '@typescript-eslint/no-explicit-any': 'error'
    }
  }
];

Migration Tip: Use ESLINT_USE_FLAT_CONFIG=false temporarily while transitioning[7], but plan full migration as eslintrc support will be removed in future versions[8]. Always verify plugin compatibility and test configurations thoroughly[2][5].

Citations:


ESLint 9 Update – Verify and Migrate Your Configuration

The dependency updates in spaceward/package.json now include ESLint v9.22.0 and corresponding TypeScript ESLint plugins. ESLint 9 introduces several breaking changes compared to previous versions, most notably a switch to a flat configuration format (using eslint.config.js instead of legacy .eslintrc files), performance improvements, and alterations in rule behaviors.

Action Items:

  • Configuration Migration:
    Ensure your ESLint configuration has been reviewed for compatibility with the new flat config approach. If you’re using legacy .eslintrc files, consider migrating (or temporarily setting ESLINT_USE_FLAT_CONFIG=false during the transition).

  • Plugin Compatibility:
    Verify that other ESLint-related plugins (e.g., eslint-plugin-react-hooks and eslint-plugin-react-refresh) work seamlessly with ESLint 9.

  • Documentation Review:
    Consult the ESLint migration guide to address any additional configuration changes that might be necessary, especially regarding rule updates and performance optimizations introduced in ESLint 9.

Snippet (Unchanged):

		"@typescript-eslint/eslint-plugin": "^8.26.1",
		"@typescript-eslint/parser": "^8.26.1",
		"@vitejs/plugin-react-swc": "^3.5.0",
		"autoprefixer": "^10.4.16",
		"eslint": "^9.22.0",
		"eslint-plugin-react-hooks": "^5.2.0",
		"eslint-plugin-react-refresh": "^0.4.19",

Please verify these changes in your project’s build and development workflow to ensure a smooth transition.

@jjheywood jjheywood linked an issue Mar 17, 2025 that may be closed by this pull request
Copy link
Contributor

@Pitasi Pitasi left a comment

Choose a reason for hiding this comment

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

LGTM!

@jjheywood jjheywood merged commit f1d87fc into main Mar 17, 2025
14 checks passed
@jjheywood jjheywood deleted the build-fix branch March 17, 2025 15:27
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.

SpaceWard build failing
2 participants