Skip to content

Commit

Permalink
Merge pull request #153 from AbstractSDK/adair/abstraxion-update
Browse files Browse the repository at this point in the history
Update abstraxion actions
  • Loading branch information
adairrr authored Nov 23, 2024
2 parents 49200dc + 903df40 commit d2ad9c6
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 14 deletions.
5 changes: 5 additions & 0 deletions .changeset/hungry-phones-sell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@abstract-money/actions-xion": patch
---

Build CJS for XION actions and ensure proper imports
27 changes: 24 additions & 3 deletions packages/actions-xion/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,36 @@
"exports": {
".": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
"import": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js"
},
"require": {
"types": "./dist/index.d.cts",
"require": "./dist/index.cjs"
}
},
"./actions": {
"types": "./dist/actions/index.d.ts",
"default": "./dist/actions/index.js"
"import": {
"types": "./dist/actions/index.d.ts",
"import": "./dist/actions/index.js"
},
"require": {
"types": "./dist/actions/index.d.cts",
"require": "./dist/actions/index.cjs"
}
},
"./decorators": {
"types": "./dist/decorators/index.d.ts",
"default": "./dist/decorators/index.js"
"import": {
"types": "./dist/decorators/index.d.ts",
"import": "./dist/decorators/index.js"
},
"require": {
"types": "./dist/decorators/index.d.cts",
"require": "./dist/decorators/index.cjs"
}
},
"./package.json": "./package.json"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { getRegistryQueryClientFromApi } from '@abstract-money/core/actions'
import {
AccountQueryClient,
RegistryTypes,
} from '@abstract-money/core/codegen/abstract'
import { getRegistryQueryClientFromApi } from '@abstract-money/core/src/actions'
import { CosmWasmClient } from '@cosmjs/cosmwasm-stargate'
import { predictXionAccountIdByExternalOwner } from './predict-xion-account-id-by-external-owner'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { RegistryTypes } from '@abstract-money/core/src/codegen/abstract'
import { RegistryTypes } from '@abstract-money/core/codegen/abstract'
import { CosmWasmClient } from '@cosmjs/cosmwasm-stargate'
import { Uint64 } from '@cosmjs/math'
import { decodePubkey } from '@cosmjs/proto-signing'
Expand Down
14 changes: 7 additions & 7 deletions packages/actions-xion/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
// TODO: change to true
"noUnusedLocals": false,
"noUnusedParameters": true,
// "paths": {
// // TODO: Remove once issue is fixed
// // https://github.com/microsoft/TypeScript/issues/48212
// "@cosmjs/cosmwasm-stargate": [
// "packages/core/node_modules/@cosmjs/cosmwasm-stargate/build"
// ],
// },
"paths": {
// TODO: Remove once issue is fixed
// https://github.com/microsoft/TypeScript/issues/48212
"@cosmjs/cosmwasm-stargate": [
"packages/core/node_modules/@cosmjs/cosmwasm-stargate/build"
],
},
"resolveJsonModule": true,
"skipLibCheck": true,
"strict": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/actions-xion/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ export default defineConfig(
entry: ['src/index.ts', 'src/actions/index.ts', 'src/decorators/index.ts'],
// external: [...Object.keys(dependencies)],
external: [...Object.keys(dependencies), ...Object.keys(peerDependencies)],
format: ['esm'],
format: ['esm', 'cjs'],
}),
)
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { AccountId, AccountWalletClient } from '@abstract-money/core'
import { type AccountTypes } from '@abstract-money/core/src/codegen/abstract'
import { type AccountTypes } from '@abstract-money/core/codegen/abstract'
import { useMutation } from '@tanstack/react-query'
import { useConfig } from '../../../contexts'
import { ExtractArgsFromParameters } from '../../../types/args'
Expand Down

0 comments on commit d2ad9c6

Please sign in to comment.