From c9fb843a2d15f69accec481a88813e66a51e83a2 Mon Sep 17 00:00:00 2001 From: Enes Date: Fri, 23 Aug 2024 12:31:32 +0300 Subject: [PATCH] refactor/separation of dependencies (#2734) --- packages/base/package.json | 85 ++++++++++------ packages/scaffold-utils/package.json | 8 +- pnpm-lock.yaml | 145 ++++++++++++--------------- 3 files changed, 124 insertions(+), 114 deletions(-) diff --git a/packages/base/package.json b/packages/base/package.json index e1087a561b..0c8a9262c8 100644 --- a/packages/base/package.json +++ b/packages/base/package.json @@ -8,6 +8,13 @@ "dist", "!tsconfig.tsbuildinfo" ], + "scripts": { + "build:clean": "rm -rf dist", + "build": "tsc --build tsconfig.build.json", + "watch": "tsc --watch", + "typecheck": "tsc --noEmit", + "lint": "eslint . --ext .js,.jsx,.ts,.tsx" + }, "exports": { ".": { "types": "./dist/types/exports/index.d.ts", @@ -50,21 +57,57 @@ "default": "./dist/esm/utils/library/vue/index.js" } }, - "scripts": { - "build:clean": "rm -rf dist", - "build": "tsc --build tsconfig.build.json", - "watch": "tsc --watch", - "typecheck": "tsc --noEmit", - "lint": "eslint . --ext .js,.jsx,.ts,.tsx" + "typesVersions": { + "*": { + "react": [ + "./dist/types/exports/react.d.ts" + ], + "adapters/evm/ethers": [ + "./dist/types/adapters/evm/ethers/index.d.ts" + ], + "adapters/evm/ethers5": [ + "./dist/types/adapters/evm/ethers5/index.d.ts" + ], + "adapters/evm/wagmi": [ + "./dist/types/adapters/evm/wagmi/index.d.ts" + ], + "adapters/solana/web3js": [ + "./dist/types/adapters/solana/web3js/index.d.ts" + ], + "utils/library/react": [ + "./dist/types/utils/library/react/index.d.ts" + ], + "utils/library/vue": [ + "./dist/types/utils/library/vue/index.d.ts" + ] + } }, "dependencies": { + "@walletconnect/utils": "2.14.0", + "@web3modal/common": "workspace:*", + "@web3modal/core": "workspace:*", + "@web3modal/polyfills": "workspace:*", + "@web3modal/scaffold-ui": "workspace:*", + "@web3modal/scaffold-utils": "workspace:*", + "@web3modal/siwe": "workspace:*", + "@web3modal/ui": "workspace:*", + "@web3modal/wallet": "workspace:*" + }, + "optionalDependencies": { + "borsh": "0.7.0", + "bs58": "5.0.0" + }, + "devDependencies": { "@coinbase/wallet-sdk": "4.0.3", "@ethersproject/sha2": "5.7.0", "@solana/wallet-adapter-base": "0.9.23", "@solana/wallet-standard-features": "1.2.0", "@solana/wallet-standard-util": "1.1.1", "@solana/web3.js": "1.95.2", - "@walletconnect/utils": "2.14.0", + "@types/react": "18.2.0", + "@types/react-dom": "18.2.0", + "@vitest/coverage-v8": "2.0.5", + "@vue/runtime-core": "3.4.3", "@wagmi/connectors": "5.1.5", "@wagmi/core": "2.13.4", "@wallet-standard/app": "1.0.1", @@ -74,36 +117,14 @@ "@walletconnect/ethereum-provider": "2.15.1", "@walletconnect/types": "2.13.3", "@walletconnect/universal-provider": "2.15.0", - "@web3modal/common": "workspace:*", - "@web3modal/core": "workspace:*", - "@web3modal/polyfills": "workspace:*", - "@web3modal/scaffold-ui": "workspace:*", - "@web3modal/scaffold-utils": "workspace:*", - "@web3modal/siwe": "workspace:*", - "@web3modal/ui": "workspace:*", - "@web3modal/wallet": "workspace:*", - "bn.js": "5.2.1", - "borsh": "0.7.0", - "bs58": "5.0.0", - "buffer": "6.0.3", "ethers": "6.13.0", "ethers5": "npm:ethers@5.7.2", - "lit": "3.1.0", - "valtio": "1.11.2", - "viem": "2.19.6", - "vue": "3.4.3", - "wagmi": "2.12.5" - }, - "devDependencies": { - "@types/bn.js": "5.1.5", - "@vitest/coverage-v8": "2.0.5", - "@vue/runtime-core": "3.4.3", - "@types/react": "18.2.0", - "@types/react-dom": "18.2.0", "react": "18.2.0", "react-dom": "18.2.0", + "viem": "2.19.6", "vitest": "2.0.3", - "vue": "3.4.3" + "vue": "3.4.3", + "wagmi": "2.12.5" }, "keywords": [ "web3", diff --git a/packages/scaffold-utils/package.json b/packages/scaffold-utils/package.json index 5cde17bd77..f13aedab96 100644 --- a/packages/scaffold-utils/package.json +++ b/packages/scaffold-utils/package.json @@ -40,15 +40,17 @@ "lint": "eslint . --ext .js,.jsx,.ts,.tsx" }, "dependencies": { - "@coinbase/wallet-sdk": "4.0.3", - "@solana/web3.js": "1.95.2", - "@solana/wallet-adapter-base": "0.9.23", "@web3modal/common": "workspace:*", "@web3modal/core": "workspace:*", "@web3modal/polyfills": "workspace:*", "@web3modal/wallet": "workspace:*", "valtio": "1.11.2" }, + "devDependencies": { + "@coinbase/wallet-sdk": "4.0.3", + "@solana/web3.js": "1.95.2", + "@solana/wallet-adapter-base": "0.9.23" + }, "keywords": [ "web3", "crypto", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index dd9e4a8b77..51d05b89fc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -590,6 +590,41 @@ importers: packages/base: dependencies: + '@walletconnect/utils': + specifier: 2.14.0 + version: 2.14.0 + '@web3modal/common': + specifier: workspace:* + version: link:../common + '@web3modal/core': + specifier: workspace:* + version: link:../core + '@web3modal/polyfills': + specifier: workspace:* + version: link:../polyfills + '@web3modal/scaffold-ui': + specifier: workspace:* + version: link:../scaffold-ui + '@web3modal/scaffold-utils': + specifier: workspace:* + version: link:../scaffold-utils + '@web3modal/siwe': + specifier: workspace:* + version: link:../siwe + '@web3modal/ui': + specifier: workspace:* + version: link:../ui + '@web3modal/wallet': + specifier: workspace:* + version: link:../wallet + optionalDependencies: + borsh: + specifier: 0.7.0 + version: 0.7.0 + bs58: + specifier: 5.0.0 + version: 5.0.0 + devDependencies: '@coinbase/wallet-sdk': specifier: 4.0.3 version: 4.0.3 @@ -608,6 +643,18 @@ importers: '@solana/web3.js': specifier: 1.95.2 version: 1.95.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@types/react': + specifier: 18.2.0 + version: 18.2.0 + '@types/react-dom': + specifier: 18.2.0 + version: 18.2.0 + '@vitest/coverage-v8': + specifier: 2.0.5 + version: 2.0.5(vitest@2.0.3(@types/node@20.11.5)(jsdom@24.1.0)(terser@5.31.6)) + '@vue/runtime-core': + specifier: 3.4.3 + version: 3.4.3 '@wagmi/connectors': specifier: 5.1.5 version: 5.1.5(@types/react@18.2.0)(@wagmi/core@2.13.4(@tanstack/query-core@5.24.8)(@types/react@18.2.0)(react@18.2.0)(typescript@5.3.3)(viem@2.19.6(bufferutil@4.0.8)(typescript@5.3.3)(utf-8-validate@5.0.10)(zod@3.22.4)))(bufferutil@4.0.8)(react-dom@18.2.0(react@18.2.0))(react-native@0.75.1(@babel/core@7.25.2)(@babel/preset-env@7.25.3(@babel/core@7.25.2))(@types/react@18.2.0)(bufferutil@4.0.8)(react@18.2.0)(typescript@5.3.3)(utf-8-validate@5.0.10))(react@18.2.0)(rollup@4.21.0)(typescript@5.3.3)(utf-8-validate@5.0.10)(viem@2.19.6(bufferutil@4.0.8)(typescript@5.3.3)(utf-8-validate@5.0.10)(zod@3.22.4))(zod@3.22.4) @@ -635,91 +682,30 @@ importers: '@walletconnect/universal-provider': specifier: 2.15.0 version: 2.15.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) - '@walletconnect/utils': - specifier: 2.14.0 - version: 2.14.0 - '@web3modal/common': - specifier: workspace:* - version: link:../common - '@web3modal/core': - specifier: workspace:* - version: link:../core - '@web3modal/polyfills': - specifier: workspace:* - version: link:../polyfills - '@web3modal/scaffold-ui': - specifier: workspace:* - version: link:../scaffold-ui - '@web3modal/scaffold-utils': - specifier: workspace:* - version: link:../scaffold-utils - '@web3modal/siwe': - specifier: workspace:* - version: link:../siwe - '@web3modal/ui': - specifier: workspace:* - version: link:../ui - '@web3modal/wallet': - specifier: workspace:* - version: link:../wallet - bn.js: - specifier: 5.2.1 - version: 5.2.1 - borsh: - specifier: 0.7.0 - version: 0.7.0 - bs58: - specifier: 5.0.0 - version: 5.0.0 - buffer: - specifier: 6.0.3 - version: 6.0.3 ethers: specifier: 6.13.0 version: 6.13.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) ethers5: specifier: npm:ethers@5.7.2 version: ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) - lit: - specifier: 3.1.0 - version: 3.1.0 - valtio: - specifier: 1.11.2 - version: 1.11.2(@types/react@18.2.0)(react@18.2.0) - viem: - specifier: 2.19.6 - version: 2.19.6(bufferutil@4.0.8)(typescript@5.3.3)(utf-8-validate@5.0.10)(zod@3.22.4) - vue: - specifier: 3.4.3 - version: 3.4.3(typescript@5.3.3) - wagmi: - specifier: 2.12.5 - version: 2.12.5(@tanstack/query-core@5.24.8)(@tanstack/react-query@5.24.8(react@18.2.0))(@types/react@18.2.0)(bufferutil@4.0.8)(react-dom@18.2.0(react@18.2.0))(react-native@0.75.1(@babel/core@7.25.2)(@babel/preset-env@7.25.3(@babel/core@7.25.2))(@types/react@18.2.0)(bufferutil@4.0.8)(react@18.2.0)(typescript@5.3.3)(utf-8-validate@5.0.10))(react@18.2.0)(rollup@4.21.0)(typescript@5.3.3)(utf-8-validate@5.0.10)(viem@2.19.6(bufferutil@4.0.8)(typescript@5.3.3)(utf-8-validate@5.0.10)(zod@3.22.4))(zod@3.22.4) - devDependencies: - '@types/bn.js': - specifier: 5.1.5 - version: 5.1.5 - '@types/react': - specifier: 18.2.0 - version: 18.2.0 - '@types/react-dom': - specifier: 18.2.0 - version: 18.2.0 - '@vitest/coverage-v8': - specifier: 2.0.5 - version: 2.0.5(vitest@2.0.3(@types/node@20.11.5)(jsdom@24.1.0)(terser@5.31.6)) - '@vue/runtime-core': - specifier: 3.4.3 - version: 3.4.3 react: specifier: 18.2.0 version: 18.2.0 react-dom: specifier: 18.2.0 version: 18.2.0(react@18.2.0) + viem: + specifier: 2.19.6 + version: 2.19.6(bufferutil@4.0.8)(typescript@5.3.3)(utf-8-validate@5.0.10)(zod@3.22.4) vitest: specifier: 2.0.3 version: 2.0.3(@types/node@20.11.5)(jsdom@24.1.0)(terser@5.31.6) + vue: + specifier: 3.4.3 + version: 3.4.3(typescript@5.3.3) + wagmi: + specifier: 2.12.5 + version: 2.12.5(@tanstack/query-core@5.24.8)(@tanstack/react-query@5.24.8(react@18.2.0))(@types/react@18.2.0)(bufferutil@4.0.8)(react-dom@18.2.0(react@18.2.0))(react-native@0.75.1(@babel/core@7.25.2)(@babel/preset-env@7.25.3(@babel/core@7.25.2))(@types/react@18.2.0)(bufferutil@4.0.8)(react@18.2.0)(typescript@5.3.3)(utf-8-validate@5.0.10))(react@18.2.0)(rollup@4.21.0)(typescript@5.3.3)(utf-8-validate@5.0.10)(viem@2.19.6(bufferutil@4.0.8)(typescript@5.3.3)(utf-8-validate@5.0.10)(zod@3.22.4))(zod@3.22.4) packages/cdn: dependencies: @@ -918,15 +904,6 @@ importers: packages/scaffold-utils: dependencies: - '@coinbase/wallet-sdk': - specifier: 4.0.3 - version: 4.0.3 - '@solana/wallet-adapter-base': - specifier: 0.9.23 - version: 0.9.23(@solana/web3.js@1.95.2(bufferutil@4.0.8)(utf-8-validate@5.0.10)) - '@solana/web3.js': - specifier: 1.95.2 - version: 1.95.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@web3modal/common': specifier: workspace:* version: link:../common @@ -942,6 +919,16 @@ importers: valtio: specifier: 1.11.2 version: 1.11.2(@types/react@18.2.62)(react@18.2.0) + devDependencies: + '@coinbase/wallet-sdk': + specifier: 4.0.3 + version: 4.0.3 + '@solana/wallet-adapter-base': + specifier: 0.9.23 + version: 0.9.23(@solana/web3.js@1.95.2(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + '@solana/web3.js': + specifier: 1.95.2 + version: 1.95.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) packages/siwe: dependencies: