From 73b8eb0dfb2395ab3d6c80766a695f32c202d8cb Mon Sep 17 00:00:00 2001 From: yuche Date: Tue, 11 Jun 2024 14:54:04 +0800 Subject: [PATCH] fix: bitcoin demo --- .github/workflows/changesets.yml | 2 ++ README.md | 13 ++++++----- eslint.config.js | 6 +++++ examples/bitcoin-demo/vite.config.ts | 33 ++-------------------------- pnpm-lock.yaml | 2 ++ 5 files changed, 19 insertions(+), 37 deletions(-) diff --git a/.github/workflows/changesets.yml b/.github/workflows/changesets.yml index 4ea54bf..dee7851 100644 --- a/.github/workflows/changesets.yml +++ b/.github/workflows/changesets.yml @@ -32,6 +32,8 @@ jobs: id: changesets uses: changesets/action@v1 with: + title: 'chore: version packages' + commit: 'chore: version packages' # This expects you to have a script called release which does a build for your packages and calls changeset publish publish: pnpm changeset:release version: pnpm changeset:version diff --git a/README.md b/README.md index e081dbe..c3cd8fd 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ In order to interact with [JoyID App](https://app.joy.id) we provide different p * [`@joyid/wagmi`](./packages/wagmi/): [Wagmi](https://wagmi.io/) implementation for JoyID EVM SDK. * [`@joyid/rainbowkit`](./packages/rainbowkit/): [RainbowKit](https://www.rainbowkit.com/) implementation for JoyID EVM SDK. * [`@joyid/ethereum-provider`](./packages/ethereum-provider/): [EIP-1193](https://eips.ethereum.org/EIPS/eip-1193) implementation for JoyID EVM SDK. +* [`@joyid/miniapp`](./packages/miniapp/): SDK for Telegram MiniApp. You can choose the appropriate SDK package according to your application scenario and follow the instructions in the documentation for installation and use. If you need technical support, feel free to contact us in [Discord](https://discord.com/invite/77MyakRKVB). @@ -27,12 +28,12 @@ pnpm run dev There are six examples in the `examples` directory: -* [`CKB Demo`](./examples/ckb/): Example for `@joyid/ckb` SDK. -* [`Bitcoin Demo`](./examples/bitcoin/): Example for `@joyid/bitcoin` SDK. -* [`EVM Demo`](./examples/evm/): Example for `@joyid/evm` SDK. -* [`Wagmi Demo`](./examples/wagmi/): Example for `@joyid/wagmi` SDK. -* [`RainbowKit Demo`](./examples/rainbowkit/): Example for `@joyid/rainbowkit` SDK. -* [`nostr Demo`](./examples/nostr/): Example for `@joyid/nostr` SDK. +* [`CKB Demo`](./examples/ckb/): Example for `@joyid/ckb` SDK. [Preview](https://joyid-ckb-demo.vercel.app/) +* [`Bitcoin Demo`](./examples/bitcoin/): Example for `@joyid/bitcoin` SDK. [Preview](https://joyid-bitcoin-demo.vercel.app/) +* [`EVM Demo`](./examples/evm/): Example for `@joyid/evm` SDK. [Preview](https://joyid-evm-demo.vercel.app/) +* [`Wagmi Demo`](./examples/wagmi/): Example for `@joyid/wagmi` SDK. [Preview](https://joyid-wagmi-demo.vercel.app/) +* [`RainbowKit Demo`](./examples/rainbowkit/): Example for `@joyid/rainbowkit` SDK. [Preview](https://joyid-rainbowkit-demo.vercel.app/) +* [`nostr Demo`](./examples/nostr/): Example for `@joyid/nostr` SDK. [Preview](https://docs.joyid.dev/guide/nostr/nip-07#try-it-out) ## Development diff --git a/eslint.config.js b/eslint.config.js index 53cccf7..6f1dbd7 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -22,6 +22,12 @@ export default tseslint.config( 'packages/nostr/dist/**/*', 'packages/rainbowkit/dist/**/*', 'packages/wagmi/dist/**/*', + 'packages/miniapp/dist/**/*', + 'examples/bitcoin-demo/dist/**/*', + 'examples/ckb-demo/dist/**/*', + 'examples/evm-demo/dist/**/*', + 'examples/rainbowkit-demo/dist/**/*', + 'examples/wagmi-demo/dist/**/*', ], }, { diff --git a/examples/bitcoin-demo/vite.config.ts b/examples/bitcoin-demo/vite.config.ts index ea2bfb9..dfeb59d 100644 --- a/examples/bitcoin-demo/vite.config.ts +++ b/examples/bitcoin-demo/vite.config.ts @@ -3,49 +3,20 @@ import { defineConfig } from 'vite' import solidPlugin from 'vite-plugin-solid' import wasm from 'vite-plugin-wasm' import topLevelAwait from 'vite-plugin-top-level-await' -import rollupNodePolyFill from 'rollup-plugin-node-polyfills' -import { NodeGlobalsPolyfillPlugin } from '@esbuild-plugins/node-globals-polyfill' -// import { nodePolyfills } from 'vite-plugin-node-polyfills' -// import WindiCSS from 'vite-plugin-windicss'; +import { nodePolyfills } from 'vite-plugin-node-polyfills' export default defineConfig({ plugins: [ wasm(), topLevelAwait(), solidPlugin(), - // nodePolyfills() + nodePolyfills() ], server: { port: 3000, }, build: { target: 'esnext', - rollupOptions: { - plugins: [ - rollupNodePolyFill(), - // inject({ Buffer: ['buffer/', 'Buffer'] }), - ] as any[], - }, - }, - resolve: { - alias: { - stream: 'stream-browserify', - crypto: 'crypto-browserify', - }, - }, - optimizeDeps: { - esbuildOptions: { - // Node.js global to browser globalThis - define: { - global: 'globalThis', - }, - plugins: [ - NodeGlobalsPolyfillPlugin({ - buffer: true, - }), - ], - // target: ['chrome60', 'firefox60', 'safari11', 'edge18'], - }, }, }) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 69b15db..2739ffb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4789,6 +4789,7 @@ packages: /@humanwhocodes/config-array@0.11.14: resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} engines: {node: '>=10.10.0'} + deprecated: Use @eslint/config-array instead dependencies: '@humanwhocodes/object-schema': 2.0.3 debug: 4.3.4 @@ -4804,6 +4805,7 @@ packages: /@humanwhocodes/object-schema@2.0.3: resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} + deprecated: Use @eslint/object-schema instead dev: true /@humanwhocodes/retry@0.3.0: