Browse Source

build(cjs/esm): add support for commonjs

update build pipeline to support esm and commonjs modules
Colin Ogoo 3 years ago
parent
commit
148964252b
75 changed files with 1345 additions and 987 deletions
  1. 36 30
      packages/core/base/package.json
  2. 7 0
      packages/core/base/tsconfig-cjs.json
  3. 8 6
      packages/core/base/tsconfig.json
  4. 43 38
      packages/core/react/package.json
  5. 7 0
      packages/core/react/tsconfig-cjs.json
  6. 12 7
      packages/core/react/tsconfig.json
  7. 39 33
      packages/core/svelte/package.json
  8. 7 0
      packages/core/svelte/tsconfig-cjs.json
  9. 8 6
      packages/core/svelte/tsconfig.json
  10. 37 32
      packages/core/vue/package.json
  11. 7 0
      packages/core/vue/tsconfig-cjs.json
  12. 9 7
      packages/core/vue/tsconfig.json
  13. 46 40
      packages/ui/ant-design/package.json
  14. 7 0
      packages/ui/ant-design/tsconfig-cjs.json
  15. 8 6
      packages/ui/ant-design/tsconfig.json
  16. 45 39
      packages/ui/material-ui/package.json
  17. 7 0
      packages/ui/material-ui/tsconfig-cjs.json
  18. 8 6
      packages/ui/material-ui/tsconfig.json
  19. 42 36
      packages/ui/react-ui/package.json
  20. 7 0
      packages/ui/react-ui/tsconfig-cjs.json
  21. 8 6
      packages/ui/react-ui/tsconfig.json
  22. 35 30
      packages/wallets/bitkeep/package.json
  23. 7 0
      packages/wallets/bitkeep/tsconfig-cjs.json
  24. 8 6
      packages/wallets/bitkeep/tsconfig.json
  25. 35 30
      packages/wallets/bitpie/package.json
  26. 7 0
      packages/wallets/bitpie/tsconfig-cjs.json
  27. 8 6
      packages/wallets/bitpie/tsconfig.json
  28. 38 33
      packages/wallets/blocto/package.json
  29. 7 0
      packages/wallets/blocto/tsconfig-cjs.json
  30. 8 6
      packages/wallets/blocto/tsconfig.json
  31. 35 30
      packages/wallets/clover/package.json
  32. 7 0
      packages/wallets/clover/tsconfig-cjs.json
  33. 8 6
      packages/wallets/clover/tsconfig.json
  34. 39 34
      packages/wallets/coin98/package.json
  35. 7 0
      packages/wallets/coin98/tsconfig-cjs.json
  36. 8 6
      packages/wallets/coin98/tsconfig.json
  37. 35 30
      packages/wallets/coinhub/package.json
  38. 7 0
      packages/wallets/coinhub/tsconfig-cjs.json
  39. 8 6
      packages/wallets/coinhub/tsconfig.json
  40. 40 35
      packages/wallets/ledger/package.json
  41. 7 0
      packages/wallets/ledger/tsconfig-cjs.json
  42. 8 6
      packages/wallets/ledger/tsconfig.json
  43. 35 30
      packages/wallets/mathwallet/package.json
  44. 7 0
      packages/wallets/mathwallet/tsconfig-cjs.json
  45. 8 6
      packages/wallets/mathwallet/tsconfig.json
  46. 35 30
      packages/wallets/phantom/package.json
  47. 7 0
      packages/wallets/phantom/tsconfig-cjs.json
  48. 8 6
      packages/wallets/phantom/tsconfig.json
  49. 35 30
      packages/wallets/safepal/package.json
  50. 7 0
      packages/wallets/safepal/tsconfig-cjs.json
  51. 8 6
      packages/wallets/safepal/tsconfig.json
  52. 39 34
      packages/wallets/slope/package.json
  53. 7 0
      packages/wallets/slope/tsconfig-cjs.json
  54. 8 6
      packages/wallets/slope/tsconfig.json
  55. 35 30
      packages/wallets/solflare/package.json
  56. 7 0
      packages/wallets/solflare/tsconfig-cjs.json
  57. 8 6
      packages/wallets/solflare/tsconfig.json
  58. 38 33
      packages/wallets/sollet/package.json
  59. 7 0
      packages/wallets/sollet/tsconfig-cjs.json
  60. 8 6
      packages/wallets/sollet/tsconfig.json
  61. 35 30
      packages/wallets/solong/package.json
  62. 7 0
      packages/wallets/solong/tsconfig-cjs.json
  63. 8 6
      packages/wallets/solong/tsconfig.json
  64. 35 30
      packages/wallets/tokenpocket/package.json
  65. 7 0
      packages/wallets/tokenpocket/tsconfig-cjs.json
  66. 8 6
      packages/wallets/tokenpocket/tsconfig.json
  67. 40 35
      packages/wallets/torus/package.json
  68. 7 0
      packages/wallets/torus/tsconfig-cjs.json
  69. 8 6
      packages/wallets/torus/tsconfig.json
  70. 42 37
      packages/wallets/walletconnect/package.json
  71. 7 0
      packages/wallets/walletconnect/tsconfig-cjs.json
  72. 8 6
      packages/wallets/walletconnect/tsconfig.json
  73. 51 46
      packages/wallets/wallets/package.json
  74. 7 0
      packages/wallets/wallets/tsconfig-cjs.json
  75. 8 6
      packages/wallets/wallets/tsconfig.json

+ 36 - 30
packages/core/base/package.json

@@ -1,32 +1,38 @@
 {
 {
-    "name": "@solana/wallet-adapter-base",
-    "version": "0.9.0",
-    "author": "Solana Maintainers <maintainers@solana.foundation>",
-    "repository": "https://github.com/solana-labs/wallet-adapter",
-    "license": "Apache-2.0",
-    "type": "module",
-    "sideEffects": false,
-    "main": "lib/index.js",
-    "types": "lib/index.d.ts",
-    "files": [
-        "lib",
-        "src",
-        "LICENSE"
-    ],
-    "publishConfig": {
-        "access": "public"
-    },
-    "scripts": {
-        "clean": "shx rm -rf lib/*",
-        "build": "yarn clean && tsc"
-    },
-    "peerDependencies": {
-        "@solana/web3.js": "^1.20.0"
-    },
-    "dependencies": {
-        "eventemitter3": "^4.0.7"
-    },
-    "devDependencies": {
-        "@solana/web3.js": "^1.20.0"
-    }
+  "name": "@solana/wallet-adapter-base",
+  "version": "0.9.0",
+  "author": "Solana Maintainers <maintainers@solana.foundation>",
+  "repository": "https://github.com/solana-labs/wallet-adapter",
+  "license": "Apache-2.0",
+  "type": "module",
+  "sideEffects": false,
+  "main": "lib/cjs/index.js",
+  "types": "lib/esm/index.d.ts",
+  "files": [
+    "lib",
+    "src",
+    "LICENSE"
+  ],
+  "publishConfig": {
+    "access": "public"
+  },
+  "scripts": {
+    "clean": "shx rm -rf lib/*",
+    "build": "yarn clean && tsc -p tsconfig.json && tsc -p tsconfig-cjs.json",
+    "postbuild": "echo '{\"type\":\"commonjs\"}' | npx json > lib/cjs/package.json && echo '{\"type\":\"module\"} ' | npx json > lib/esm/package.json"
+  },
+  "peerDependencies": {
+    "@solana/web3.js": "^1.20.0"
+  },
+  "dependencies": {
+    "eventemitter3": "^4.0.7"
+  },
+  "devDependencies": {
+    "@solana/web3.js": "^1.20.0"
+  },
+  "exports": {
+    "import": "./lib/esm/index.js",
+    "require": "./lib/cjs/index.js"
+  },
+  "module": "lib/esm/index.js"
 }
 }

+ 7 - 0
packages/core/base/tsconfig-cjs.json

@@ -0,0 +1,7 @@
+{
+  "extends": "./tsconfig.json",
+  "compilerOptions": {
+    "module": "CommonJS",
+    "outDir": "lib/cjs"
+  }
+}

+ 8 - 6
packages/core/base/tsconfig.json

@@ -1,8 +1,10 @@
 {
 {
-    "extends": "../../../tsconfig.json",
-    "include": ["src"],
-    "compilerOptions": {
-        "noEmit": false,
-        "outDir": "lib"
-    }
+  "extends": "../../../tsconfig.json",
+  "include": [
+    "src"
+  ],
+  "compilerOptions": {
+    "noEmit": false,
+    "outDir": "lib/esm"
+  }
 }
 }

+ 43 - 38
packages/core/react/package.json

@@ -1,40 +1,45 @@
 {
 {
-    "name": "@solana/wallet-adapter-react",
-    "version": "0.15.0",
-    "author": "Solana Maintainers <maintainers@solana.foundation>",
-    "repository": "https://github.com/solana-labs/wallet-adapter",
-    "license": "Apache-2.0",
-    "type": "module",
-    "sideEffects": false,
-    "main": "lib/index.js",
-    "esnext": "lib/index.js",
-    "types": "lib/index.d.ts",
-    "files": [
-        "lib",
-        "src",
-        "LICENSE"
-    ],
-    "publishConfig": {
-        "access": "public"
-    },
-    "scripts": {
-        "clean": "shx rm -rf lib/*",
-        "build": "yarn clean && tsc",
-        "test": "jest"
-    },
-    "peerDependencies": {
-        "@solana/wallet-adapter-base": "^0.9.0",
-        "@solana/web3.js": "^1.20.0",
-        "react": "^17.0.2"
-    },
-    "devDependencies": {
-        "@solana/wallet-adapter-base": "^0.9.0",
-        "@solana/web3.js": "^1.20.0",
-        "@types/jest": "^27.0.3",
-        "@types/react": "^17.0.24",
-        "jest": "^27.4.4",
-        "jest-localstorage-mock": "^2.4.18",
-        "react": "^17.0.2",
-        "ts-jest": "^27.1.1"
-    }
+  "name": "@solana/wallet-adapter-react",
+  "version": "0.15.0",
+  "author": "Solana Maintainers <maintainers@solana.foundation>",
+  "repository": "https://github.com/solana-labs/wallet-adapter",
+  "license": "Apache-2.0",
+  "type": "module",
+  "sideEffects": false,
+  "main": "lib/cjs/index.js",
+  "types": "lib/esm/index.d.ts",
+  "files": [
+    "lib",
+    "src",
+    "LICENSE"
+  ],
+  "publishConfig": {
+    "access": "public"
+  },
+  "scripts": {
+    "clean": "shx rm -rf lib/*",
+    "build": "yarn clean && tsc -p tsconfig.json && tsc -p tsconfig-cjs.json",
+    "test": "jest",
+    "postbuild": "echo '{\"type\":\"commonjs\"}' | npx json > lib/cjs/package.json && echo '{\"type\":\"module\"} ' | npx json > lib/esm/package.json"
+  },
+  "peerDependencies": {
+    "@solana/wallet-adapter-base": "^0.9.0",
+    "@solana/web3.js": "^1.20.0",
+    "react": "^17.0.2"
+  },
+  "devDependencies": {
+    "@solana/wallet-adapter-base": "^0.9.0",
+    "@solana/web3.js": "^1.20.0",
+    "@types/jest": "^27.0.3",
+    "@types/react": "^17.0.24",
+    "jest": "^27.4.4",
+    "jest-localstorage-mock": "^2.4.18",
+    "react": "^17.0.2",
+    "ts-jest": "^27.1.1"
+  },
+  "exports": {
+    "import": "./lib/esm/index.js",
+    "require": "./lib/cjs/index.js"
+  },
+  "module": "lib/esm/index.js"
 }
 }

+ 7 - 0
packages/core/react/tsconfig-cjs.json

@@ -0,0 +1,7 @@
+{
+  "extends": "./tsconfig.json",
+  "compilerOptions": {
+    "module": "CommonJS",
+    "outDir": "lib/cjs"
+  }
+}

+ 12 - 7
packages/core/react/tsconfig.json

