-
Notifications
You must be signed in to change notification settings - Fork 10
Apply-pnpm-1.16 #169
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
Open
Zetazzz
wants to merge
29
commits into
main
Choose a base branch
from
apply-pnpm-1.16
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Apply-pnpm-1.16 #169
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Add 'types: ["node"]' to root tsconfig.json compilerOptions - This prevents TypeScript from automatically including all @types/* packages - Resolves 'Cannot find type definition file for minimatch' error in CI - The error occurs because @types/minimatch is deprecated and minimatch provides its own types
- Add apply-pnpm-1.16 to push branches in e2e-tests.yaml - This allows us to test the TypeScript fix in CI environment - Will revert this change after confirming the fix works
- Add 'Build InterchainJS Package' step before running tests - Ensures the interchainjs package is properly built and available - This should resolve module resolution errors for imports like: 'interchainjs/cosmos/bank/v1beta1/query.rpc.func' 'interchainjs/cosmos/bank/v1beta1/tx.rpc.func'
1. Add Jest types to packages/types tsconfig.json to resolve test failures 2. Remove restrictive 'types' array from root tsconfig.json to allow proper module resolution 3. Add package verification step to workflow to debug linking issues 4. This should resolve: - TS2593 errors for Jest globals (describe, test, expect) - TS2307 module resolution errors for @interchainjs packages
- Add 'types: ["node", "jest"]' to packages/math/tsconfig.json - Add 'types: ["node", "jest"]' to packages/utils/tsconfig.json - This ensures Jest globals (describe, test, expect) are available during compilation - Prevents TS2593 errors for packages with test files
1. Fix import paths in networks/ethereum/starship/__tests__/utils.test.ts: - Change from '@interchainjs/ethereum/utils/address' to '@interchainjs/ethereum' - Change from '@interchainjs/ethereum/utils/encoding' to '@interchainjs/ethereum' - These functions are exported from the main package index 2. Add Jest types to all package tsconfig.json files: - networks/ethereum/tsconfig.json - networks/cosmos/tsconfig.json - libs/interchainjs/tsconfig.json - This resolves minimatch TS2688 errors and Jest type issues These changes should resolve the E2E test failures in CI.
The utils test is failing because '@interchainjs/ethereum' package cannot be found. Adding an explicit build step for the ethereum package before running tests to ensure it's properly built and available for import.
…olution in ts-jest
1. Fix TypeScript configurations: - Add 'types': ['node', 'jest'] to networks/solana/tsconfig.json - Add 'types': ['node', 'jest'] to networks/injective/tsconfig.json - Remove deprecated @types/minimatch from root package.json 2. Update E2E workflow: - Add explicit build steps for all network packages (cosmos, solana, injective) - Add verification checks for all built packages 3. Fix test import paths in networks/cosmos: - Change '@interchainjs/cosmos' imports to '../../src' in all test files - Change '@interchainjs/cosmos/wallets/secp256k1hd' to '../../src/wallets/secp256k1hd' - Updated files: token.test.ts, query-client.test.ts, authz.test.ts, staking.test.ts, get-signer.test.ts, gov.test.ts, signer-methods.test.ts, broadcast.test.ts These changes apply the same patterns that resolved ethereum E2E test failures to ensure all E2E test jobs pass successfully.
1. Fix circular dependency in cosmos tests: - Add Jest moduleNameMapper in networks/cosmos/jest.starship.config.js - Map '@interchainjs/cosmos' to '<rootDir>/src/index.ts' to resolve circular dependency - This fixes the issue where libs/cosmos-types imports @interchainjs/cosmos 2. Add Jest types to all remaining packages to fix TS2688 minimatch errors: - packages/encoding/tsconfig.json - packages/crypto/tsconfig.json - libs/cosmos-types/tsconfig.json - packages/amino/tsconfig.json - packages/auth/tsconfig.json - packages/pubkey/tsconfig.json These changes should resolve the cosmos E2E test failures and build errors.
Add mappings for: - @interchainjs/cosmos/utils -> src/utils/index.ts - @interchainjs/cosmos/types/signing-client -> src/types/signing-client.ts This resolves the circular dependency issues where libs/cosmos-types was trying to import from @interchainjs/cosmos subpaths during Jest execution.
Correct the mapping for @interchainjs/cosmos/utils to point to src/utils.ts instead of src/utils/index.ts since the actual file structure has utils.ts at the root level.
1. Add @interchainjs/amino dependency to networks/cosmos/package.json 2. Add Jest moduleNameMapper for @interchainjs/amino to resolve imports during tests This fixes the TS2307 error: Cannot find module '@interchainjs/amino' that was causing all cosmos E2E tests to fail.
- Change getBalance(endpoint, ...) to getBalance(client, ...) in token.test.ts - The getBalance function from cosmos-types expects an RPC client, not a string endpoint - The client variable contains the properly initialized CosmosQueryClient This fixes the 'Query Rpc is not initialized' error in the direct mode token test.
- Revert to original yarn version and incrementally migrate to pnpm - Replace yarn with pnpm in all jobs (interchainjs, networks-cosmos, networks-ethereum) - Update starship action from cosmology-tech/[email protected] to hyperweb-io/[email protected] - Add pnpm setup, cache configuration, and proper dependency installation - Add apply-pnpm-1.16 branch to workflow triggers for testing This is the first step in a systematic migration to identify minimal changes needed.
- Replace external hyperweb-io/starship-action with local starship actions: - ./libs/interchainjs/starship/configs/starship-devnet-action - ./networks/cosmos/starship/configs/starship-devnet-action - ./networks/ethereum/starship/configs/starship-devnet-action - Add 'Link Workspace Packages' step with 'pnpm install' after build - This should resolve dependency resolution issues and starship yarn conflicts Testing incremental changes to identify minimal migration requirements.
- Add 'Build Network Packages' step to explicitly build each network package - Add 'Verify Package Links' step to check if packages are properly linked - This should resolve the dependency resolution issues where libs/interchainjs cannot find @interchainjs/cosmos and other network packages Following the pattern from the backup workflow that was working.
- Add --ignore-scripts flag to pnpm install commands - This prevents circular dependency issues where libs/interchainjs tries to build during install but can't find @interchainjs/cosmos - The explicit build steps will handle building packages in correct order This should resolve the TS2307 module resolution errors during install.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.