Skip to content

Commit c4b7a52

Browse files
authored
Merge pull request #109 from cosmos/exports-field-simon
Set exports field
2 parents 6c26386 + 9081859 commit c4b7a52

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ and this project adheres to
99
## [Unreleased]
1010

1111
- Migrate from @cosmology/telescope to @hyperweb/telescope.
12+
- Set `exports` field in `package.json`. This disallows importing paths with are
13+
not explicitly exported. In case you used the import style with file
14+
extension, you need to convert to the extension-less style:
15+
16+
```diff
17+
-import { TxRaw } from "cosmjs-types/cosmos/tx/v1beta1/tx.js"
18+
+import { TxRaw } from "cosmjs-types/cosmos/tx/v1beta1/tx"
19+
```
1220

1321
## [0.10.1] - 2025-07-29
1422

package.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@
1515
"publishConfig": {
1616
"access": "public"
1717
},
18+
"exports": {
19+
".": {
20+
"types": "./index.d.ts"
21+
},
22+
"./*": {
23+
"types": "./*.d.ts",
24+
"default": "./*.js"
25+
}
26+
},
1827
"files": [
1928
"cosmos/",
2029
"cosmos_proto/",
@@ -40,8 +49,7 @@
4049
"prepare-publishing": "./scripts/prepare-publishing.sh",
4150
"build": "rm -rf ./build && tsc && npm run prepare-publishing"
4251
},
43-
"dependencies": {
44-
},
52+
"dependencies": {},
4553
"devDependencies": {
4654
"@hyperweb/telescope": "^1.17.4",
4755
"@types/node": "^15.6.2",

0 commit comments

Comments
 (0)