Skip to content

Commit

Permalink
Merge pull request #131 from AbstractSDK/adair/cjsUtils
Browse files Browse the repository at this point in the history
Ensure that cosmwasm-utils generates cjs
  • Loading branch information
adairrr authored Oct 25, 2024
2 parents 5b118c9 + 04cb51f commit ae96822
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 4 deletions.
6 changes: 6 additions & 0 deletions .changeset/khaki-bugs-fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@abstract-money/cosmwasm-utils": patch
"@abstract-money/core": patch
---

Ensure that cosmwasm-utils is cjs-compatible
27 changes: 24 additions & 3 deletions packages/cosmwasm-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,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"
}
},
"./client": {
"types": "./dist/client/index.d.ts",
"default": "./dist/client/index.js"
"import": {
"types": "./dist/client/index.d.ts",
"import": "./dist/client/index.js"
},
"require": {
"types": "./dist/client/index.d.cts",
"require": "./dist/client/index.cjs"
}
},
"./query": {
"types": "./dist/query/index.d.ts",
"default": "./dist/query/index.js"
"import": {
"types": "./dist/query/index.d.ts",
"import": "./dist/query/index.js"
},
"require": {
"types": "./dist/query/index.d.cts",
"require": "./dist/query/index.cjs"
}
},
"./package.json": "./package.json"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/cosmwasm-utils/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ export default defineConfig(
//dev: process.env.DEV === 'true',
entry: ['src/index.ts', 'src/client/index.ts', 'src/query/index.ts'],
external: [...Object.keys(dependencies)],
format: ['esm'],
format: ['esm', 'cjs'],
}),
)

0 comments on commit ae96822

Please sign in to comment.