From f57db8cb3805518364392e7ef85f51ca972e9e3a Mon Sep 17 00:00:00 2001 From: CallumGrindle Date: Mon, 25 Nov 2024 14:52:00 +0000 Subject: [PATCH] build: esm fixes --- src/chains/supportedChains.evm.int.spec.ts | 2 +- src/chains/supportedChains.evm.ts | 4 ++-- src/chains/supportedChains.svm.int.spec.ts | 2 +- src/chains/supportedChains.ts | 6 +++--- src/chains/supportedChains.unit.spec.ts | 12 ++++++++---- src/chains/supportedChains.utxo.int.spec.ts | 2 +- src/coins/coins.int.spec.ts | 2 +- 7 files changed, 17 insertions(+), 13 deletions(-) diff --git a/src/chains/supportedChains.evm.int.spec.ts b/src/chains/supportedChains.evm.int.spec.ts index 2b7a686..ca428c3 100644 --- a/src/chains/supportedChains.evm.int.spec.ts +++ b/src/chains/supportedChains.evm.int.spec.ts @@ -1,6 +1,6 @@ import { createPublicClient, http } from 'viem' import { describe, expect, test } from 'vitest' -import { supportedEVMChains } from './supportedChains.evm' +import { supportedEVMChains } from './supportedChains.evm.js' describe.concurrent('EVM chains RPC check', () => { const rpcUrls = supportedEVMChains.flatMap((chain) => diff --git a/src/chains/supportedChains.evm.ts b/src/chains/supportedChains.evm.ts index a2feb8a..eed89c0 100644 --- a/src/chains/supportedChains.evm.ts +++ b/src/chains/supportedChains.evm.ts @@ -1,7 +1,7 @@ import type { EVMChain } from '@lifi/types' import { ChainId, ChainKey, ChainType, CoinKey } from '@lifi/types' -import { multicallAddresses } from '../multicall' -import { prefixChainId } from './utils' +import { multicallAddresses } from '../multicall.js' +import { prefixChainId } from './utils.js' /** * ChainNames aligned with https://github.com/ethereum-lists/chains/tree/master/_data/chains diff --git a/src/chains/supportedChains.svm.int.spec.ts b/src/chains/supportedChains.svm.int.spec.ts index 6259046..ea89597 100644 --- a/src/chains/supportedChains.svm.int.spec.ts +++ b/src/chains/supportedChains.svm.int.spec.ts @@ -1,6 +1,6 @@ import { Connection, PublicKey } from '@solana/web3.js' import { describe, expect, test } from 'vitest' -import { supportedSolanaChains } from './supportedChains.svm' +import { supportedSolanaChains } from './supportedChains.svm.js' const TokenProgramAddress = 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA' const WalletAddress = '6AUWsSCRFSCbrHKH9s84wfzJXtD6mNzAHs11x6pGEcmJ' diff --git a/src/chains/supportedChains.ts b/src/chains/supportedChains.ts index 59fe859..9e30158 100644 --- a/src/chains/supportedChains.ts +++ b/src/chains/supportedChains.ts @@ -1,7 +1,7 @@ import type { Chain, ChainKey } from '@lifi/types' -import { supportedEVMChains } from './supportedChains.evm' -import { supportedSolanaChains } from './supportedChains.svm' -import { supportedUXTOChains } from './supportedChains.utxo' +import { supportedEVMChains } from './supportedChains.evm.js' +import { supportedSolanaChains } from './supportedChains.svm.js' +import { supportedUXTOChains } from './supportedChains.utxo.js' // This assignment is required to avoid breaking // changes with the new non EVM support types release diff --git a/src/chains/supportedChains.unit.spec.ts b/src/chains/supportedChains.unit.spec.ts index 851ffd2..313c757 100644 --- a/src/chains/supportedChains.unit.spec.ts +++ b/src/chains/supportedChains.unit.spec.ts @@ -4,10 +4,14 @@ import { findDefaultToken, findTokenByChainIdAndAddress, findWrappedGasOnChain, -} from '../coins' -import { getChainById, getChainByKey, supportedChains } from './supportedChains' -import { supportedEVMChains } from './supportedChains.evm' -import { prefixChainId } from './utils' +} from '../coins/index.js' +import { + getChainById, + getChainByKey, + supportedChains, +} from './supportedChains.js' +import { supportedEVMChains } from './supportedChains.evm.js' +import { prefixChainId } from './utils.js' test('getChainById', () => { expect(getChainById(ChainId.ETH)).toBeDefined() diff --git a/src/chains/supportedChains.utxo.int.spec.ts b/src/chains/supportedChains.utxo.int.spec.ts index b7d79da..a4a0e2d 100644 --- a/src/chains/supportedChains.utxo.int.spec.ts +++ b/src/chains/supportedChains.utxo.int.spec.ts @@ -1,5 +1,5 @@ import { describe, expect, test } from 'vitest' -import { supportedUXTOChains } from './supportedChains.utxo' +import { supportedUXTOChains } from './supportedChains.utxo.js' describe.concurrent('UTXO chains RPC check', () => { const rpcUrls = supportedUXTOChains.flatMap((chain) => diff --git a/src/coins/coins.int.spec.ts b/src/coins/coins.int.spec.ts index 93543f5..04e546a 100644 --- a/src/coins/coins.int.spec.ts +++ b/src/coins/coins.int.spec.ts @@ -1,6 +1,6 @@ import type { StaticToken } from '@lifi/types' import { describe, expect, test } from 'vitest' -import { defaultCoins, wrappedTokens } from './coins' +import { defaultCoins, wrappedTokens } from './coins.js' describe.concurrent('Coin logo test', { timeout: 30_000 }, () => { const allImages: string[] = []