@@ -1,9 +1,14 @@
 {
 {
-    "extends": "../../../tsconfig.json",
-    "include": ["src"],
-    "exclude": ["node_modules", "src/**/__tests__"],
-    "compilerOptions": {
-        "noEmit": false,
-        "outDir": "lib"
-    }
+  "extends": "../../../tsconfig.json",
+  "include": [
+    "src"
+  ],
+  "exclude": [
+    "node_modules",
+    "src/**/__tests__"
+  ],
+  "compilerOptions": {
+    "noEmit": false,
+    "outDir": "lib/esm"
+  }
 }
 }

+ 39 - 33
packages/core/svelte/package.json

@@ -1,35 +1,41 @@
 {
 {
-    "private": true,
-    "name": "@solana/wallet-adapter-svelte",
-    "version": "0.1.0",
-    "author": "Silvestre Vivo <silvestrevivomillan@gmail.com>",
-    "repository": "https://github.com/solana-labs/wallet-adapter",
-    "license": "Apache-2.0",
-    "main": "lib/index.js",
-    "esnext": "lib/index.js",
-    "types": "lib/index.d.ts",
-    "files": [
-        "lib",
-        "src",
-        "LICENSE"
-    ],
-    "publishConfig": {
-        "access": "public"
-    },
-    "scripts": {
-        "clean": "shx rm -rf lib/*",
-        "build": "yarn clean && tsc"
-    },
-    "peerDependencies": {
-        "@solana/wallet-adapter-base": "^0.8.1",
-        "@solana/web3.js": "^1.20.0",
-        "eventemitter3": "^4.0.7",
-        "svelte": "^3.43.1"
-    },
-    "devDependencies": {
-        "@solana/wallet-adapter-base": "^0.8.1",
-        "@solana/web3.js": "^1.20.0",
-        "eventemitter3": "^4.0.7",
-        "svelte": "^3.43.1"
-    }
+  "private": true,
+  "name": "@solana/wallet-adapter-svelte",
+  "version": "0.1.0",
+  "author": "Silvestre Vivo <silvestrevivomillan@gmail.com>",
+  "repository": "https://github.com/solana-labs/wallet-adapter",
+  "license": "Apache-2.0",
+  "main": "lib/cjs/index.js",
+  "types": "lib/esm/index.d.ts",
+  "files": [
+    "lib",
+    "src",
+    "LICENSE"
+  ],
+  "publishConfig": {
+    "access": "public"
+  },
+  "scripts": {
+    "clean": "shx rm -rf lib/*",
+    "build": "yarn clean && tsc -p tsconfig.json && tsc -p tsconfig-cjs.json",
+    "postbuild": "echo '{\"type\":\"commonjs\"}' | npx json > lib/cjs/package.json && echo '{\"type\":\"module\"} ' | npx json > lib/esm/package.json"
+  },
+  "peerDependencies": {
+    "@solana/wallet-adapter-base": "^0.8.1",
+    "@solana/web3.js": "^1.20.0",
+    "eventemitter3": "^4.0.7",
+    "svelte": "^3.43.1"
+  },
+  "devDependencies": {
+    "@solana/wallet-adapter-base": "^0.8.1",
+    "@solana/web3.js": "^1.20.0",
+    "eventemitter3": "^4.0.7",
+    "svelte": "^3.43.1"
+  },
+  "exports": {
+    "import": "./lib/esm/index.js",
+    "require": "./lib/cjs/index.js"
+  },
+  "type": "module",
+  "module": "lib/esm/index.js"
 }
 }

+ 7 - 0
packages/core/svelte/tsconfig-cjs.json

@@ -0,0 +1,7 @@
+{
+  "extends": "./tsconfig.json",
+  "compilerOptions": {
+    "module": "CommonJS",
+    "outDir": "lib/cjs"
+  }
+}

+ 8 - 6
packages/core/svelte/tsconfig.json

@@ -1,8 +1,10 @@
 {
 {
-    "extends": "../../../tsconfig.json",
-    "include": ["src"],
-    "compilerOptions": {
-        "noEmit": false,
-        "outDir": "lib"
-    }
+  "extends": "../../../tsconfig.json",
+  "include": [
+    "src"
+  ],
+  "compilerOptions": {
+    "noEmit": false,
+    "outDir": "lib/esm"
+  }
 }
 }

+ 37 - 32
packages/core/vue/package.json

@@ -1,34 +1,39 @@
 {
 {
-    "name": "@solana/wallet-adapter-vue",
-    "version": "0.4.1",
-    "author": "Solana Maintainers <maintainers@solana.foundation>",
-    "repository": "https://github.com/solana-labs/wallet-adapter",
-    "license": "Apache-2.0",
-    "type": "module",
-    "sideEffects": false,
-    "main": "lib/index.js",
-    "esnext": "lib/index.js",
-    "types": "lib/index.d.ts",
-    "files": [
-        "lib",
-        "src",
-        "LICENSE"
-    ],
-    "publishConfig": {
-        "access": "public"
-    },
-    "scripts": {
-        "clean": "shx rm -rf lib/*",
-        "build": "yarn clean && tsc"
-    },
-    "peerDependencies": {
-        "@solana/wallet-adapter-base": "^0.8.1",
-        "@solana/web3.js": "^1.20.0",
-        "vue": "^3.0.0"
-    },
-    "devDependencies": {
-        "@solana/wallet-adapter-base": "^0.8.1",
-        "@solana/web3.js": "^1.20.0",
-        "vue": "^3.0.0"
-    }
+  "name": "@solana/wallet-adapter-vue",
+  "version": "0.4.1",
+  "author": "Solana Maintainers <maintainers@solana.foundation>",
+  "repository": "https://github.com/solana-labs/wallet-adapter",
+  "license": "Apache-2.0",
+  "type": "module",
+  "sideEffects": false,
+  "main": "lib/cjs/index.js",
+  "types": "lib/esm/index.d.ts",
+  "files": [
+    "lib",
+    "src",
+    "LICENSE"
+  ],
+  "publishConfig": {
+    "access": "public"
+  },
+  "scripts": {
+    "clean": "shx rm -rf lib/*",
+    "build": "yarn clean && tsc -p tsconfig.json && tsc -p tsconfig-cjs.json",
+    "postbuild": "echo '{\"type\":\"commonjs\"}' | npx json > lib/cjs/package.json && echo '{\"type\":\"module\"} ' | npx json > lib/esm/package.json"
+  },
+  "peerDependencies": {
+    "@solana/wallet-adapter-base": "^0.8.1",
+    "@solana/web3.js": "^1.20.0",
+    "vue": "^3.0.0"
+  },
+  "devDependencies": {
+    "@solana/wallet-adapter-base": "^0.8.1",
+    "@solana/web3.js": "^1.20.0",
+    "vue": "^3.0.0"
+  },
+  "exports": {
+    "import": "./lib/esm/index.js",
+    "require": "./lib/cjs/index.js"
+  },
+  "module": "lib/esm/index.js"
 }
 }

+ 7 - 0
packages/core/vue/tsconfig-cjs.json

@@ -0,0 +1,7 @@
+{
+  "extends": "./tsconfig.json",
+  "compilerOptions": {
+    "module": "CommonJS",
+    "outDir": "lib/cjs"
+  }
+}

+ 9 - 7
packages/core/vue/tsconfig.json

@@ -1,9 +1,11 @@
 {
 {
-    "extends": "../../../tsconfig.json",
-    "include": ["src"],
-    "compilerOptions": {
-        "noEmit": false,
-        "outDir": "lib",
-        "isolatedModules": false
-    }
+  "extends": "../../../tsconfig.json",
+  "include": [
+    "src"
+  ],
+  "compilerOptions": {
+    "noEmit": false,
+    "outDir": "lib/esm",
+    "isolatedModules": false
+  }
 }
 }

+ 46 - 40
packages/ui/ant-design/package.json

@@ -1,42 +1,48 @@
 {
 {
-    "name": "@solana/wallet-adapter-ant-design",
-    "version": "0.11.0",
-    "author": "Solana Maintainers <maintainers@solana.foundation>",
-    "repository": "https://github.com/solana-labs/wallet-adapter",
-    "license": "Apache-2.0",
-    "main": "lib/index.js",
-    "esnext": "lib/index.js",
-    "types": "lib/index.d.ts",
-    "files": [
-        "lib",
-        "src",
-        "LICENSE",
-        "styles.css"
-    ],
-    "publishConfig": {
-        "access": "public"
-    },
-    "scripts": {
-        "clean": "shx rm -rf lib/*",
-        "build": "yarn clean && tsc"
-    },
-    "peerDependencies": {
-        "@ant-design/icons": "^4.6.3",
-        "@solana/wallet-adapter-base": "^0.9.0",
-        "@solana/wallet-adapter-react": "^0.15.0",
-        "@solana/web3.js": "^1.20.0",
-        "antd": "^4.16.11",
-        "react": "^17.0.2",
-        "react-dom": "^17.0.2"
-    },
-    "devDependencies": {
-        "@ant-design/icons": "^4.6.3",
-        "@solana/wallet-adapter-base": "^0.9.0",
-        "@solana/wallet-adapter-react": "^0.15.0",
-        "@solana/web3.js": "^1.20.0",
-        "@types/react": "^17.0.24",
-        "antd": "^4.16.11",
-        "react": "^17.0.2",
-        "react-dom": "^17.0.2"
-    }
+  "name": "@solana/wallet-adapter-ant-design",
+  "version": "0.11.0",
+  "author": "Solana Maintainers <maintainers@solana.foundation>",
+  "repository": "https://github.com/solana-labs/wallet-adapter",
+  "license": "Apache-2.0",
+  "main": "lib/cjs/index.js",
+  "types": "lib/esm/index.d.ts",
+  "files": [
+    "lib",
+    "src",
+    "LICENSE",
+    "styles.css"
+  ],
+  "publishConfig": {
+    "access": "public"
+  },
+  "scripts": {
+    "clean": "shx rm -rf lib/*",
+    "build": "yarn clean && tsc -p tsconfig.json && tsc -p tsconfig-cjs.json",
+    "postbuild": "echo '{\"type\":\"commonjs\"}' | npx json > lib/cjs/package.json && echo '{\"type\":\"module\"} ' | npx json > lib/esm/package.json"
+  },
+  "peerDependencies": {
+    "@ant-design/icons": "^4.6.3",
+    "@solana/wallet-adapter-base": "^0.9.0",
+    "@solana/wallet-adapter-react": "^0.15.0",
+    "@solana/web3.js": "^1.20.0",
+    "antd": "^4.16.11",
+    "react": "^17.0.2",
+    "react-dom": "^17.0.2"
+  },
+  "devDependencies": {
+    "@ant-design/icons": "^4.6.3",
+    "@solana/wallet-adapter-base": "^0.9.0",
+    "@solana/wallet-adapter-react": "^0.15.0",
+    "@solana/web3.js": "^1.20.0",
+    "@types/react": "^17.0.24",
+    "antd": "^4.16.11",
+    "react": "^17.0.2",
+    "react-dom": "^17.0.2"
+  },
+  "exports": {
+    "import": "./lib/esm/index.js",
+    "require": "./lib/cjs/index.js"
+  },
+  "type": "module",
+  "module": "lib/esm/index.js"
 }
 }

+ 7 - 0
packages/ui/ant-design/tsconfig-cjs.json

@@ -0,0 +1,7 @@
+{
+  "extends": "./tsconfig.json",
+  "compilerOptions": {
+    "module": "CommonJS",
+    "outDir": "lib/cjs"
+  }
+}

+ 8 - 6
packages/ui/ant-design/tsconfig.json

@@ -1,8 +1,10 @@
 {
 {
-    "extends": "../../../tsconfig.json",
-    "include": ["src"],
-    "compilerOptions": {
-        "noEmit": false,
-        "outDir": "lib"
-    }
+  "extends": "../../../tsconfig.json",
+  "include": [
+    "src"
+  ],
+  "compilerOptions": {
+    "noEmit": false,
+    "outDir": "lib/esm"
+  }
 }
 }

+ 45 - 39
packages/ui/material-ui/package.json

