diff --git a/packages/amino/package.json b/packages/amino/package.json index 2b44c2818e..490522065b 100644 --- a/packages/amino/package.json +++ b/packages/amino/package.json @@ -6,8 +6,10 @@ "Simon Warta " ], "license": "Apache-2.0", - "main": "build/index.js", - "types": "build/index.d.ts", + "exports": { + "types": "./build/index.d.ts", + "default": "./build/index.js" + }, "files": [ "build/", "*.md", diff --git a/packages/cosmwasm-stargate/package.json b/packages/cosmwasm-stargate/package.json index c47ccb9b40..28942397d8 100644 --- a/packages/cosmwasm-stargate/package.json +++ b/packages/cosmwasm-stargate/package.json @@ -6,8 +6,10 @@ "Will Clark " ], "license": "Apache-2.0", - "main": "build/index.js", - "types": "build/index.d.ts", + "exports": { + "types": "./build/index.d.ts", + "default": "./build/index.js" + }, "files": [ "build/", "*.md", diff --git a/packages/crypto/package.json b/packages/crypto/package.json index c96653fdcc..c989123a6a 100644 --- a/packages/crypto/package.json +++ b/packages/crypto/package.json @@ -7,8 +7,10 @@ "Simon Warta" ], "license": "Apache-2.0", - "main": "build/index.js", - "types": "build/index.d.ts", + "exports": { + "types": "./build/index.d.ts", + "default": "./build/index.js" + }, "files": [ "build/", "*.md", diff --git a/packages/encoding/package.json b/packages/encoding/package.json index 8e444f01fb..3171bc15fe 100644 --- a/packages/encoding/package.json +++ b/packages/encoding/package.json @@ -6,8 +6,10 @@ "IOV SAS " ], "license": "Apache-2.0", - "main": "build/index.js", - "types": "build/index.d.ts", + "exports": { + "types": "./build/index.d.ts", + "default": "./build/index.js" + }, "files": [ "build/", "*.md", diff --git a/packages/faucet-client/package.json b/packages/faucet-client/package.json index ee1de6e9b8..2a6e70403b 100644 --- a/packages/faucet-client/package.json +++ b/packages/faucet-client/package.json @@ -6,8 +6,10 @@ "Will Clark " ], "license": "Apache-2.0", - "main": "build/index.js", - "types": "build/index.d.ts", + "exports": { + "types": "./build/index.d.ts", + "default": "./build/index.js" + }, "files": [ "build/", "*.md", diff --git a/packages/json-rpc/package.json b/packages/json-rpc/package.json index a32f62840f..f1dbc80140 100644 --- a/packages/json-rpc/package.json +++ b/packages/json-rpc/package.json @@ -8,8 +8,10 @@ "Will Clark " ], "license": "Apache-2.0", - "main": "build/index.js", - "types": "build/index.d.ts", + "exports": { + "types": "./build/index.d.ts", + "default": "./build/index.js" + }, "files": [ "build/", "*.md", diff --git a/packages/ledger-amino/package.json b/packages/ledger-amino/package.json index f0d0782582..4ef02959a1 100644 --- a/packages/ledger-amino/package.json +++ b/packages/ledger-amino/package.json @@ -6,8 +6,10 @@ "Will Clark " ], "license": "Apache-2.0", - "main": "build/index.js", - "types": "build/index.d.ts", + "exports": { + "types": "./build/index.d.ts", + "default": "./build/index.js" + }, "files": [ "build/", "*.md", diff --git a/packages/math/package.json b/packages/math/package.json index bf703e3f02..21d5c4bbf5 100644 --- a/packages/math/package.json +++ b/packages/math/package.json @@ -6,8 +6,10 @@ "IOV SAS " ], "license": "Apache-2.0", - "main": "build/index.js", - "types": "build/index.d.ts", + "exports": { + "types": "./build/index.d.ts", + "default": "./build/index.js" + }, "files": [ "build/", "*.md", diff --git a/packages/proto-signing/package.json b/packages/proto-signing/package.json index 8c08dbe476..fa17be3eca 100644 --- a/packages/proto-signing/package.json +++ b/packages/proto-signing/package.json @@ -7,8 +7,10 @@ "Simon Warta " ], "license": "Apache-2.0", - "main": "build/index.js", - "types": "build/index.d.ts", + "exports": { + "types": "./build/index.d.ts", + "default": "./build/index.js" + }, "files": [ "build/", "*.md", diff --git a/packages/socket/package.json b/packages/socket/package.json index eaa582b5fd..ad3813195a 100644 --- a/packages/socket/package.json +++ b/packages/socket/package.json @@ -8,8 +8,10 @@ "Will Clark " ], "license": "Apache-2.0", - "main": "build/index.js", - "types": "build/index.d.ts", + "exports": { + "types": "./build/index.d.ts", + "default": "./build/index.js" + }, "files": [ "build/", "*.md", diff --git a/packages/socket/webpack.web.config.cjs b/packages/socket/webpack.web.config.cjs index 4ef48d13b1..bc1487d36d 100644 --- a/packages/socket/webpack.web.config.cjs +++ b/packages/socket/webpack.web.config.cjs @@ -12,6 +12,7 @@ module.exports = [ target: target, entry: globSync("./build/**/*.spec.js", { dotRelative: true }).sort(), output: { + asyncChunks: false, path: distdir, filename: "tests.js", }, diff --git a/packages/stargate/package.json b/packages/stargate/package.json index e6e6da19ec..c1ddfb9dd4 100644 --- a/packages/stargate/package.json +++ b/packages/stargate/package.json @@ -6,8 +6,10 @@ "Simon Warta " ], "license": "Apache-2.0", - "main": "build/index.js", - "types": "build/index.d.ts", + "exports": { + "types": "./build/index.d.ts", + "default": "./build/index.js" + }, "files": [ "build/", "*.md", diff --git a/packages/stream/package.json b/packages/stream/package.json index f4cfc60f14..59f9b3b291 100644 --- a/packages/stream/package.json +++ b/packages/stream/package.json @@ -8,8 +8,10 @@ "Will Clark " ], "license": "Apache-2.0", - "main": "build/index.js", - "types": "build/index.d.ts", + "exports": { + "types": "./build/index.d.ts", + "default": "./build/index.js" + }, "files": [ "build/", "*.md", diff --git a/packages/tendermint-rpc/package.json b/packages/tendermint-rpc/package.json index 028a8d372d..f20888644a 100644 --- a/packages/tendermint-rpc/package.json +++ b/packages/tendermint-rpc/package.json @@ -8,8 +8,10 @@ "Will Clark " ], "license": "Apache-2.0", - "main": "build/index.js", - "types": "build/index.d.ts", + "exports": { + "types": "./build/index.d.ts", + "default": "./build/index.js" + }, "files": [ "build/", "*.md", diff --git a/packages/utils/package.json b/packages/utils/package.json index 0cdcc3f36e..6cbc6e1340 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -6,8 +6,10 @@ "IOV SAS " ], "license": "Apache-2.0", - "main": "build/index.js", - "types": "build/index.d.ts", + "exports": { + "types": "./build/index.d.ts", + "default": "./build/index.js" + }, "files": [ "build/", "*.md", diff --git a/tsconfig.json b/tsconfig.json index c94d2ce2c7..6cf604ecb4 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,10 +4,9 @@ "declaration": true, "esModuleInterop": true, "forceConsistentCasingInFileNames": true, - "lib": ["es2020"], - "target": "es2020", - "module": "commonjs", - "moduleResolution": "node", + "lib": ["es2022"], + "target": "es2022", + "module": "node20", "newLine": "LF", "noEmitOnError": true, "noFallthroughCasesInSwitch": true,