From b12d2e317142919830b3f30f1094784dac5f068a Mon Sep 17 00:00:00 2001 From: Doug Richar Date: Thu, 9 Jan 2025 10:01:31 -0500 Subject: [PATCH] fix(deps): update Defly Connect and Pera Connect to latest versions Update `@blockshake/defly-connect` from 1.2.0 to 1.2.1 and `@perawallet/connect` from 1.4.0 to 1.4.1 across all packages and examples to support ESM imports --- examples/nextjs/package.json | 4 +- examples/nuxt/package.json | 4 +- examples/react-ts/package.json | 4 +- examples/solid-ts/package.json | 4 +- examples/vanilla-ts/package.json | 4 +- examples/vue-ts/package.json | 4 +- packages/use-wallet-react/package.json | 4 +- packages/use-wallet-solid/package.json | 4 +- packages/use-wallet-vue/package.json | 4 +- packages/use-wallet/package.json | 8 +- .../src/__tests__/wallets/defly.test.ts | 9 +- .../src/__tests__/wallets/pera.test.ts | 9 +- packages/use-wallet/src/wallets/defly.ts | 6 +- packages/use-wallet/src/wallets/pera.ts | 6 +- pnpm-lock.yaml | 92 +++++++++---------- 15 files changed, 74 insertions(+), 92 deletions(-) diff --git a/examples/nextjs/package.json b/examples/nextjs/package.json index 1ea4becf..3f82fd68 100644 --- a/examples/nextjs/package.json +++ b/examples/nextjs/package.json @@ -8,8 +8,8 @@ "typecheck": "tsc --noEmit" }, "dependencies": { - "@blockshake/defly-connect": "^1.2.0", - "@perawallet/connect": "^1.4.0", + "@blockshake/defly-connect": "^1.2.1", + "@perawallet/connect": "^1.4.1", "@txnlab/use-wallet-react": "workspace:*", "@walletconnect/modal": "^2.7.0", "@walletconnect/sign-client": "^2.17.2", diff --git a/examples/nuxt/package.json b/examples/nuxt/package.json index 89a870f2..caa3df16 100644 --- a/examples/nuxt/package.json +++ b/examples/nuxt/package.json @@ -12,8 +12,8 @@ }, "dependencies": { "@algorandfoundation/liquid-auth-use-wallet-client": "1.1.0", - "@blockshake/defly-connect": "^1.2.0", - "@perawallet/connect": "^1.4.0", + "@blockshake/defly-connect": "^1.2.1", + "@perawallet/connect": "^1.4.1", "@txnlab/use-wallet": "workspace:*", "@txnlab/use-wallet-vue": "workspace:*", "@walletconnect/modal": "^2.7.0", diff --git a/examples/react-ts/package.json b/examples/react-ts/package.json index 6c437765..cbf786a1 100644 --- a/examples/react-ts/package.json +++ b/examples/react-ts/package.json @@ -10,8 +10,8 @@ }, "dependencies": { "@algorandfoundation/liquid-auth-use-wallet-client": "1.1.0", - "@blockshake/defly-connect": "^1.2.0", - "@perawallet/connect": "^1.4.0", + "@blockshake/defly-connect": "^1.2.1", + "@perawallet/connect": "^1.4.1", "@txnlab/use-wallet-react": "workspace:*", "@walletconnect/modal": "^2.7.0", "@walletconnect/sign-client": "^2.17.2", diff --git a/examples/solid-ts/package.json b/examples/solid-ts/package.json index 4a936ee9..d2c10cc5 100644 --- a/examples/solid-ts/package.json +++ b/examples/solid-ts/package.json @@ -11,8 +11,8 @@ }, "dependencies": { "@algorandfoundation/liquid-auth-use-wallet-client": "1.1.0", - "@blockshake/defly-connect": "^1.2.0", - "@perawallet/connect": "^1.4.0", + "@blockshake/defly-connect": "^1.2.1", + "@perawallet/connect": "^1.4.1", "@txnlab/use-wallet-solid": "workspace:*", "@walletconnect/modal": "^2.7.0", "@walletconnect/sign-client": "^2.17.2", diff --git a/examples/vanilla-ts/package.json b/examples/vanilla-ts/package.json index 2e56bec3..04d36956 100644 --- a/examples/vanilla-ts/package.json +++ b/examples/vanilla-ts/package.json @@ -15,8 +15,8 @@ }, "dependencies": { "@algorandfoundation/liquid-auth-use-wallet-client": "1.1.0", - "@blockshake/defly-connect": "^1.2.0", - "@perawallet/connect": "^1.4.0", + "@blockshake/defly-connect": "^1.2.1", + "@perawallet/connect": "^1.4.1", "@txnlab/use-wallet": "workspace:*", "@walletconnect/modal": "^2.7.0", "@walletconnect/sign-client": "^2.17.2", diff --git a/examples/vue-ts/package.json b/examples/vue-ts/package.json index e2c825c5..1e12f9d6 100644 --- a/examples/vue-ts/package.json +++ b/examples/vue-ts/package.json @@ -10,8 +10,8 @@ }, "dependencies": { "@algorandfoundation/liquid-auth-use-wallet-client": "1.1.0", - "@blockshake/defly-connect": "^1.2.0", - "@perawallet/connect": "^1.4.0", + "@blockshake/defly-connect": "^1.2.1", + "@perawallet/connect": "^1.4.1", "@txnlab/use-wallet-vue": "workspace:*", "@walletconnect/modal": "^2.7.0", "@walletconnect/sign-client": "^2.17.2", diff --git a/packages/use-wallet-react/package.json b/packages/use-wallet-react/package.json index 48e6309c..05bf2592 100644 --- a/packages/use-wallet-react/package.json +++ b/packages/use-wallet-react/package.json @@ -51,10 +51,10 @@ "typescript": "5.6.3" }, "peerDependencies": { - "@blockshake/defly-connect": "^1.2.0", + "@blockshake/defly-connect": "^1.2.1", "@magic-ext/algorand": "^23.18.0", "@walletconnect/modal": "^2.7.0", - "@perawallet/connect": "^1.4.0", + "@perawallet/connect": "^1.4.1", "@walletconnect/sign-client": "^2.17.2", "algosdk": "^3.0.0", "lute-connect": "^1.4.1", diff --git a/packages/use-wallet-solid/package.json b/packages/use-wallet-solid/package.json index dd31189e..e77735d0 100644 --- a/packages/use-wallet-solid/package.json +++ b/packages/use-wallet-solid/package.json @@ -73,9 +73,9 @@ "typescript": "5.6.3" }, "peerDependencies": { - "@blockshake/defly-connect": "^1.2.0", + "@blockshake/defly-connect": "^1.2.1", "@magic-ext/algorand": "^23.18.0", - "@perawallet/connect": "^1.4.0", + "@perawallet/connect": "^1.4.1", "@walletconnect/modal": "^2.7.0", "@walletconnect/sign-client": "^2.17.2", "algosdk": "^3.0.0", diff --git a/packages/use-wallet-vue/package.json b/packages/use-wallet-vue/package.json index dba9a365..b3992414 100644 --- a/packages/use-wallet-vue/package.json +++ b/packages/use-wallet-vue/package.json @@ -48,9 +48,9 @@ "vue": "3.5.13" }, "peerDependencies": { - "@blockshake/defly-connect": "^1.2.0", + "@blockshake/defly-connect": "^1.2.1", "@magic-ext/algorand": "^23.18.0", - "@perawallet/connect": "^1.4.0", + "@perawallet/connect": "^1.4.1", "@walletconnect/modal": "^2.7.0", "@walletconnect/sign-client": "^2.17.2", "algosdk": "^3.0.0", diff --git a/packages/use-wallet/package.json b/packages/use-wallet/package.json index 02c95fc9..07bb0077 100644 --- a/packages/use-wallet/package.json +++ b/packages/use-wallet/package.json @@ -42,10 +42,10 @@ "devDependencies": { "@agoralabs-sh/avm-web-provider": "1.7.0", "@algorandfoundation/liquid-auth-use-wallet-client": "1.1.0", - "@blockshake/defly-connect": "1.2.0", + "@blockshake/defly-connect": "1.2.1", "@magic-ext/algorand": "23.18.0", "@magic-sdk/provider": "28.18.0", - "@perawallet/connect": "1.4.0", + "@perawallet/connect": "1.4.1", "@types/node": "20.11.30", "@walletconnect/modal": "2.7.0", "@walletconnect/modal-core": "2.7.0", @@ -60,8 +60,8 @@ "peerDependencies": { "@agoralabs-sh/avm-web-provider": "^1.7.0", "@algorandfoundation/liquid-auth-use-wallet-client": "1.1.0", - "@blockshake/defly-connect": "^1.1.6", - "@perawallet/connect": "^1.4.0", + "@blockshake/defly-connect": "^1.2.1", + "@perawallet/connect": "^1.4.1", "@walletconnect/modal": "^2.7.0", "@walletconnect/sign-client": "^2.17.2", "algosdk": "^3.0.0", diff --git a/packages/use-wallet/src/__tests__/wallets/defly.test.ts b/packages/use-wallet/src/__tests__/wallets/defly.test.ts index 70109c04..7a191bca 100644 --- a/packages/use-wallet/src/__tests__/wallets/defly.test.ts +++ b/packages/use-wallet/src/__tests__/wallets/defly.test.ts @@ -40,14 +40,9 @@ const mockDeflyWallet = { } } -vi.mock('@blockshake/defly-connect', async (importOriginal) => { - const module = await importOriginal() +vi.mock('@blockshake/defly-connect', async () => { return { - ...module, - default: { - ...module, - DeflyWalletConnect: vi.fn(() => mockDeflyWallet) - } + DeflyWalletConnect: vi.fn(() => mockDeflyWallet) } }) diff --git a/packages/use-wallet/src/__tests__/wallets/pera.test.ts b/packages/use-wallet/src/__tests__/wallets/pera.test.ts index e6e1d6cf..77be270b 100644 --- a/packages/use-wallet/src/__tests__/wallets/pera.test.ts +++ b/packages/use-wallet/src/__tests__/wallets/pera.test.ts @@ -40,14 +40,9 @@ const mockPeraWallet = { } } -vi.mock('@perawallet/connect', async (importOriginal) => { - const module = await importOriginal() +vi.mock('@perawallet/connect', async () => { return { - ...module, - default: { - ...module, - PeraWalletConnect: vi.fn(() => mockPeraWallet) - } + PeraWalletConnect: vi.fn(() => mockPeraWallet) } }) diff --git a/packages/use-wallet/src/wallets/defly.ts b/packages/use-wallet/src/wallets/defly.ts index 1e844405..22a39374 100644 --- a/packages/use-wallet/src/wallets/defly.ts +++ b/packages/use-wallet/src/wallets/defly.ts @@ -48,11 +48,7 @@ export class DeflyWallet extends BaseWallet { private async initializeClient(): Promise { this.logger.info('Initializing client...') - const module = await import('@blockshake/defly-connect') - const DeflyWalletConnect = module.default - ? module.default.DeflyWalletConnect - : module.DeflyWalletConnect - + const { DeflyWalletConnect } = await import('@blockshake/defly-connect') const client = new DeflyWalletConnect(this.options) this.client = client this.logger.info('Client initialized') diff --git a/packages/use-wallet/src/wallets/pera.ts b/packages/use-wallet/src/wallets/pera.ts index b1322896..c5c49700 100644 --- a/packages/use-wallet/src/wallets/pera.ts +++ b/packages/use-wallet/src/wallets/pera.ts @@ -53,11 +53,7 @@ export class PeraWallet extends BaseWallet { private async initializeClient(): Promise { this.logger.info('Initializing client...') - const module = await import('@perawallet/connect') - const PeraWalletConnect = module.default - ? module.default.PeraWalletConnect - : module.PeraWalletConnect - + const { PeraWalletConnect } = await import('@perawallet/connect') const client = new PeraWalletConnect(this.options) this.client = client this.logger.info('Client initialized') diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 71185844..24e3987d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -60,11 +60,11 @@ importers: examples/nextjs: dependencies: '@blockshake/defly-connect': - specifier: ^1.2.0 - version: 1.2.0(algosdk@3.0.0)(bufferutil@4.0.8)(utf-8-validate@5.0.10) + specifier: ^1.2.1 + version: 1.2.1(algosdk@3.0.0)(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@perawallet/connect': - specifier: ^1.4.0 - version: 1.4.0(algosdk@3.0.0)(bufferutil@4.0.8)(utf-8-validate@5.0.10) + specifier: ^1.4.1 + version: 1.4.1(algosdk@3.0.0)(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@txnlab/use-wallet-react': specifier: workspace:* version: link:../../packages/use-wallet-react @@ -115,11 +115,11 @@ importers: specifier: 1.1.0 version: 1.1.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@blockshake/defly-connect': - specifier: ^1.2.0 - version: 1.2.0(algosdk@3.0.0)(bufferutil@4.0.8)(utf-8-validate@5.0.10) + specifier: ^1.2.1 + version: 1.2.1(algosdk@3.0.0)(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@perawallet/connect': - specifier: ^1.4.0 - version: 1.4.0(algosdk@3.0.0)(bufferutil@4.0.8)(utf-8-validate@5.0.10) + specifier: ^1.4.1 + version: 1.4.1(algosdk@3.0.0)(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@txnlab/use-wallet': specifier: workspace:* version: link:../../packages/use-wallet @@ -161,11 +161,11 @@ importers: specifier: 1.1.0 version: 1.1.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@blockshake/defly-connect': - specifier: ^1.2.0 - version: 1.2.0(algosdk@3.0.0)(bufferutil@4.0.8)(utf-8-validate@5.0.10) + specifier: ^1.2.1 + version: 1.2.1(algosdk@3.0.0)(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@perawallet/connect': - specifier: ^1.4.0 - version: 1.4.0(algosdk@3.0.0)(bufferutil@4.0.8)(utf-8-validate@5.0.10) + specifier: ^1.4.1 + version: 1.4.1(algosdk@3.0.0)(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@txnlab/use-wallet-react': specifier: workspace:* version: link:../../packages/use-wallet-react @@ -225,11 +225,11 @@ importers: specifier: 1.1.0 version: 1.1.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@blockshake/defly-connect': - specifier: ^1.2.0 - version: 1.2.0(algosdk@3.0.0)(bufferutil@4.0.8)(utf-8-validate@5.0.10) + specifier: ^1.2.1 + version: 1.2.1(algosdk@3.0.0)(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@perawallet/connect': - specifier: ^1.4.0 - version: 1.4.0(algosdk@3.0.0)(bufferutil@4.0.8)(utf-8-validate@5.0.10) + specifier: ^1.4.1 + version: 1.4.1(algosdk@3.0.0)(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@txnlab/use-wallet-solid': specifier: workspace:* version: link:../../packages/use-wallet-solid @@ -265,11 +265,11 @@ importers: specifier: 1.1.0 version: 1.1.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@blockshake/defly-connect': - specifier: ^1.2.0 - version: 1.2.0(algosdk@3.0.0)(bufferutil@4.0.8)(utf-8-validate@5.0.10) + specifier: ^1.2.1 + version: 1.2.1(algosdk@3.0.0)(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@perawallet/connect': - specifier: ^1.4.0 - version: 1.4.0(algosdk@3.0.0)(bufferutil@4.0.8)(utf-8-validate@5.0.10) + specifier: ^1.4.1 + version: 1.4.1(algosdk@3.0.0)(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@txnlab/use-wallet': specifier: workspace:* version: link:../../packages/use-wallet @@ -302,11 +302,11 @@ importers: specifier: 1.1.0 version: 1.1.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@blockshake/defly-connect': - specifier: ^1.2.0 - version: 1.2.0(algosdk@3.0.0)(bufferutil@4.0.8)(utf-8-validate@5.0.10) + specifier: ^1.2.1 + version: 1.2.1(algosdk@3.0.0)(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@perawallet/connect': - specifier: ^1.4.0 - version: 1.4.0(algosdk@3.0.0)(bufferutil@4.0.8)(utf-8-validate@5.0.10) + specifier: ^1.4.1 + version: 1.4.1(algosdk@3.0.0)(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@txnlab/use-wallet-vue': specifier: workspace:* version: link:../../packages/use-wallet-vue @@ -352,8 +352,8 @@ importers: specifier: 1.1.0 version: 1.1.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@blockshake/defly-connect': - specifier: 1.2.0 - version: 1.2.0(algosdk@3.0.0)(bufferutil@4.0.8)(utf-8-validate@5.0.10) + specifier: 1.2.1 + version: 1.2.1(algosdk@3.0.0)(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@magic-ext/algorand': specifier: 23.18.0 version: 23.18.0 @@ -361,8 +361,8 @@ importers: specifier: 28.18.0 version: 28.18.0(localforage@1.10.0) '@perawallet/connect': - specifier: 1.4.0 - version: 1.4.0(algosdk@3.0.0)(bufferutil@4.0.8)(utf-8-validate@5.0.10) + specifier: 1.4.1 + version: 1.4.1(algosdk@3.0.0)(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@types/node': specifier: 20.11.30 version: 20.11.30 @@ -397,14 +397,14 @@ importers: packages/use-wallet-react: dependencies: '@blockshake/defly-connect': - specifier: ^1.2.0 - version: 1.2.0(algosdk@3.0.0)(bufferutil@4.0.8)(utf-8-validate@5.0.10) + specifier: ^1.2.1 + version: 1.2.1(algosdk@3.0.0)(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@magic-ext/algorand': specifier: ^23.18.0 version: 23.18.0 '@perawallet/connect': - specifier: ^1.4.0 - version: 1.4.0(algosdk@3.0.0)(bufferutil@4.0.8)(utf-8-validate@5.0.10) + specifier: ^1.4.1 + version: 1.4.1(algosdk@3.0.0)(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@tanstack/react-store': specifier: 0.6.1 version: 0.6.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -449,14 +449,14 @@ importers: packages/use-wallet-solid: dependencies: '@blockshake/defly-connect': - specifier: ^1.2.0 - version: 1.2.0(algosdk@3.0.0)(bufferutil@4.0.8)(utf-8-validate@5.0.10) + specifier: ^1.2.1 + version: 1.2.1(algosdk@3.0.0)(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@magic-ext/algorand': specifier: ^23.18.0 version: 23.18.0 '@perawallet/connect': - specifier: ^1.4.0 - version: 1.4.0(algosdk@3.0.0)(bufferutil@4.0.8)(utf-8-validate@5.0.10) + specifier: ^1.4.1 + version: 1.4.1(algosdk@3.0.0)(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@tanstack/solid-store': specifier: 0.6.0 version: 0.6.0(solid-js@1.9.3) @@ -498,14 +498,14 @@ importers: packages/use-wallet-vue: dependencies: '@blockshake/defly-connect': - specifier: ^1.2.0 - version: 1.2.0(algosdk@3.0.0)(bufferutil@4.0.8)(utf-8-validate@5.0.10) + specifier: ^1.2.1 + version: 1.2.1(algosdk@3.0.0)(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@magic-ext/algorand': specifier: ^23.18.0 version: 23.18.0 '@perawallet/connect': - specifier: ^1.4.0 - version: 1.4.0(algosdk@3.0.0)(bufferutil@4.0.8)(utf-8-validate@5.0.10) + specifier: ^1.4.1 + version: 1.4.1(algosdk@3.0.0)(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@tanstack/vue-store': specifier: 0.6.0 version: 0.6.0(vue@3.5.13(typescript@5.6.3)) @@ -856,8 +856,8 @@ packages: resolution: {integrity: sha512-vN5p+1kl59GVKMvTHt55NzzmYVxprfJD+ql7U9NFIfKCBkYE55LYtS+WtPlaYOyzydrKI8Nezd+aZextrd+FMA==} engines: {node: '>=6.9.0'} - '@blockshake/defly-connect@1.2.0': - resolution: {integrity: sha512-5XqasQ0ilRtSV2aMbFRZI+76U6VKVTsV9WLYr4OaZt1xObklc62A0B2Is2OEtBaI+CdU2DGCfZLM7L+rFC8DoQ==} + '@blockshake/defly-connect@1.2.1': + resolution: {integrity: sha512-T9wAjPTFdc8iRiDzTqmeBRCIroWLgXmqZHwnpzuchjYZXXqbnj+zge+HS7UaNunpxGVjDUNK1ah7OR6hEqtJoQ==} peerDependencies: algosdk: ^3.0.0 @@ -1571,8 +1571,8 @@ packages: resolution: {integrity: sha512-HNjmfLQEVRZmHRET336f20H/8kOozUGwk7yajvsonjNxbj2wBTK1WsQuHkD5yYh9RxFGL2EyDHryOihOwUoKDA==} engines: {node: '>= 10.0.0'} - '@perawallet/connect@1.4.0': - resolution: {integrity: sha512-ef6sQQWhCJ/fMe6VKOaSIaP4hpc2XufKJlv5A+kSHSoUD3NG0Me6R9oyDlxM7UcW/vTyWdg3lDEsPS92v+wBUA==} + '@perawallet/connect@1.4.1': + resolution: {integrity: sha512-yXfpQ2SzblOBp0P2Xsneq4f0d1YsSuYrdpw2fSwivlTbc5a40hQfYiJMql+b3UdfSID/wcaPl9Vkb5cMSBxNwQ==} peerDependencies: algosdk: ^3.0.0 @@ -7136,7 +7136,7 @@ snapshots: '@babel/helper-string-parser': 7.25.9 '@babel/helper-validator-identifier': 7.25.9 - '@blockshake/defly-connect@1.2.0(algosdk@3.0.0)(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + '@blockshake/defly-connect@1.2.1(algosdk@3.0.0)(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: '@likecoin/qr-code-styling': 1.6.6 '@walletconnect/client': 1.8.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) @@ -7925,7 +7925,7 @@ snapshots: '@parcel/watcher-win32-ia32': 2.4.1 '@parcel/watcher-win32-x64': 2.4.1 - '@perawallet/connect@1.4.0(algosdk@3.0.0)(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + '@perawallet/connect@1.4.1(algosdk@3.0.0)(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: '@evanhahn/lottie-web-light': 5.8.1 '@walletconnect/client': 1.8.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)