@@ -1,41 +1,47 @@
 {
 {
-    "name": "@solana/wallet-adapter-material-ui",
-    "version": "0.16.0",
-    "author": "Solana Maintainers <maintainers@solana.foundation>",
-    "repository": "https://github.com/solana-labs/wallet-adapter",
-    "license": "Apache-2.0",
-    "main": "lib/index.js",
-    "esnext": "lib/index.js",
-    "types": "lib/index.d.ts",
-    "files": [
-        "lib",
-        "src",
-        "LICENSE"
-    ],
-    "publishConfig": {
-        "access": "public"
-    },
-    "scripts": {
-        "clean": "shx rm -rf lib/*",
-        "build": "yarn clean && tsc"
-    },
-    "peerDependencies": {
-        "@mui/icons-material": "^5.1.0",
-        "@mui/material": "^5.1.0",
-        "@solana/wallet-adapter-base": "^0.9.0",
-        "@solana/wallet-adapter-react": "^0.15.0",
-        "@solana/web3.js": "^1.20.0",
-        "react": "^17.0.2",
-        "react-dom": "^17.0.2"
-    },
-    "devDependencies": {
-        "@mui/icons-material": "^5.1.0",
-        "@mui/material": "^5.1.0",
-        "@solana/wallet-adapter-base": "^0.9.0",
-        "@solana/wallet-adapter-react": "^0.15.0",
-        "@solana/web3.js": "^1.20.0",
-        "@types/react": "^17.0.24",
-        "react": "^17.0.2",
-        "react-dom": "^17.0.2"
-    }
+  "name": "@solana/wallet-adapter-material-ui",
+  "version": "0.16.0",
+  "author": "Solana Maintainers <maintainers@solana.foundation>",
+  "repository": "https://github.com/solana-labs/wallet-adapter",
+  "license": "Apache-2.0",
+  "main": "lib/cjs/index.js",
+  "types": "lib/esm/index.d.ts",
+  "files": [
+    "lib",
+    "src",
+    "LICENSE"
+  ],
+  "publishConfig": {
+    "access": "public"
+  },
+  "scripts": {
+    "clean": "shx rm -rf lib/*",
+    "build": "yarn clean && tsc -p tsconfig.json && tsc -p tsconfig-cjs.json",
+    "postbuild": "echo '{\"type\":\"commonjs\"}' | npx json > lib/cjs/package.json && echo '{\"type\":\"module\"} ' | npx json > lib/esm/package.json"
+  },
+  "peerDependencies": {
+    "@mui/icons-material": "^5.1.0",
+    "@mui/material": "^5.1.0",
+    "@solana/wallet-adapter-base": "^0.9.0",
+    "@solana/wallet-adapter-react": "^0.15.0",
+    "@solana/web3.js": "^1.20.0",
+    "react": "^17.0.2",
+    "react-dom": "^17.0.2"
+  },
+  "devDependencies": {
+    "@mui/icons-material": "^5.1.0",
+    "@mui/material": "^5.1.0",
+    "@solana/wallet-adapter-base": "^0.9.0",
+    "@solana/wallet-adapter-react": "^0.15.0",
+    "@solana/web3.js": "^1.20.0",
+    "@types/react": "^17.0.24",
+    "react": "^17.0.2",
+    "react-dom": "^17.0.2"
+  },
+  "exports": {
+    "import": "./lib/esm/index.js",
+    "require": "./lib/cjs/index.js"
+  },
+  "type": "module",
+  "module": "lib/esm/index.js"
 }
 }

+ 7 - 0
packages/ui/material-ui/tsconfig-cjs.json

@@ -0,0 +1,7 @@
+{
+  "extends": "./tsconfig.json",
+  "compilerOptions": {
+    "module": "CommonJS",
+    "outDir": "lib/cjs"
+  }
+}

+ 8 - 6
packages/ui/material-ui/tsconfig.json

@@ -1,8 +1,10 @@
 {
 {
-    "extends": "../../../tsconfig.json",
-    "include": ["src"],
-    "compilerOptions": {
-        "noEmit": false,
-        "outDir": "lib"
-    }
+  "extends": "../../../tsconfig.json",
+  "include": [
+    "src"
+  ],
+  "compilerOptions": {
+    "noEmit": false,
+    "outDir": "lib/esm"
+  }
 }
 }

+ 42 - 36
packages/ui/react-ui/package.json

@@ -1,38 +1,44 @@
 {
 {
-    "name": "@solana/wallet-adapter-react-ui",
-    "version": "0.8.0",
-    "author": "Solana Maintainers <maintainers@solana.foundation>",
-    "repository": "https://github.com/solana-labs/wallet-adapter",
-    "license": "Apache-2.0",
-    "main": "lib/index.js",
-    "esnext": "lib/index.js",
-    "types": "lib/index.d.ts",
-    "files": [
-        "lib",
-        "src",
-        "LICENSE",
-        "styles.css"
-    ],
-    "publishConfig": {
-        "access": "public"
-    },
-    "scripts": {
-        "clean": "shx rm -rf lib/*",
-        "build": "yarn clean && tsc"
-    },
-    "peerDependencies": {
-        "@solana/wallet-adapter-base": "^0.9.0",
-        "@solana/wallet-adapter-react": "^0.15.0",
-        "@solana/web3.js": "^1.20.0",
-        "react": "^17.0.2",
-        "react-dom": "^17.0.2"
-    },
-    "devDependencies": {
-        "@solana/wallet-adapter-base": "^0.9.0",
-        "@solana/wallet-adapter-react": "^0.15.0",
-        "@solana/web3.js": "^1.20.0",
-        "@types/react": "^17.0.24",
-        "react": "^17.0.2",
-        "react-dom": "^17.0.2"
-    }
+  "name": "@solana/wallet-adapter-react-ui",
+  "version": "0.8.0",
+  "author": "Solana Maintainers <maintainers@solana.foundation>",
+  "repository": "https://github.com/solana-labs/wallet-adapter",
+  "license": "Apache-2.0",
+  "main": "lib/cjs/index.js",
+  "types": "lib/esm/index.d.ts",
+  "files": [
+    "lib",
+    "src",
+    "LICENSE",
+    "styles.css"
+  ],
+  "publishConfig": {
+    "access": "public"
+  },
+  "scripts": {
+    "clean": "shx rm -rf lib/*",
+    "build": "yarn clean && tsc -p tsconfig.json && tsc -p tsconfig-cjs.json",
+    "postbuild": "echo '{\"type\":\"commonjs\"}' | npx json > lib/cjs/package.json && echo '{\"type\":\"module\"} ' | npx json > lib/esm/package.json"
+  },
+  "peerDependencies": {
+    "@solana/wallet-adapter-base": "^0.9.0",
+    "@solana/wallet-adapter-react": "^0.15.0",
+    "@solana/web3.js": "^1.20.0",
+    "react": "^17.0.2",
+    "react-dom": "^17.0.2"
+  },
+  "devDependencies": {
+    "@solana/wallet-adapter-base": "^0.9.0",
+    "@solana/wallet-adapter-react": "^0.15.0",
+    "@solana/web3.js": "^1.20.0",
+    "@types/react": "^17.0.24",
+    "react": "^17.0.2",
+    "react-dom": "^17.0.2"
+  },
+  "exports": {
+    "import": "./lib/esm/index.js",
+    "require": "./lib/cjs/index.js"
+  },
+  "type": "module",
+  "module": "lib/esm/index.js"
 }
 }

+ 7 - 0
packages/ui/react-ui/tsconfig-cjs.json

@@ -0,0 +1,7 @@
+{
+  "extends": "./tsconfig.json",
+  "compilerOptions": {
+    "module": "CommonJS",
+    "outDir": "lib/cjs"
+  }
+}

+ 8 - 6
packages/ui/react-ui/tsconfig.json

@@ -1,8 +1,10 @@
 {
 {
-    "extends": "../../../tsconfig.json",
-    "include": ["src"],
-    "compilerOptions": {
-        "noEmit": false,
-        "outDir": "lib"
-    }
+  "extends": "../../../tsconfig.json",
+  "include": [
+    "src"
+  ],
+  "compilerOptions": {
+    "noEmit": false,
+    "outDir": "lib/esm"
+  }
 }
 }

+ 35 - 30
packages/wallets/bitkeep/package.json

@@ -1,32 +1,37 @@
 {
 {
-    "name": "@solana/wallet-adapter-bitkeep",
-    "version": "0.3.0",
-    "author": "Solana Maintainers <maintainers@solana.foundation>",
-    "repository": "https://github.com/solana-labs/wallet-adapter",
-    "license": "Apache-2.0",
-    "type": "module",
-    "sideEffects": false,
-    "main": "lib/index.js",
-    "esnext": "lib/index.js",
-    "types": "lib/index.d.ts",
-    "files": [
-        "lib",
-        "src",
-        "LICENSE"
-    ],
-    "publishConfig": {
-        "access": "public"
-    },
-    "scripts": {
-        "clean": "shx rm -rf lib/*",
-        "build": "yarn clean && tsc"
-    },
-    "peerDependencies": {
-        "@solana/wallet-adapter-base": "^0.9.0",
-        "@solana/web3.js": "^1.20.0"
-    },
-    "devDependencies": {
-        "@solana/wallet-adapter-base": "^0.9.0",
-        "@solana/web3.js": "^1.20.0"
-    }
+  "name": "@solana/wallet-adapter-bitkeep",
+  "version": "0.3.0",
+  "author": "Solana Maintainers <maintainers@solana.foundation>",
+  "repository": "https://github.com/solana-labs/wallet-adapter",
+  "license": "Apache-2.0",
+  "type": "module",
+  "sideEffects": false,
+  "main": "lib/cjs/index.js",
+  "types": "lib/esm/index.d.ts",
+  "files": [
+    "lib",
+    "src",
+    "LICENSE"
+  ],
+  "publishConfig": {
+    "access": "public"
+  },
+  "scripts": {
+    "clean": "shx rm -rf lib/*",
+    "build": "yarn clean && tsc -p tsconfig.json && tsc -p tsconfig-cjs.json",
+    "postbuild": "echo '{\"type\":\"commonjs\"}' | npx json > lib/cjs/package.json && echo '{\"type\":\"module\"} ' | npx json > lib/esm/package.json"
+  },
+  "peerDependencies": {
+    "@solana/wallet-adapter-base": "^0.9.0",
+    "@solana/web3.js": "^1.20.0"
+  },
+  "devDependencies": {
+    "@solana/wallet-adapter-base": "^0.9.0",
+    "@solana/web3.js": "^1.20.0"
+  },
+  "exports": {
+    "import": "./lib/esm/index.js",
+    "require": "./lib/cjs/index.js"
+  },
+  "module": "lib/esm/index.js"
 }
 }

+ 7 - 0
packages/wallets/bitkeep/tsconfig-cjs.json

@@ -0,0 +1,7 @@
+{
+  "extends": "./tsconfig.json",
+  "compilerOptions": {
+    "module": "CommonJS",
+    "outDir": "lib/cjs"
+  }
+}

+ 8 - 6
packages/wallets/bitkeep/tsconfig.json

@@ -1,8 +1,10 @@
 {
 {
-    "extends": "../../../tsconfig.json",
-    "include": ["src"],
-    "compilerOptions": {
-        "noEmit": false,
-        "outDir": "lib"
-    }
+  "extends": "../../../tsconfig.json",
+  "include": [
+    "src"
+  ],
+  "compilerOptions": {
+    "noEmit": false,
+    "outDir": "lib/esm"
+  }
 }
 }

+ 35 - 30
packages/wallets/bitpie/package.json

