From 432f1a448fb45c1a1c3e9d202a63dd5eaa086c7a Mon Sep 17 00:00:00 2001 From: Jungho Bang Date: Thu, 31 Aug 2023 15:36:24 -0400 Subject: [PATCH] fix npm publish (#1000) * README for npm * bump version * sourcemap --- README.md | 97 +----------------- packages/wallet-sdk/README.md | 126 ++++++++++++++++++++++++ packages/wallet-sdk/package.json | 2 +- packages/wallet-sdk/src/version.ts | 2 +- packages/wallet-sdk/tsconfig.build.json | 1 + scripts/release.sh | 3 +- 6 files changed, 132 insertions(+), 99 deletions(-) create mode 100644 packages/wallet-sdk/README.md diff --git a/README.md b/README.md index 2f1d7c68cf..22e0836f7d 100644 --- a/README.md +++ b/README.md @@ -35,97 +35,9 @@ yarn typecheck > The installation package for **Coinbase Wallet SDK** (formerly WalletLink) is now named `@coinbase/wallet-sdk`. -- This readme contains brief instructions to get up and running. +- This [readme](/packages/wallet-sdk/README.md) contains brief instructions to get up and running. - Visit our [public developer docs](https://docs.cloud.coinbase.com/wallet-sdk/docs) for more detail, including samples for integrating Coinbase Wallet using libraries like [web3-react](https://github.com/Uniswap/web3-react), [web3modal](https://github.com/Web3Modal/web3modal), [Web3-Onboard](https://docs.blocknative.com/onboard), and [wagmi](https://wagmi.sh/). -### Installing Wallet SDK - -Install Coinbase Wallet SDK with yarn or npm. - -#### Yarn - -1. Check available versions of Wallet SDK. - -```shell -yarn info @coinbase/wallet-sdk versions -``` - -2. Install a specific version or the latest version. - -```shell -#yarn add @coinbase/wallet-sdk@3.0.0 -yarn add @coinbase/wallet-sdk -``` - -3. Check your installed version. - -```shell -yarn list @coinbase/wallet-sdk -``` - -#### Npm - -1. Check available versions of Wallet SDK. - -```shell -npm view @coinbase/wallet-sdk versions -``` - -2. Install a specific version or the latest version. - -```shell -#npm install @coinbase/wallet-sdk@3.0.0 -npm install @coinbase/wallet-sdk -``` - -3. Check your installed version. - -```shell -npm list @coinbase/wallet-sdk -``` - -### Upgrading Wallet SDK - -Upgrade Coinbase Wallet SDK with yarn or npm. - -#### Yarn - -1. Compare your installed version of Coinbase Wallet SDK with the latest available version. - -```shell -yarn outdated @coinbase/wallet-sdk -``` - -2. Update Coinbase Wallet SDK to the latest. - -```shell -yarn upgrade @coinbase/wallet-sdk --latest -``` - -#### Npm - -1. Compare your installed version of Coinbase Wallet SDK with the latest available version. - -```shell -npm outdated @coinbase/wallet-sdk -``` - -2. If necessary, update `package.json` with the latest major version. - -```shell -{ - "dependencies": { - "@coinbase/wallet-sdk": "^3.0.0" - } -} -``` - -3. Update Coinbase Wallet SDK to the latest available version. - -```shell -npm update @coinbase/wallet-sdk -``` - ## Libraries using Coinbase Wallet SDK - [blocknative/onboard](https://github.com/blocknative/onboard) @@ -148,10 +60,3 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ``` - -## Attributions - -- [eth-json-rpc-filters](https://github.com/MetaMask/eth-json-rpc-filters/blob/main/LICENSE) under the ISC license -- [@metamask/json-rpc-engine](https://github.com/MetaMask/json-rpc-engine/blob/main/LICENSE) under the ISC license -- [eth-rpc-errors](https://github.com/MetaMask/eth-rpc-errors/blob/main/LICENSE) under the MIT license -- [eth-block-tracker](https://github.com/MetaMask/eth-block-tracker/blob/master/LICENSE) under the MIT license diff --git a/packages/wallet-sdk/README.md b/packages/wallet-sdk/README.md new file mode 100644 index 0000000000..d80e030c8a --- /dev/null +++ b/packages/wallet-sdk/README.md @@ -0,0 +1,126 @@ +# Coinbase Wallet SDK + +Coinbase Wallet SDK lets developers connect their dapps to Coinbase Wallet +on both mobile web (for iOS and Android) and desktop: + +- **Mobile**: Users can connect to your mobile web dapp through a deeplink to the dapp browser in [Coinbase Wallet Mobile App](https://coinbase-wallet.onelink.me/q5Sx/fdb9b250). + +- **Desktop**: Users can connect to your desktop app with a QR code in the [Coinbase Wallet Mobile App](https://coinbase-wallet.onelink.me/q5Sx/fdb9b250) or with the [Coinbase Wallet Chrome Extension](https://coinbase-wallet.onelink.me/q5Sx/fdb9b250). + +## Installing and Upgrading + +> The installation package for **Coinbase Wallet SDK** (formerly WalletLink) is now named `@coinbase/wallet-sdk`. + +- This readme contains brief instructions to get up and running. +- Visit our [public developer docs](https://docs.cloud.coinbase.com/wallet-sdk/docs) for more detail, including samples for integrating Coinbase Wallet using libraries like [web3-react](https://github.com/Uniswap/web3-react), [web3modal](https://github.com/Web3Modal/web3modal), [Web3-Onboard](https://docs.blocknative.com/onboard), and [wagmi](https://wagmi.sh/). + +### Installing Wallet SDK + +Install Coinbase Wallet SDK with yarn or npm. + +#### Yarn + +1. Check available versions of Wallet SDK. + +```shell +yarn info @coinbase/wallet-sdk versions +``` + +2. Install a specific version or the latest version. + +```shell +#yarn add @coinbase/wallet-sdk@3.0.0 +yarn add @coinbase/wallet-sdk +``` + +3. Check your installed version. + +```shell +yarn list @coinbase/wallet-sdk +``` + +#### Npm + +1. Check available versions of Wallet SDK. + +```shell +npm view @coinbase/wallet-sdk versions +``` + +2. Install a specific version or the latest version. + +```shell +#npm install @coinbase/wallet-sdk@3.0.0 +npm install @coinbase/wallet-sdk +``` + +3. Check your installed version. + +```shell +npm list @coinbase/wallet-sdk +``` + +### Upgrading Wallet SDK + +Upgrade Coinbase Wallet SDK with yarn or npm. + +#### Yarn + +1. Compare your installed version of Coinbase Wallet SDK with the latest available version. + +```shell +yarn outdated @coinbase/wallet-sdk +``` + +2. Update Coinbase Wallet SDK to the latest. + +```shell +yarn upgrade @coinbase/wallet-sdk --latest +``` + +#### Npm + +1. Compare your installed version of Coinbase Wallet SDK with the latest available version. + +```shell +npm outdated @coinbase/wallet-sdk +``` + +2. If necessary, update `package.json` with the latest major version. + +```shell +{ + "dependencies": { + "@coinbase/wallet-sdk": "^3.0.0" + } +} +``` + +3. Update Coinbase Wallet SDK to the latest available version. + +```shell +npm update @coinbase/wallet-sdk +``` + +## Attributions + +- [eth-json-rpc-filters](https://github.com/MetaMask/eth-json-rpc-filters/blob/main/LICENSE) under the ISC license +- [@metamask/json-rpc-engine](https://github.com/MetaMask/json-rpc-engine/blob/main/LICENSE) under the ISC license +- [eth-rpc-errors](https://github.com/MetaMask/eth-rpc-errors/blob/main/LICENSE) under the MIT license +- [eth-block-tracker](https://github.com/MetaMask/eth-block-tracker/blob/master/LICENSE) under the MIT license + +``` +Copyright © 2018-2023 Coinbase, Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +``` diff --git a/packages/wallet-sdk/package.json b/packages/wallet-sdk/package.json index c32240804a..648c2f181c 100644 --- a/packages/wallet-sdk/package.json +++ b/packages/wallet-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@coinbase/wallet-sdk", - "version": "3.9.0-canary.0", + "version": "3.9.0-canary.2", "description": "Coinbase Wallet JavaScript SDK", "keywords": [ "cipher", diff --git a/packages/wallet-sdk/src/version.ts b/packages/wallet-sdk/src/version.ts index 772235a083..98c325e866 100644 --- a/packages/wallet-sdk/src/version.ts +++ b/packages/wallet-sdk/src/version.ts @@ -1 +1 @@ -export const LIB_VERSION = '3.9.0-canary.0'; +export const LIB_VERSION = '3.9.0-canary.2'; diff --git a/packages/wallet-sdk/tsconfig.build.json b/packages/wallet-sdk/tsconfig.build.json index bf6cdb8350..fb439a2b7e 100644 --- a/packages/wallet-sdk/tsconfig.build.json +++ b/packages/wallet-sdk/tsconfig.build.json @@ -6,6 +6,7 @@ "target": "es2017", "jsx": "react", "jsxFactory": "h", + "sourceMap": false, }, "include": ["src"], "exclude": ["dist", "build", "**/*.test.*"] diff --git a/scripts/release.sh b/scripts/release.sh index 1977ab6ebb..235bd4f364 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -23,8 +23,9 @@ if [ $branch == $mainBranch ]; then echo "=================================================" echo -e "rm -rf ./node_modules" rm -rf ./node_modules + rm -rf ./packages/wallet-sdk/node_modules echo -e "rm -rf ./dist" - rm -rf ./dist + rm -rf ./packages/wallet-sdk/dist echo -e "yarn install" yarn install echo -e "yarn workspace @coinbase/wallet-sdk build"