Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: ts-client dependency updates. Update vue/react templates #3726

Merged
merged 13 commits into from
Nov 8, 2023
Merged
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
- [#3661](https://github.com/ignite/cli/pull/3661) Change `pkg/cosmosanalysis` to find Cosmos SDK runtime app registered modules
- [#3716](https://github.com/ignite/cli/pull/3716) Fix invalid plugin hook check
- [#3725](https://github.com/ignite/cli/pull/3725) Fix flaky TS client generation issues on linux
- [#3726](https://github.com/ignite/cli/pull/3726) Update TS client dependencies. Bump vue/react template versions
- [#3729](https://github.com/ignite/cli/pull/3729) Fix broken generator due to caching /tmp include folders

## [`v0.27.0`](https://github.com/ignite/cli/releases/tag/v0.27.0)
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ require (
github.com/iancoleman/strcase v0.2.0
github.com/ignite/ignite-files/nodetime v0.0.2
github.com/ignite/ignite-files/protoc v0.0.1
github.com/ignite/web v0.4.3
github.com/ignite/web v0.5.1
github.com/imdario/mergo v0.3.15
github.com/jpillora/chisel v1.8.1
github.com/lib/pq v1.10.9
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -769,8 +769,8 @@ github.com/ignite/ignite-files/nodetime v0.0.2 h1:9Aj0OEa7FWI22J/Zdq7M2JvsjgFLng
github.com/ignite/ignite-files/nodetime v0.0.2/go.mod h1:GKDsXdeazHyhSBPdVLp7mNIo/m9LmZ6/h8RmQ0/CoaM=
github.com/ignite/ignite-files/protoc v0.0.1 h1:wXxU1dzruUgSVl1diAuAOA+xv0NQKXJFsDWht2+tAP8=
github.com/ignite/ignite-files/protoc v0.0.1/go.mod h1:cVCHJbEHPIeKHMPk3ZoPS0Xw4XQfUc76BAMAPU9Fwjg=
github.com/ignite/web v0.4.3 h1:LHucUEXttzCf5JmxO5/xLKVx1Qz1o124HqF4Nii5uWQ=
github.com/ignite/web v0.4.3/go.mod h1:WZWBaBYF8RazN7dE462BLpvXDY8ScacxcJ07BKwX/jY=
github.com/ignite/web v0.5.1 h1:xGOt8wJG7WIrNO30e8Zbm669VFyo6sje/vWnusLPp6k=
github.com/ignite/web v0.5.1/go.mod h1:WZWBaBYF8RazN7dE462BLpvXDY8ScacxcJ07BKwX/jY=
github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg=
github.com/imdario/mergo v0.3.15 h1:M8XP7IuFNsqUx6VPK2P9OSmsYsI/YFaGil0uD21V3dM=
Expand Down
5 changes: 2 additions & 3 deletions ignite/pkg/cosmosgen/templates/module/module.ts.tpl
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Generated by Ignite ignite.com/cli

import { StdFee } from "@cosmjs/launchpad";
import { SigningStargateClient, DeliverTxResponse } from "@cosmjs/stargate";
import { SigningStargateClient, DeliverTxResponse, StdFee } from "@cosmjs/stargate";
import { EncodeObject, GeneratedType, OfflineSigner, Registry } from "@cosmjs/proto-signing";
import { msgTypes } from './registry';
import { IgniteClient } from "../client"
Expand Down Expand Up @@ -60,7 +59,7 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
}
try {
const { address } = (await signer.getAccounts())[0];
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry});
let msg = this.{{ camelCase .Name }}({ value: {{ .Name }}.fromPartial(value) })
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
} catch (e: any) {
Expand Down
5 changes: 2 additions & 3 deletions ignite/pkg/cosmosgen/templates/root/client.ts.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ import {
EncodeObject,
Registry,
} from "@cosmjs/proto-signing";
import { StdFee } from "@cosmjs/launchpad";
import { SigningStargateClient } from "@cosmjs/stargate";
import { SigningStargateClient, StdFee } from "@cosmjs/stargate";
import { Env } from "./env";
import { UnionToIntersection, Return, Constructor } from "./helpers";
import { Module } from "./modules";
Expand Down Expand Up @@ -42,7 +41,7 @@ export class IgniteClient extends EventEmitter {
async signAndBroadcast(msgs: EncodeObject[], fee: StdFee, memo: string) {
if (this.signer) {
const { address } = (await this.signer.getAccounts())[0];
const signingClient = await SigningStargateClient.connectWithSigner(this.env.rpcURL, this.signer, { registry: new Registry(this.registry), prefix: this.env.prefix });
const signingClient = await SigningStargateClient.connectWithSigner(this.env.rpcURL, this.signer, { registry: new Registry(this.registry) });
return await signingClient.signAndBroadcast(address, msgs, fee ? fee : defaultFee, memo)
} else {
throw new Error(" Signer is not present.");
Expand Down
18 changes: 10 additions & 8 deletions ignite/pkg/cosmosgen/templates/root/package.json.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,25 @@
"url": "http://www.apache.org/licenses/LICENSE-2.0"
}
],
"main": "index.ts",
"main": "lib/index.js",
"publishConfig": {
"access": "public"
},
"dependencies": {
"@cosmjs/launchpad": "0.27.0",
"@cosmjs/proto-signing": "0.27.0",
"@cosmjs/stargate": "0.27.0",
"scripts": {
"build": "NODE_OPTIONS='--max-old-space-size=16384' tsc",
jeronimoalbi marked this conversation as resolved.
Show resolved Hide resolved
"postinstall": "npm run build"
},
"dependencies": {
"@cosmjs/proto-signing": "0.31.1",
"@cosmjs/stargate": "0.31.1",
"@keplr-wallet/types": "^0.11.3",
Copy link
Contributor

@lxgr-linux lxgr-linux Nov 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keplr types should maybe also be bumped to 0.12.40.

"axios": "0.21.4",
"buffer": "^6.0.3",
"events": "^3.3.0"
},
"peerDependencies": {
"@cosmjs/launchpad": "0.27.0",
"@cosmjs/proto-signing": "0.27.0",
"@cosmjs/stargate": "0.27.0"
"@cosmjs/proto-signing": "0.31.1",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious, does it fixes #3686 ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep...

Copy link
Member

@julienrbrt julienrbrt Nov 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was trying to bump it here (https://github.com/ignite/web ) but everything was breaking 😅

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need to document the integrations tbh

"@cosmjs/stargate": "0.31.1"
},
"devDependencies": {
"@types/events": "^3.0.0",
Expand Down
1 change: 1 addition & 0 deletions ignite/pkg/cosmosgen/templates/root/tsconfig.json.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"module": "ES2020",
"moduleResolution": "node",
"outDir": "./lib",
"declaration": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": false,
"strict": false,
Expand Down
Loading