@@ -1,32 +1,37 @@
 {
 {
-    "name": "@solana/wallet-adapter-bitpie",
-    "version": "0.5.0",
-    "author": "Solana Maintainers <maintainers@solana.foundation>",
-    "repository": "https://github.com/solana-labs/wallet-adapter",
-    "license": "Apache-2.0",
-    "type": "module",
-    "sideEffects": false,
-    "main": "lib/index.js",
-    "esnext": "lib/index.js",
-    "types": "lib/index.d.ts",
-    "files": [
-        "lib",
-        "src",
-        "LICENSE"
-    ],
-    "publishConfig": {
-        "access": "public"
-    },
-    "scripts": {
-        "clean": "shx rm -rf lib/*",
-        "build": "yarn clean && tsc"
-    },
-    "peerDependencies": {
-        "@solana/wallet-adapter-base": "^0.9.0",
-        "@solana/web3.js": "^1.20.0"
-    },
-    "devDependencies": {
-        "@solana/wallet-adapter-base": "^0.9.0",
-        "@solana/web3.js": "^1.20.0"
-    }
+  "name": "@solana/wallet-adapter-bitpie",
+  "version": "0.5.0",
+  "author": "Solana Maintainers <maintainers@solana.foundation>",
+  "repository": "https://github.com/solana-labs/wallet-adapter",
+  "license": "Apache-2.0",
+  "type": "module",
+  "sideEffects": false,
+  "main": "lib/cjs/index.js",
+  "types": "lib/esm/index.d.ts",
+  "files": [
+    "lib",
+    "src",
+    "LICENSE"
+  ],
+  "publishConfig": {
+    "access": "public"
+  },
+  "scripts": {
+    "clean": "shx rm -rf lib/*",
+    "build": "yarn clean && tsc -p tsconfig.json && tsc -p tsconfig-cjs.json",
+    "postbuild": "echo '{\"type\":\"commonjs\"}' | npx json > lib/cjs/package.json && echo '{\"type\":\"module\"} ' | npx json > lib/esm/package.json"
+  },
+  "peerDependencies": {
+    "@solana/wallet-adapter-base": "^0.9.0",
+    "@solana/web3.js": "^1.20.0"
+  },
+  "devDependencies": {
+    "@solana/wallet-adapter-base": "^0.9.0",
+    "@solana/web3.js": "^1.20.0"
+  },
+  "exports": {
+    "import": "./lib/esm/index.js",
+    "require": "./lib/cjs/index.js"
+  },
+  "module": "lib/esm/index.js"
 }
 }

+ 7 - 0
packages/wallets/bitpie/tsconfig-cjs.json

@@ -0,0 +1,7 @@
+{
+  "extends": "./tsconfig.json",
+  "compilerOptions": {
+    "module": "CommonJS",
+    "outDir": "lib/cjs"
+  }
+}

+ 8 - 6
packages/wallets/bitpie/tsconfig.json

@@ -1,8 +1,10 @@
 {
 {
-    "extends": "../../../tsconfig.json",
-    "include": ["src"],
-    "compilerOptions": {
-        "noEmit": false,
-        "outDir": "lib"
-    }
+  "extends": "../../../tsconfig.json",
+  "include": [
+    "src"
+  ],
+  "compilerOptions": {
+    "noEmit": false,
+    "outDir": "lib/esm"
+  }
 }
 }

+ 38 - 33
packages/wallets/blocto/package.json

@@ -1,35 +1,40 @@
 {
 {
-    "name": "@solana/wallet-adapter-blocto",
-    "version": "0.5.0",
-    "author": "Solana Maintainers <maintainers@solana.foundation>",
-    "repository": "https://github.com/solana-labs/wallet-adapter",
-    "license": "Apache-2.0",
-    "type": "module",
-    "sideEffects": false,
-    "main": "lib/index.js",
-    "esnext": "lib/index.js",
-    "types": "lib/index.d.ts",
-    "files": [
-        "lib",
-        "src",
-        "LICENSE"
-    ],
-    "publishConfig": {
-        "access": "public"
-    },
-    "scripts": {
-        "clean": "shx rm -rf lib/*",
-        "build": "yarn clean && tsc"
-    },
-    "peerDependencies": {
-        "@solana/wallet-adapter-base": "^0.9.0",
-        "@solana/web3.js": "^1.20.0"
-    },
-    "dependencies": {
-        "@blocto/sdk": "^0.2.21"
-    },
-    "devDependencies": {
-        "@solana/wallet-adapter-base": "^0.9.0",
-        "@solana/web3.js": "^1.20.0"
-    }
+  "name": "@solana/wallet-adapter-blocto",
+  "version": "0.5.0",
+  "author": "Solana Maintainers <maintainers@solana.foundation>",
+  "repository": "https://github.com/solana-labs/wallet-adapter",
+  "license": "Apache-2.0",
+  "type": "module",
+  "sideEffects": false,
+  "main": "lib/cjs/index.js",
+  "types": "lib/esm/index.d.ts",
+  "files": [
+    "lib",
+    "src",
+    "LICENSE"
+  ],
+  "publishConfig": {
+    "access": "public"
+  },
+  "scripts": {
+    "clean": "shx rm -rf lib/*",
+    "build": "yarn clean && tsc -p tsconfig.json && tsc -p tsconfig-cjs.json",
+    "postbuild": "echo '{\"type\":\"commonjs\"}' | npx json > lib/cjs/package.json && echo '{\"type\":\"module\"} ' | npx json > lib/esm/package.json"
+  },
+  "peerDependencies": {
+    "@solana/wallet-adapter-base": "^0.9.0",
+    "@solana/web3.js": "^1.20.0"
+  },
+  "dependencies": {
+    "@blocto/sdk": "^0.2.21"
+  },
+  "devDependencies": {
+    "@solana/wallet-adapter-base": "^0.9.0",
+    "@solana/web3.js": "^1.20.0"
+  },
+  "exports": {
+    "import": "./lib/esm/index.js",
+    "require": "./lib/cjs/index.js"
+  },
+  "module": "lib/esm/index.js"
 }
 }

+ 7 - 0
packages/wallets/blocto/tsconfig-cjs.json

@@ -0,0 +1,7 @@
+{
+  "extends": "./tsconfig.json",
+  "compilerOptions": {
+    "module": "CommonJS",
+    "outDir": "lib/cjs"
+  }
+}

+ 8 - 6
packages/wallets/blocto/tsconfig.json

@@ -1,8 +1,10 @@
 {
 {
-    "extends": "../../../tsconfig.json",
-    "include": ["src"],
-    "compilerOptions": {
-        "noEmit": false,
-        "outDir": "lib"
-    }
+  "extends": "../../../tsconfig.json",
+  "include": [
+    "src"
+  ],
+  "compilerOptions": {
+    "noEmit": false,
+    "outDir": "lib/esm"
+  }
 }
 }

+ 35 - 30
packages/wallets/clover/package.json

@@ -1,32 +1,37 @@
 {
 {
-    "name": "@solana/wallet-adapter-clover",
-    "version": "0.4.0",
-    "author": "Solana Maintainers <maintainers@solana.foundation>",
-    "repository": "https://github.com/solana-labs/wallet-adapter",
-    "license": "Apache-2.0",
-    "type": "module",
-    "sideEffects": false,
-    "main": "lib/index.js",
-    "esnext": "lib/index.js",
-    "types": "lib/index.d.ts",
-    "files": [
-        "lib",
-        "src",
-        "LICENSE"
-    ],
-    "publishConfig": {
-        "access": "public"
-    },
-    "scripts": {
-        "clean": "shx rm -rf lib/*",
-        "build": "yarn clean && tsc"
-    },
-    "peerDependencies": {
-        "@solana/wallet-adapter-base": "^0.9.0",
-        "@solana/web3.js": "^1.20.0"
-    },
-    "devDependencies": {
-        "@solana/wallet-adapter-base": "^0.9.0",
-        "@solana/web3.js": "^1.20.0"
-    }
+  "name": "@solana/wallet-adapter-clover",
+  "version": "0.4.0",
+  "author": "Solana Maintainers <maintainers@solana.foundation>",
+  "repository": "https://github.com/solana-labs/wallet-adapter",
+  "license": "Apache-2.0",
+  "type": "module",
+  "sideEffects": false,
+  "main": "lib/cjs/index.js",
+  "types": "lib/esm/index.d.ts",
+  "files": [
+    "lib",
+    "src",
+    "LICENSE"
+  ],
+  "publishConfig": {
+    "access": "public"
+  },
+  "scripts": {
+    "clean": "shx rm -rf lib/*",
+    "build": "yarn clean && tsc -p tsconfig.json && tsc -p tsconfig-cjs.json",
+    "postbuild": "echo '{\"type\":\"commonjs\"}' | npx json > lib/cjs/package.json && echo '{\"type\":\"module\"} ' | npx json > lib/esm/package.json"
+  },
+  "peerDependencies": {
+    "@solana/wallet-adapter-base": "^0.9.0",
+    "@solana/web3.js": "^1.20.0"
+  },
+  "devDependencies": {
+    "@solana/wallet-adapter-base": "^0.9.0",
+    "@solana/web3.js": "^1.20.0"
+  },
+  "exports": {
+    "import": "./lib/esm/index.js",
+    "require": "./lib/cjs/index.js"
+  },
+  "module": "lib/esm/index.js"
 }
 }

+ 7 - 0
packages/wallets/clover/tsconfig-cjs.json

@@ -0,0 +1,7 @@
+{
+  "extends": "./tsconfig.json",
+  "compilerOptions": {
+    "module": "CommonJS",
+    "outDir": "lib/cjs"
+  }
+}

+ 8 - 6
packages/wallets/clover/tsconfig.json

@@ -1,8 +1,10 @@
 {
 {
-    "extends": "../../../tsconfig.json",
-    "include": ["src"],
-    "compilerOptions": {
-        "noEmit": false,
-        "outDir": "lib"
-    }
+  "extends": "../../../tsconfig.json",
+  "include": [
+    "src"
+  ],
+  "compilerOptions": {
+    "noEmit": false,
+    "outDir": "lib/esm"
+  }
 }
 }

+ 39 - 34
packages/wallets/coin98/package.json

@@ -1,36 +1,41 @@
 {
 {
-    "name": "@solana/wallet-adapter-coin98",
-    "version": "0.5.0",
-    "author": "Solana Maintainers <maintainers@solana.foundation>",
-    "repository": "https://github.com/solana-labs/wallet-adapter",
-    "license": "Apache-2.0",
-    "type": "module",
-    "sideEffects": false,
-    "main": "lib/index.js",
-    "esnext": "lib/index.js",
-    "types": "lib/index.d.ts",
-    "files": [
-        "lib",
-        "src",
-        "LICENSE"
-    ],
-    "publishConfig": {
-        "access": "public"
-    },
-    "scripts": {
-        "clean": "shx rm -rf lib/*",
-        "build": "yarn clean && tsc"
-    },
-    "peerDependencies": {
-        "@solana/wallet-adapter-base": "^0.9.0",
-        "@solana/web3.js": "^1.20.0"
-    },
-    "dependencies": {
-        "@types/bs58": "^4.0.1",
-        "bs58": "^4.0.1"
-    },
-    "devDependencies": {
-        "@solana/wallet-adapter-base": "^0.9.0",
-        "@solana/web3.js": "^1.20.0"
-    }
+  "name": "@solana/wallet-adapter-coin98",
+  "version": "0.5.0",
+  "author": "Solana Maintainers <maintainers@solana.foundation>",
+  "repository": "https://github.com/solana-labs/wallet-adapter",
+  "license": "Apache-2.0",
+  "type": "module",
+  "sideEffects": false,
+  "main": "lib/cjs/index.js",
+  "types": "lib/esm/index.d.ts",
+  "files": [
+    "lib",
+    "src",
+    "LICENSE"
+  ],
+  "publishConfig": {
+    "access": "public"
+  },
+  "scripts": {
+    "clean": "shx rm -rf lib/*",
+    "build": "yarn clean && tsc -p tsconfig.json && tsc -p tsconfig-cjs.json",
+    "postbuild": "echo '{\"type\":\"commonjs\"}' | npx json > lib/cjs/package.json && echo '{\"type\":\"module\"} ' | npx json > lib/esm/package.json"
+  },
+  "peerDependencies": {
+    "@solana/wallet-adapter-base": "^0.9.0",
+    "@solana/web3.js": "^1.20.0"
+  },
+  "dependencies": {
+    "@types/bs58": "^4.0.1",
+    "bs58": "^4.0.1"
+  },
+  "devDependencies": {
+    "@solana/wallet-adapter-base": "^0.9.0",
+    "@solana/web3.js": "^1.20.0"
+  },
+  "exports": {
+    "import": "./lib/esm/index.js",
+    "require": "./lib/cjs/index.js"
+  },
+  "module": "lib/esm/index.js"
 }
 }

+ 7 - 0
packages/wallets/coin98/tsconfig-cjs.json

@@ -0,0 +1,7 @@
+{
+  "extends": "./tsconfig.json",
+  "compilerOptions": {
+    "module": "CommonJS",
+    "outDir": "lib/cjs"
+  }
+}

+ 8 - 6
packages/wallets/coin98/tsconfig.json

@@ -1,8 +1,10 @@
 {
 {
-    "extends": "../../../tsconfig.json",
-    "include": ["src"],
-    "compilerOptions": {
-        "noEmit": false,
-        "outDir": "lib"
-    }
+  "extends": "../../../tsconfig.json",
+  "include": [
+    "src"
+  ],
+  "compilerOptions": {
+    "noEmit": false,
+    "outDir": "lib/esm"
+  }
 }
 }

+ 35 - 30
packages/wallets/coinhub/package.json

@@ -1,32 +1,37 @@
 {
 {
-    "name": "@solana/wallet-adapter-coinhub",
-    "version": "0.3.0",
-    "author": "Solana Maintainers <maintainers@solana.foundation>",
-    "repository": "https://github.com/solana-labs/wallet-adapter",
-    "license": "Apache-2.0",
-    "type": "module",
-    "sideEffects": false,
-    "main": "lib/index.js",
-    "esnext": "lib/index.js",
-    "types": "lib/index.d.ts",
-    "files": [
-        "lib",
-        "src",
-        "LICENSE"
-    ],
-    "publishConfig": {
-        "access": "public"
-    },
-    "scripts": {
-        "clean": "shx rm -rf lib/*",
-        "build": "yarn clean && tsc"
-    },
-    "peerDependencies": {
-        "@solana/wallet-adapter-base": "^0.9.0",
-        "@solana/web3.js": "^1.20.0"
-    },
-    "devDependencies": {
-        "@solana/wallet-adapter-base": "^0.9.0",
-        "@solana/web3.js": "^1.20.0"
-    }
+  "name": "@solana/wallet-adapter-coinhub",
+  "version": "0.3.0",
+  "author": "Solana Maintainers <maintainers@solana.foundation>",
+  "repository": "https://github.com/solana-labs/wallet-adapter",
+  "license": "Apache-2.0",
+  "type": "module",
+  "sideEffects": false,
+  "main": "lib/cjs/index.js",
+  "types": "lib/esm/index.d.ts",
+  "files": [
+    "lib",
+    "src",
+    "LICENSE"
+  ],
+  "publishConfig": {
+    "access": "public"
+  },
+  "scripts": {
+    "clean": "shx rm -rf lib/*",
+    "build": "yarn clean && tsc -p tsconfig.json && tsc -p tsconfig-cjs.json",
+    "postbuild": "echo '{\"type\":\"commonjs\"}' | npx json > lib/cjs/package.json && echo '{\"type\":\"module\"} ' | npx json > lib/esm/package.json"
+  },
+  "peerDependencies": {
+    "@solana/wallet-adapter-base": "^0.9.0",
+    "@solana/web3.js": "^1.20.0"
+  },
+  "devDependencies": {
+    "@solana/wallet-adapter-base": "^0.9.0",
+    "@solana/web3.js": "^1.20.0"
+  },
+  "exports": {
+    "import": "./lib/esm/index.js",
+    "require": "./lib/cjs/index.js"
+  },
+  "module": "lib/esm/index.js"
 }
 }

+ 7 - 0
packages/wallets/coinhub/tsconfig-cjs.json

@@ -0,0 +1,7 @@
+{
+  "extends": "./tsconfig.json",
+  "compilerOptions": {
+    "module": "CommonJS",
+    "outDir": "lib/cjs"
+  }
+}

+ 8 - 6
packages/wallets/coinhub/tsconfig.json

@@ -1,8 +1,10 @@
 {
 {
-    "extends": "../../../tsconfig.json",
-    "include": ["src"],
-    "compilerOptions": {
-        "noEmit": false,
-        "outDir": "lib"
-    }
+  "extends": "../../../tsconfig.json",
+  "include": [
+    "src"
+  ],
+  "compilerOptions": {
+    "noEmit": false,
+    "outDir": "lib/esm"
+  }
 }
 }

+ 40 - 35
packages/wallets/ledger/package.json

@@ -1,37 +1,42 @@
 {
 {
-    "name": "@solana/wallet-adapter-ledger",
-    "version": "0.9.0",
-    "author": "Solana Maintainers <maintainers@solana.foundation>",
-    "repository": "https://github.com/solana-labs/wallet-adapter",
-    "license": "Apache-2.0",
-    "type": "module",
-    "sideEffects": false,
-    "main": "lib/index.js",
-    "esnext": "lib/index.js",
-    "types": "lib/index.d.ts",
-    "files": [
-        "lib",
-        "src",
-        "LICENSE"
-    ],
-    "publishConfig": {
-        "access": "public"
-    },
-    "scripts": {
-        "clean": "shx rm -rf lib/*",
-        "build": "yarn clean && tsc"
-    },
-    "peerDependencies": {
-        "@solana/wallet-adapter-base": "^0.9.0",
-        "@solana/web3.js": "^1.20.0"
-    },
-    "dependencies": {
-        "@ledgerhq/hw-transport": "^6.11.2",
-        "@ledgerhq/hw-transport-webhid": "^6.11.2",
-        "@types/w3c-web-hid": "^1.0.2"
-    },
-    "devDependencies": {
-        "@solana/wallet-adapter-base": "^0.9.0",
-        "@solana/web3.js": "^1.20.0"
-    }
+  "name": "@solana/wallet-adapter-ledger",
+  "version": "0.9.0",
+  "author": "Solana Maintainers <maintainers@solana.foundation>",
+  "repository": "https://github.com/solana-labs/wallet-adapter",
+  "license": "Apache-2.0",
+  "type": "module",
+  "sideEffects": false,
+  "main": "lib/cjs/index.js",
+  "types": "lib/esm/index.d.ts",
+  "files": [
+    "lib",
+    "src",
+    "LICENSE"
+  ],
+  "publishConfig": {
+    "access": "public"
+  },
+  "scripts": {
+    "clean": "shx rm -rf lib/*",
+    "build": "yarn clean && tsc -p tsconfig.json && tsc -p tsconfig-cjs.json",
+    "postbuild": "echo '{\"type\":\"commonjs\"}' | npx json > lib/cjs/package.json && echo '{\"type\":\"module\"} ' | npx json > lib/esm/package.json"
+  },
+  "peerDependencies": {
+    "@solana/wallet-adapter-base": "^0.9.0",
+    "@solana/web3.js": "^1.20.0"
+  },
+  "dependencies": {
+    "@ledgerhq/hw-transport": "^6.11.2",
+    "@ledgerhq/hw-transport-webhid": "^6.11.2",
+    "@types/w3c-web-hid": "^1.0.2"
+  },
+  "devDependencies": {
+    "@solana/wallet-adapter-base": "^0.9.0",
+    "@solana/web3.js": "^1.20.0"
+  },
+  "exports": {
+    "import": "./lib/esm/index.js",
+    "require": "./lib/cjs/index.js"
+  },
+  "module": "lib/esm/index.js"
 }
 }

+ 7 - 0
packages/wallets/ledger/tsconfig-cjs.json

@@ -0,0 +1,7 @@
+{
+  "extends": "./tsconfig.json",
+  "compilerOptions": {
+    "module": "CommonJS",
+    "outDir": "lib/cjs"
+  }
+}

+ 8 - 6
packages/wallets/ledger/tsconfig.json

@@ -1,8 +1,10 @@
 {
 {
-    "extends": "../../../tsconfig.json",
-    "include": ["src"],
-    "compilerOptions": {
-        "noEmit": false,
-        "outDir": "lib"
-    }
+  "extends": "../../../tsconfig.json",
+  "include": [
+    "src"
+  ],
+  "compilerOptions": {
+    "noEmit": false,
+    "outDir": "lib/esm"
+  }
 }
 }

+ 35 - 30
packages/wallets/mathwallet/package.json

@@ -1,32 +1,37 @@
 {
 {
-    "name": "@solana/wallet-adapter-mathwallet",
-    "version": "0.9.0",
-    "author": "Solana Maintainers <maintainers@solana.foundation>",
-    "repository": "https://github.com/solana-labs/wallet-adapter",
-    "license": "Apache-2.0",
-    "type": "module",
-    "sideEffects": false,
-    "main": "lib/index.js",
-    "esnext": "lib/index.js",
-    "types": "lib/index.d.ts",
-    "files": [
-        "lib",
-        "src",
-        "LICENSE"
-    ],
-    "publishConfig": {
-        "access": "public"
-    },
-    "scripts": {
-        "clean": "shx rm -rf lib/*",
-        "build": "yarn clean && tsc"
-    },
-    "peerDependencies": {
-        "@solana/wallet-adapter-base": "^0.9.0",
-        "@solana/web3.js": "^1.20.0"
-    },
-    "devDependencies": {
-        "@solana/wallet-adapter-base": "^0.9.0",
-        "@solana/web3.js": "^1.20.0"
-    }
+  "name": "@solana/wallet-adapter-mathwallet",
+  "version": "0.9.0",
+  "author": "Solana Maintainers <maintainers@solana.foundation>",
+  "repository": "https://github.com/solana-labs/wallet-adapter",
+  "license": "Apache-2.0",
+  "type": "module",
+  "sideEffects": false,
+  "main": "lib/cjs/index.js",
+  "types": "lib/esm/index.d.ts",
+  "files": [
+    "lib",
+    "src",
+    "LICENSE"
+  ],
+  "publishConfig": {
+    "access": "public"
+  },
+  "scripts": {
+    "clean": "shx rm -rf lib/*",
+    "build": "yarn clean && tsc -p tsconfig.json && tsc -p tsconfig-cjs.json",
+    "postbuild": "echo '{\"type\":\"commonjs\"}' | npx json > lib/cjs/package.json && echo '{\"type\":\"module\"} ' | npx json > lib/esm/package.json"
+  },
+  "peerDependencies": {
+    "@solana/wallet-adapter-base": "^0.9.0",
+    "@solana/web3.js": "^1.20.0"
+  },
+  "devDependencies": {
+    "@solana/wallet-adapter-base": "^0.9.0",
+    "@solana/web3.js": "^1.20.0"
+  },
+  "exports": {
+    "import": "./lib/esm/index.js",
+    "require": "./lib/cjs/index.js"
+  },
+  "module": "lib/esm/index.js"
 }
 }

+ 7 - 0
packages/wallets/mathwallet/tsconfig-cjs.json

@@ -0,0 +1,7 @@
+{
+  "extends": "./tsconfig.json",
+  "compilerOptions": {
+    "module": "CommonJS",
+    "outDir": "lib/cjs"
+  }
+}

+ 8 - 6
packages/wallets/mathwallet/tsconfig.json

@@ -1,8 +1,10 @@
 {
 {
-    "extends": "../../../tsconfig.json",
-    "include": ["src"],
-    "compilerOptions": {
-        "noEmit": false,
-        "outDir": "lib"
-    }
+  "extends": "../../../tsconfig.json",
+  "include": [
+    "src"
+  ],
+  "compilerOptions": {
+    "noEmit": false,
+    "outDir": "lib/esm"
+  }
 }
 }

+ 35 - 30
packages/wallets/phantom/package.json

@@ -1,32 +1,37 @@
 {
 {
-    "name": "@solana/wallet-adapter-phantom",
-    "version": "0.9.0",
-    "author": "Solana Maintainers <maintainers@solana.foundation>",
-    "repository": "https://github.com/solana-labs/wallet-adapter",
-    "license": "Apache-2.0",
-    "type": "module",
-    "sideEffects": false,
-    "main": "lib/index.js",
-    "esnext": "lib/index.js",
-    "types": "lib/index.d.ts",
-    "files": [
-        "lib",
-        "src",
-        "LICENSE"
-    ],
-    "publishConfig": {
-        "access": "public"
-    },
-    "scripts": {
-        "clean": "shx rm -rf lib/*",
-        "build": "yarn clean && tsc"
-    },
-    "peerDependencies": {
-        "@solana/wallet-adapter-base": "^0.9.0",
-        "@solana/web3.js": "^1.20.0"
-    },
-    "devDependencies": {
-        "@solana/wallet-adapter-base": "^0.9.0",
-        "@solana/web3.js": "^1.20.0"
-    }
+  "name": "@solana/wallet-adapter-phantom",
+  "version": "0.9.0",
+  "author": "Solana Maintainers <maintainers@solana.foundation>",
+  "repository": "https://github.com/solana-labs/wallet-adapter",
+  "license": "Apache-2.0",
+  "type": "module",
+  "sideEffects": false,
+  "main": "lib/cjs/index.js",
+  "types": "lib/esm/index.d.ts",
+  "files": [
+    "lib",
+    "src",
+    "LICENSE"
+  ],
+  "publishConfig": {
+    "access": "public"
+  },
+  "scripts": {
+    "clean": "shx rm -rf lib/*",
+    "build": "yarn clean && tsc -p tsconfig.json && tsc -p tsconfig-cjs.json",
+    "postbuild": "echo '{\"type\":\"commonjs\"}' | npx json > lib/cjs/package.json && echo '{\"type\":\"module\"} ' | npx json > lib/esm/package.json"
+  },
+  "peerDependencies": {
+    "@solana/wallet-adapter-base": "^0.9.0",
+    "@solana/web3.js": "^1.20.0"
+  },
+  "devDependencies": {
+    "@solana/wallet-adapter-base": "^0.9.0",
+    "@solana/web3.js": "^1.20.0"
+  },
+  "exports": {
+    "import": "./lib/esm/index.js",
+    "require": "./lib/cjs/index.js"
+  },
+  "module": "lib/esm/index.js"
 }
 }

+ 7 - 0
packages/wallets/phantom/tsconfig-cjs.json

@@ -0,0 +1,7 @@
+{
+  "extends": "./tsconfig.json",
+  "compilerOptions": {
+    "module": "CommonJS",
+    "outDir": "lib/cjs"
+  }
+}

+ 8 - 6
packages/wallets/phantom/tsconfig.json

@@ -1,8 +1,10 @@
 {
 {
-    "extends": "../../../tsconfig.json",
-    "include": ["src"],
-    "compilerOptions": {
-        "noEmit": false,
-        "outDir": "lib"
-    }
+  "extends": "../../../tsconfig.json",
+  "include": [
+    "src"
+  ],
+  "compilerOptions": {
+    "noEmit": false,
+    "outDir": "lib/esm"
+  }
 }
 }

+ 35 - 30
packages/wallets/safepal/package.json

@@ -1,32 +1,37 @@
 {
 {
-    "name": "@solana/wallet-adapter-safepal",
-    "version": "0.5.0",
-    "author": "Solana Maintainers <maintainers@solana.foundation>",
-    "repository": "https://github.com/solana-labs/wallet-adapter",
-    "license": "Apache-2.0",
-    "type": "module",
-    "sideEffects": false,
-    "main": "lib/index.js",
-    "esnext": "lib/index.js",
-    "types": "lib/index.d.ts",
-    "files": [
-        "lib",
-        "src",
-        "LICENSE"
-    ],
-    "publishConfig": {
-        "access": "public"
-    },
-    "scripts": {
-        "clean": "shx rm -rf lib/*",
-        "build": "yarn clean && tsc"
-    },
-    "peerDependencies": {
-        "@solana/wallet-adapter-base": "^0.9.0",
-        "@solana/web3.js": "^1.20.0"
-    },
-    "devDependencies": {
-        "@solana/wallet-adapter-base": "^0.9.0",
-        "@solana/web3.js": "^1.20.0"
-    }
+  "name": "@solana/wallet-adapter-safepal",
+  "version": "0.5.0",
+  "author": "Solana Maintainers <maintainers@solana.foundation>",
+  "repository": "https://github.com/solana-labs/wallet-adapter",
+  "license": "Apache-2.0",
+  "type": "module",
+  "sideEffects": false,
+  "main": "lib/cjs/index.js",
+  "types": "lib/esm/index.d.ts",
+  "files": [
+    "lib",
+    "src",
+    "LICENSE"
+  ],
+  "publishConfig": {
+    "access": "public"
+  },
+  "scripts": {
+    "clean": "shx rm -rf lib/*",
+    "build": "yarn clean && tsc -p tsconfig.json && tsc -p tsconfig-cjs.json",
+    "postbuild": "echo '{\"type\":\"commonjs\"}' | npx json > lib/cjs/package.json && echo '{\"type\":\"module\"} ' | npx json > lib/esm/package.json"
+  },
+  "peerDependencies": {
+    "@solana/wallet-adapter-base": "^0.9.0",
+    "@solana/web3.js": "^1.20.0"
+  },
+  "devDependencies": {
+    "@solana/wallet-adapter-base": "^0.9.0",
+    "@solana/web3.js": "^1.20.0"
+  },
+  "exports": {
+    "import": "./lib/esm/index.js",
+    "require": "./lib/cjs/index.js"
+  },
+  "module": "lib/esm/index.js"
 }
 }

+ 7 - 0
packages/wallets/safepal/tsconfig-cjs.json

@@ -0,0 +1,7 @@
+{
+  "extends": "./tsconfig.json",
+  "compilerOptions": {
+    "module": "CommonJS",
+    "outDir": "lib/cjs"
+  }
+}

+ 8 - 6
packages/wallets/safepal/tsconfig.json

@@ -1,8 +1,10 @@
 {
 {
-    "extends": "../../../tsconfig.json",
-    "include": ["src"],
-    "compilerOptions": {
-        "noEmit": false,
-        "outDir": "lib"
-    }
+  "extends": "../../../tsconfig.json",
+  "include": [
+    "src"
+  ],
+  "compilerOptions": {
+    "noEmit": false,
+    "outDir": "lib/esm"
+  }
 }
 }

+ 39 - 34
packages/wallets/slope/package.json

@@ -1,36 +1,41 @@
 {
 {
-    "name": "@solana/wallet-adapter-slope",
-    "version": "0.5.0",
-    "author": "Solana Maintainers <maintainers@solana.foundation>",
-    "repository": "https://github.com/solana-labs/wallet-adapter",
-    "license": "Apache-2.0",
-    "type": "module",
-    "sideEffects": false,
-    "main": "lib/index.js",
-    "esnext": "lib/index.js",
-    "types": "lib/index.d.ts",
-    "files": [
-        "lib",
-        "src",
-        "LICENSE"
-    ],
-    "publishConfig": {
-        "access": "public"
-    },
-    "scripts": {
-        "clean": "shx rm -rf lib/*",
-        "build": "yarn clean && tsc"
-    },
-    "peerDependencies": {
-        "@solana/wallet-adapter-base": "^0.9.0",
-        "@solana/web3.js": "^1.20.0"
-    },
-    "dependencies": {
-        "@types/bs58": "^4.0.1",
-        "bs58": "^4.0.1"
-    },
-    "devDependencies": {
-        "@solana/wallet-adapter-base": "^0.9.0",
-        "@solana/web3.js": "^1.20.0"
-    }
+  "name": "@solana/wallet-adapter-slope",
+  "version": "0.5.0",
+  "author": "Solana Maintainers <maintainers@solana.foundation>",
+  "repository": "https://github.com/solana-labs/wallet-adapter",
+  "license": "Apache-2.0",
+  "type": "module",
+  "sideEffects": false,
+  "main": "lib/cjs/index.js",
+  "types": "lib/esm/index.d.ts",
+  "files": [
+    "lib",
+    "src",
+    "LICENSE"
+  ],
+  "publishConfig": {
+    "access": "public"
+  },
+  "scripts": {
+    "clean": "shx rm -rf lib/*",
+    "build": "yarn clean && tsc -p tsconfig.json && tsc -p tsconfig-cjs.json",
+    "postbuild": "echo '{\"type\":\"commonjs\"}' | npx json > lib/cjs/package.json && echo '{\"type\":\"module\"} ' | npx json > lib/esm/package.json"
+  },
+  "peerDependencies": {
+    "@solana/wallet-adapter-base": "^0.9.0",
+    "@solana/web3.js": "^1.20.0"
+  },
+  "dependencies": {
+    "@types/bs58": "^4.0.1",
+    "bs58": "^4.0.1"
+  },
+  "devDependencies": {
+    "@solana/wallet-adapter-base": "^0.9.0",
+    "@solana/web3.js": "^1.20.0"
+  },
+  "exports": {
+    "import": "./lib/esm/index.js",
+    "require": "./lib/cjs/index.js"
+  },
+  "module": "lib/esm/index.js"
 }
 }

+ 7 - 0
packages/wallets/slope/tsconfig-cjs.json

@@ -0,0 +1,7 @@
+{
+  "extends": "./tsconfig.json",
+  "compilerOptions": {
+    "module": "CommonJS",
+    "outDir": "lib/cjs"
+  }
+}

+ 8 - 6
packages/wallets/slope/tsconfig.json

@@ -1,8 +1,10 @@
 {
 {
-    "extends": "../../../tsconfig.json",
-    "include": ["src"],
-    "compilerOptions": {
-        "noEmit": false,
-        "outDir": "lib"
-    }
+  "extends": "../../../tsconfig.json",
+  "include": [
+    "src"
+  ],
+  "compilerOptions": {
+    "noEmit": false,
+    "outDir": "lib/esm"
+  }
 }
 }

+ 35 - 30
packages/wallets/solflare/package.json

@@ -1,32 +1,37 @@
 {
 {
-    "name": "@solana/wallet-adapter-solflare",
-    "version": "0.6.0",
-    "author": "Solflare Developers <developers@solflare.com>",
-    "repository": "https://github.com/solana-labs/wallet-adapter",
-    "license": "Apache-2.0",
-    "type": "module",
-    "sideEffects": false,
-    "main": "lib/index.js",
-    "esnext": "lib/index.js",
-    "types": "lib/index.d.ts",
-    "files": [
-        "lib",
-        "src",
-        "LICENSE"
-    ],
-    "publishConfig": {
-        "access": "public"
-    },
-    "scripts": {
-        "clean": "shx rm -rf lib/*",
-        "build": "yarn clean && tsc"
-    },
-    "peerDependencies": {
-        "@solana/wallet-adapter-base": "^0.9.0",
-        "@solana/web3.js": "^1.20.0"
-    },
-    "devDependencies": {
-        "@solana/wallet-adapter-base": "^0.9.0",
-        "@solana/web3.js": "^1.20.0"
-    }
+  "name": "@solana/wallet-adapter-solflare",
+  "version": "0.6.0",
+  "author": "Solflare Developers <developers@solflare.com>",
+  "repository": "https://github.com/solana-labs/wallet-adapter",
+  "license": "Apache-2.0",
+  "type": "module",
+  "sideEffects": false,
+  "main": "lib/cjs/index.js",
+  "types": "lib/esm/index.d.ts",
+  "files": [
+    "lib",
+    "src",
+    "LICENSE"
+  ],
+  "publishConfig": {
+    "access": "public"
+  },
+  "scripts": {
+    "clean": "shx rm -rf lib/*",
+    "build": "yarn clean && tsc -p tsconfig.json && tsc -p tsconfig-cjs.json",
+    "postbuild": "echo '{\"type\":\"commonjs\"}' | npx json > lib/cjs/package.json && echo '{\"type\":\"module\"} ' | npx json > lib/esm/package.json"
+  },
+  "peerDependencies": {
+    "@solana/wallet-adapter-base": "^0.9.0",
+    "@solana/web3.js": "^1.20.0"
+  },
+  "devDependencies": {
+    "@solana/wallet-adapter-base": "^0.9.0",
+    "@solana/web3.js": "^1.20.0"
+  },
+  "exports": {
+    "import": "./lib/esm/index.js",
+    "require": "./lib/cjs/index.js"
+  },
+  "module": "lib/esm/index.js"
 }
 }

+ 7 - 0
packages/wallets/solflare/tsconfig-cjs.json

@@ -0,0 +1,7 @@
+{
+  "extends": "./tsconfig.json",
+  "compilerOptions": {
+    "module": "CommonJS",
+    "outDir": "lib/cjs"
+  }
+}

+ 8 - 6
packages/wallets/solflare/tsconfig.json

@@ -1,8 +1,10 @@
 {
 {
-    "extends": "../../../tsconfig.json",
-    "include": ["src"],
-    "compilerOptions": {
-        "noEmit": false,
-        "outDir": "lib"
-    }
+  "extends": "../../../tsconfig.json",
+  "include": [
+    "src"
+  ],
+  "compilerOptions": {
+    "noEmit": false,
+    "outDir": "lib/esm"
+  }
 }
 }

+ 38 - 33
packages/wallets/sollet/package.json

@@ -1,35 +1,40 @@
 {
 {
-    "name": "@solana/wallet-adapter-sollet",
-    "version": "0.10.0",
-    "author": "Solana Maintainers <maintainers@solana.foundation>",
-    "repository": "https://github.com/solana-labs/wallet-adapter",
-    "license": "Apache-2.0",
-    "type": "module",
-    "sideEffects": false,
-    "main": "lib/index.js",
-    "esnext": "lib/index.js",
-    "types": "lib/index.d.ts",
-    "files": [
-        "lib",
-        "src",
-        "LICENSE"
-    ],
-    "publishConfig": {
-        "access": "public"
-    },
-    "scripts": {
-        "clean": "shx rm -rf lib/*",
-        "build": "yarn clean && tsc"
-    },
-    "peerDependencies": {
-        "@solana/wallet-adapter-base": "^0.9.0",
-        "@solana/web3.js": "^1.20.0"
-    },
-    "dependencies": {
-        "@project-serum/sol-wallet-adapter": "^0.2.6"
-    },
-    "devDependencies": {
-        "@solana/wallet-adapter-base": "^0.9.0",
-        "@solana/web3.js": "^1.20.0"
-    }
+  "name": "@solana/wallet-adapter-sollet",
+  "version": "0.10.0",
+  "author": "Solana Maintainers <maintainers@solana.foundation>",
+  "repository": "https://github.com/solana-labs/wallet-adapter",
+  "license": "Apache-2.0",
+  "type": "module",
+  "sideEffects": false,
+  "main": "lib/cjs/index.js",
+  "types": "lib/esm/index.d.ts",
+  "files": [
+    "lib",
+    "src",
+    "LICENSE"
+  ],
+  "publishConfig": {
+    "access": "public"
+  },
+  "scripts": {
+    "clean": "shx rm -rf lib/*",
+    "build": "yarn clean && tsc -p tsconfig.json && tsc -p tsconfig-cjs.json",
+    "postbuild": "echo '{\"type\":\"commonjs\"}' | npx json > lib/cjs/package.json && echo '{\"type\":\"module\"} ' | npx json > lib/esm/package.json"
+  },
+  "peerDependencies": {
+    "@solana/wallet-adapter-base": "^0.9.0",
+    "@solana/web3.js": "^1.20.0"
+  },
+  "dependencies": {
+    "@project-serum/sol-wallet-adapter": "^0.2.6"
+  },
+  "devDependencies": {
+    "@solana/wallet-adapter-base": "^0.9.0",
+    "@solana/web3.js": "^1.20.0"
+  },
+  "exports": {
+    "import": "./lib/esm/index.js",
+    "require": "./lib/cjs/index.js"
+  },
+  "module": "lib/esm/index.js"
 }
 }

+ 7 - 0
packages/wallets/sollet/tsconfig-cjs.json

@@ -0,0 +1,7 @@
+{
+  "extends": "./tsconfig.json",
+  "compilerOptions": {
+    "module": "CommonJS",
+    "outDir": "lib/cjs"
+  }
+}

+ 8 - 6
packages/wallets/sollet/tsconfig.json

@@ -1,8 +1,10 @@
 {
 {
-    "extends": "../../../tsconfig.json",
-    "include": ["src"],
-    "compilerOptions": {
-        "noEmit": false,
-        "outDir": "lib"
-    }
+  "extends": "../../../tsconfig.json",
+  "include": [
+    "src"
+  ],
+  "compilerOptions": {
+    "noEmit": false,
+    "outDir": "lib/esm"
+  }
 }
 }

+ 35 - 30
packages/wallets/solong/package.json

@@ -1,32 +1,37 @@
 {
 {
-    "name": "@solana/wallet-adapter-solong",
-    "version": "0.9.0",
-    "author": "Solana Maintainers <maintainers@solana.foundation>",
-    "repository": "https://github.com/solana-labs/wallet-adapter",
-    "license": "Apache-2.0",
-    "type": "module",
-    "sideEffects": false,
-    "main": "lib/index.js",
-    "esnext": "lib/index.js",
-    "types": "lib/index.d.ts",
-    "files": [
-        "lib",
-        "src",
-        "LICENSE"
-    ],
-    "publishConfig": {
-        "access": "public"
-    },
-    "scripts": {
-        "clean": "shx rm -rf lib/*",
-        "build": "yarn clean && tsc"
-    },
-    "peerDependencies": {
-        "@solana/wallet-adapter-base": "^0.9.0",
-        "@solana/web3.js": "^1.20.0"
-    },
-    "devDependencies": {
-        "@solana/wallet-adapter-base": "^0.9.0",
-        "@solana/web3.js": "^1.20.0"
-    }
+  "name": "@solana/wallet-adapter-solong",
+  "version": "0.9.0",
+  "author": "Solana Maintainers <maintainers@solana.foundation>",
+  "repository": "https://github.com/solana-labs/wallet-adapter",
+  "license": "Apache-2.0",
+  "type": "module",
+  "sideEffects": false,
+  "main": "lib/cjs/index.js",
+  "types": "lib/esm/index.d.ts",
+  "files": [
+    "lib",
+    "src",
+    "LICENSE"
+  ],
+  "publishConfig": {
+    "access": "public"
+  },
+  "scripts": {
+    "clean": "shx rm -rf lib/*",
+    "build": "yarn clean && tsc -p tsconfig.json && tsc -p tsconfig-cjs.json",
+    "postbuild": "echo '{\"type\":\"commonjs\"}' | npx json > lib/cjs/package.json && echo '{\"type\":\"module\"} ' | npx json > lib/esm/package.json"
+  },
+  "peerDependencies": {
+    "@solana/wallet-adapter-base": "^0.9.0",
+    "@solana/web3.js": "^1.20.0"
+  },
+  "devDependencies": {
+    "@solana/wallet-adapter-base": "^0.9.0",
+    "@solana/web3.js": "^1.20.0"
+  },
+  "exports": {
+    "import": "./lib/esm/index.js",
+    "require": "./lib/cjs/index.js"
+  },
+  "module": "lib/esm/index.js"
 }
 }

+ 7 - 0
packages/wallets/solong/tsconfig-cjs.json

@@ -0,0 +1,7 @@
+{
+  "extends": "./tsconfig.json",
+  "compilerOptions": {
+    "module": "CommonJS",
+    "outDir": "lib/cjs"
+  }
+}

+ 8 - 6
packages/wallets/solong/tsconfig.json

@@ -1,8 +1,10 @@
 {
 {
-    "extends": "../../../tsconfig.json",
-    "include": ["src"],
-    "compilerOptions": {
-        "noEmit": false,
-        "outDir": "lib"
-    }
+  "extends": "../../../tsconfig.json",
+  "include": [
+    "src"
+  ],
+  "compilerOptions": {
+    "noEmit": false,
+    "outDir": "lib/esm"
+  }
 }
 }

+ 35 - 30
packages/wallets/tokenpocket/package.json

@@ -1,32 +1,37 @@
 {
 {
-    "name": "@solana/wallet-adapter-tokenpocket",
-    "version": "0.4.0",
-    "author": "Solana Maintainers <maintainers@solana.foundation>",
-    "repository": "https://github.com/solana-labs/wallet-adapter",
-    "license": "Apache-2.0",
-    "type": "module",
-    "sideEffects": false,
-    "main": "lib/index.js",
-    "esnext": "lib/index.js",
-    "types": "lib/index.d.ts",
-    "files": [
-        "lib",
-        "src",
-        "LICENSE"
-    ],
-    "publishConfig": {
-        "access": "public"
-    },
-    "scripts": {
-        "clean": "shx rm -rf lib/*",
-        "build": "yarn clean && tsc"
-    },
-    "peerDependencies": {
-        "@solana/wallet-adapter-base": "^0.9.0",
-        "@solana/web3.js": "^1.20.0"
-    },
-    "devDependencies": {
-        "@solana/wallet-adapter-base": "^0.9.0",
-        "@solana/web3.js": "^1.20.0"
-    }
+  "name": "@solana/wallet-adapter-tokenpocket",
+  "version": "0.4.0",
+  "author": "Solana Maintainers <maintainers@solana.foundation>",
+  "repository": "https://github.com/solana-labs/wallet-adapter",
+  "license": "Apache-2.0",
+  "type": "module",
+  "sideEffects": false,
+  "main": "lib/cjs/index.js",
+  "types": "lib/esm/index.d.ts",
+  "files": [
+    "lib",
+    "src",
+    "LICENSE"
+  ],
+  "publishConfig": {
+    "access": "public"
+  },
+  "scripts": {
+    "clean": "shx rm -rf lib/*",
+    "build": "yarn clean && tsc -p tsconfig.json && tsc -p tsconfig-cjs.json",
+    "postbuild": "echo '{\"type\":\"commonjs\"}' | npx json > lib/cjs/package.json && echo '{\"type\":\"module\"} ' | npx json > lib/esm/package.json"
+  },
+  "peerDependencies": {
+    "@solana/wallet-adapter-base": "^0.9.0",
+    "@solana/web3.js": "^1.20.0"
+  },
+  "devDependencies": {
+    "@solana/wallet-adapter-base": "^0.9.0",
+    "@solana/web3.js": "^1.20.0"
+  },
+  "exports": {
+    "import": "./lib/esm/index.js",
+    "require": "./lib/cjs/index.js"
+  },
+  "module": "lib/esm/index.js"
 }
 }

+ 7 - 0
packages/wallets/tokenpocket/tsconfig-cjs.json

@@ -0,0 +1,7 @@
+{
+  "extends": "./tsconfig.json",
+  "compilerOptions": {
+    "module": "CommonJS",
+    "outDir": "lib/cjs"
+  }
+}

+ 8 - 6
packages/wallets/tokenpocket/tsconfig.json

@@ -1,8 +1,10 @@
 {
 {
-    "extends": "../../../tsconfig.json",
-    "include": ["src"],
-    "compilerOptions": {
-        "noEmit": false,
-        "outDir": "lib"
-    }
+  "extends": "../../../tsconfig.json",
+  "include": [
+    "src"
+  ],
+  "compilerOptions": {
+    "noEmit": false,
+    "outDir": "lib/esm"
+  }
 }
 }

+ 40 - 35
packages/wallets/torus/package.json

@@ -1,37 +1,42 @@
 {
 {
-    "name": "@solana/wallet-adapter-torus",
-    "version": "0.11.0",
-    "author": "Solana Maintainers <maintainers@solana.foundation>",
-    "repository": "https://github.com/solana-labs/wallet-adapter",
-    "license": "Apache-2.0",
-    "type": "module",
-    "sideEffects": false,
-    "main": "lib/index.js",
-    "esnext": "lib/index.js",
-    "types": "lib/index.d.ts",
-    "files": [
-        "lib",
-        "src",
-        "LICENSE"
-    ],
-    "publishConfig": {
-        "access": "public"
-    },
-    "scripts": {
-        "clean": "shx rm -rf lib/*",
-        "build": "yarn clean && tsc"
-    },
-    "peerDependencies": {
-        "@solana/wallet-adapter-base": "^0.9.0",
-        "@solana/web3.js": "^1.20.0"
-    },
-    "dependencies": {
-        "@toruslabs/solana-embed": "^0.0.7",
-        "@types/keccak": "^3.0.1",
-        "@types/readable-stream": "^2.3.11"
-    },
-    "devDependencies": {
-        "@solana/wallet-adapter-base": "^0.9.0",
-        "@solana/web3.js": "^1.20.0"
-    }
+  "name": "@solana/wallet-adapter-torus",
+  "version": "0.11.0",
+  "author": "Solana Maintainers <maintainers@solana.foundation>",
+  "repository": "https://github.com/solana-labs/wallet-adapter",
+  "license": "Apache-2.0",
+  "type": "module",
+  "sideEffects": false,
+  "main": "lib/cjs/index.js",
+  "types": "lib/esm/index.d.ts",
+  "files": [
+    "lib",
+    "src",
+    "LICENSE"
+  ],
+  "publishConfig": {
+    "access": "public"
+  },
+  "scripts": {
+    "clean": "shx rm -rf lib/*",
+    "build": "yarn clean && tsc -p tsconfig.json && tsc -p tsconfig-cjs.json",
+    "postbuild": "echo '{\"type\":\"commonjs\"}' | npx json > lib/cjs/package.json && echo '{\"type\":\"module\"} ' | npx json > lib/esm/package.json"
+  },
+  "peerDependencies": {
+    "@solana/wallet-adapter-base": "^0.9.0",
+    "@solana/web3.js": "^1.20.0"
+  },
+  "dependencies": {
+    "@toruslabs/solana-embed": "^0.0.7",
+    "@types/keccak": "^3.0.1",
+    "@types/readable-stream": "^2.3.11"
+  },
+  "devDependencies": {
+    "@solana/wallet-adapter-base": "^0.9.0",
+    "@solana/web3.js": "^1.20.0"
+  },
+  "exports": {
+    "import": "./lib/esm/index.js",
+    "require": "./lib/cjs/index.js"
+  },
+  "module": "lib/esm/index.js"
 }
 }

+ 7 - 0
packages/wallets/torus/tsconfig-cjs.json

@@ -0,0 +1,7 @@
+{
+  "extends": "./tsconfig.json",
+  "compilerOptions": {
+    "module": "CommonJS",
+    "outDir": "lib/cjs"
+  }
+}

+ 8 - 6
packages/wallets/torus/tsconfig.json

@@ -1,8 +1,10 @@
 {
 {
-    "extends": "../../../tsconfig.json",
-    "include": ["src"],
-    "compilerOptions": {
-        "noEmit": false,
-        "outDir": "lib"
-    }
+  "extends": "../../../tsconfig.json",
+  "include": [
+    "src"
+  ],
+  "compilerOptions": {
+    "noEmit": false,
+    "outDir": "lib/esm"
+  }
 }
 }

+ 42 - 37
packages/wallets/walletconnect/package.json

@@ -1,39 +1,44 @@
 {
 {
-    "private": true,
-    "name": "@solana/wallet-adapter-walletconnect",
-    "version": "0.1.0",
-    "author": "Solana Maintainers <maintainers@solana.foundation>",
-    "repository": "https://github.com/solana-labs/wallet-adapter",
-    "license": "Apache-2.0",
-    "type": "module",
-    "sideEffects": false,
-    "main": "lib/index.js",
-    "esnext": "lib/index.js",
-    "types": "lib/index.d.ts",
-    "files": [
-        "lib",
-        "src",
-        "LICENSE"
-    ],
-    "publishConfig": {
-        "access": "public"
-    },
-    "scripts": {
-        "clean": "shx rm -rf lib/*",
-        "build": "yarn clean && tsc"
-    },
-    "peerDependencies": {
-        "@solana/wallet-adapter-base": "^0.9.0",
-        "@solana/web3.js": "^1.20.0"
-    },
-    "dependencies": {
-        "@types/pino": "^6.3.11",
-        "@walletconnect/client": "^2.0.0-beta.17",
-        "@walletconnect/qrcode-modal": "^2.0.0-alpha.20",
-        "@walletconnect/types": "^2.0.0-beta.17"
-    },
-    "devDependencies": {
-        "@solana/wallet-adapter-base": "^0.9.0",
-        "@solana/web3.js": "^1.20.0"
-    }
+  "private": true,
+  "name": "@solana/wallet-adapter-walletconnect",
+  "version": "0.1.0",
+  "author": "Solana Maintainers <maintainers@solana.foundation>",
+  "repository": "https://github.com/solana-labs/wallet-adapter",
+  "license": "Apache-2.0",
+  "type": "module",
+  "sideEffects": false,
+  "main": "lib/cjs/index.js",
+  "types": "lib/esm/index.d.ts",
+  "files": [
+    "lib",
+    "src",
+    "LICENSE"
+  ],
+  "publishConfig": {
+    "access": "public"
+  },
+  "scripts": {
+    "clean": "shx rm -rf lib/*",
+    "build": "yarn clean && tsc -p tsconfig.json && tsc -p tsconfig-cjs.json",
+    "postbuild": "echo '{\"type\":\"commonjs\"}' | npx json > lib/cjs/package.json && echo '{\"type\":\"module\"} ' | npx json > lib/esm/package.json"
+  },
+  "peerDependencies": {
+    "@solana/wallet-adapter-base": "^0.9.0",
+    "@solana/web3.js": "^1.20.0"
+  },
+  "dependencies": {
+    "@types/pino": "^6.3.11",
+    "@walletconnect/client": "^2.0.0-beta.17",
+    "@walletconnect/qrcode-modal": "^2.0.0-alpha.20",
+    "@walletconnect/types": "^2.0.0-beta.17"
+  },
+  "devDependencies": {
+    "@solana/wallet-adapter-base": "^0.9.0",
+    "@solana/web3.js": "^1.20.0"
+  },
+  "exports": {
+    "import": "./lib/esm/index.js",
+    "require": "./lib/cjs/index.js"
+  },
+  "module": "lib/esm/index.js"
 }
 }

+ 7 - 0
packages/wallets/walletconnect/tsconfig-cjs.json

@@ -0,0 +1,7 @@
+{
+  "extends": "./tsconfig.json",
+  "compilerOptions": {
+    "module": "CommonJS",
+    "outDir": "lib/cjs"
+  }
+}

+ 8 - 6
packages/wallets/walletconnect/tsconfig.json

@@ -1,8 +1,10 @@
 {
 {
-    "extends": "../../../tsconfig.json",
-    "include": ["src"],
-    "compilerOptions": {
-        "noEmit": false,
-        "outDir": "lib"
-    }
+  "extends": "../../../tsconfig.json",
+  "include": [
+    "src"
+  ],
+  "compilerOptions": {
+    "noEmit": false,
+    "outDir": "lib/esm"
+  }
 }
 }

+ 51 - 46
packages/wallets/wallets/package.json

@@ -1,48 +1,53 @@
 {
 {
-    "name": "@solana/wallet-adapter-wallets",
-    "version": "0.14.0",
-    "author": "Solana Maintainers <maintainers@solana.foundation>",
-    "repository": "https://github.com/solana-labs/wallet-adapter",
-    "license": "Apache-2.0",
-    "type": "module",
-    "sideEffects": false,
-    "main": "lib/index.js",
-    "esnext": "lib/index.js",
-    "types": "lib/index.d.ts",
-    "files": [
-        "lib",
-        "src",
-        "LICENSE"
-    ],
-    "publishConfig": {
-        "access": "public"
-    },
-    "scripts": {
-        "clean": "shx rm -rf lib/*",
-        "build": "yarn clean && tsc"
-    },
-    "peerDependencies": {
-        "@solana/wallet-adapter-base": "^0.9.0"
-    },
-    "dependencies": {
-        "@solana/wallet-adapter-bitkeep": "^0.3.0",
-        "@solana/wallet-adapter-bitpie": "^0.5.0",
-        "@solana/wallet-adapter-blocto": "^0.5.0",
-        "@solana/wallet-adapter-clover": "^0.4.0",
-        "@solana/wallet-adapter-coin98": "^0.5.0",
-        "@solana/wallet-adapter-coinhub": "^0.3.0",
-        "@solana/wallet-adapter-ledger": "^0.9.0",
-        "@solana/wallet-adapter-mathwallet": "^0.9.0",
-        "@solana/wallet-adapter-phantom": "^0.9.0",
-        "@solana/wallet-adapter-safepal": "^0.5.0",
-        "@solana/wallet-adapter-slope": "^0.5.0",
-        "@solana/wallet-adapter-solflare": "^0.6.0",
-        "@solana/wallet-adapter-sollet": "^0.10.0",
-        "@solana/wallet-adapter-solong": "^0.9.0",
-        "@solana/wallet-adapter-tokenpocket": "^0.4.0",
-        "@solana/wallet-adapter-torus": "^0.11.0"
-    },
-    "devDependencies": {
-        "@solana/wallet-adapter-base": "^0.9.0"
-    }
+  "name": "@solana/wallet-adapter-wallets",
+  "version": "0.14.0",
+  "author": "Solana Maintainers <maintainers@solana.foundation>",
+  "repository": "https://github.com/solana-labs/wallet-adapter",
+  "license": "Apache-2.0",
+  "type": "module",
+  "sideEffects": false,
+  "main": "lib/cjs/index.js",
+  "types": "lib/esm/index.d.ts",
+  "files": [
+    "lib",
+    "src",
+    "LICENSE"
+  ],
+  "publishConfig": {
+    "access": "public"
+  },
+  "scripts": {
+    "clean": "shx rm -rf lib/*",
+    "build": "yarn clean && tsc -p tsconfig.json && tsc -p tsconfig-cjs.json",
+    "postbuild": "echo '{\"type\":\"commonjs\"}' | npx json > lib/cjs/package.json && echo '{\"type\":\"module\"} ' | npx json > lib/esm/package.json"
+  },
+  "peerDependencies": {
+    "@solana/wallet-adapter-base": "^0.9.0"
+  },
+  "dependencies": {
+    "@solana/wallet-adapter-bitkeep": "^0.3.0",
+    "@solana/wallet-adapter-bitpie": "^0.5.0",
+    "@solana/wallet-adapter-blocto": "^0.5.0",
+    "@solana/wallet-adapter-clover": "^0.4.0",
+    "@solana/wallet-adapter-coin98": "^0.5.0",
+    "@solana/wallet-adapter-coinhub": "^0.3.0",
+    "@solana/wallet-adapter-ledger": "^0.9.0",
+    "@solana/wallet-adapter-mathwallet": "^0.9.0",
+    "@solana/wallet-adapter-phantom": "^0.9.0",
+    "@solana/wallet-adapter-safepal": "^0.5.0",
+    "@solana/wallet-adapter-slope": "^0.5.0",
+    "@solana/wallet-adapter-solflare": "^0.6.0",
+    "@solana/wallet-adapter-sollet": "^0.10.0",
+    "@solana/wallet-adapter-solong": "^0.9.0",
+    "@solana/wallet-adapter-tokenpocket": "^0.4.0",
+    "@solana/wallet-adapter-torus": "^0.11.0"
+  },
+  "devDependencies": {
+    "@solana/wallet-adapter-base": "^0.9.0"
+  },
+  "exports": {
+    "import": "./lib/esm/index.js",
+    "require": "./lib/cjs/index.js"
+  },
+  "module": "lib/esm/index.js"
 }
 }

+ 7 - 0
packages/wallets/wallets/tsconfig-cjs.json

@@ -0,0 +1,7 @@
+{
+  "extends": "./tsconfig.json",
+  "compilerOptions": {
+    "module": "CommonJS",
+    "outDir": "lib/cjs"
+  }
+}

+ 8 - 6
packages/wallets/wallets/tsconfig.json

@@ -1,8 +1,10 @@
 {
 {
-    "extends": "../../../tsconfig.json",
-    "include": ["src"],
-    "compilerOptions": {
-        "noEmit": false,
-        "outDir": "lib"
-    }
+  "extends": "../../../tsconfig.json",
+  "include": [
+    "src"
+  ],
+  "compilerOptions": {
+    "noEmit": false,
+    "outDir": "lib/esm"
+  }
 }
 }