Skip to content

Commit be483bd

Browse files
authored
Move ethers to peer dependencies (#293)
* Move `ethers` to peer dependencies * Remove `react-dom` from `core` and `hooks`
1 parent b23d01b commit be483bd

File tree

7 files changed

+20
-11
lines changed

7 files changed

+20
-11
lines changed

.changeset/khaki-cobras-laugh.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
'@web3-ui/components': minor
3+
'@web3-ui/hooks': minor
4+
---
5+
6+
!! BREAKING CHANGE !!
7+
`ethers` has been moved to peer dependencies for both the `components` and `hooks` packages. (It was already a peer dependency for `core`)
8+
9+
This means that you will users will now have to install `ethers` along side our packages manually.

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# web3-ui
22

33
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
4+
45
[![All Contributors](https://img.shields.io/badge/all_contributors-29-orange.svg?style=flat-square)](#contributors-)
6+
57
<!-- ALL-CONTRIBUTORS-BADGE:END -->
68

79
_In Development 🏗️_
@@ -19,7 +21,7 @@ A library of UI components specifically crafted for web3 use cases.
1921
1. Install the package
2022

2123
```bash
22-
$ yarn add @web3-ui/core
24+
$ yarn add @web3-ui/core ethers
2325
```
2426

2527
2. Setup the Provider

packages/components/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
A set of React components made for web3-specific use cases. Fully compatible with and built on top of ChakraUI.
44

55
```bash
6-
yarn add @web3-ui/components
6+
yarn add @web3-ui/components ethers
77
```
88

99
## Getting started

packages/components/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@
3838
"@chakra-ui/react": "^1.7.2",
3939
"@emotion/react": "^11",
4040
"@emotion/styled": "^11",
41-
"ethers": "^5.5.2",
4241
"framer-motion": "^4"
4342
},
4443
"peerDependencies": {
45-
"react": "*",
46-
"react-dom": "*"
44+
"react": ">= 16.8.0 | >= 17.0.0",
45+
"react-dom": ">= 16.8.0 | >= 17.0.0",
46+
"ethers": "^5.5.2"
4747
},
4848
"devDependencies": {
4949
"@web3-ui/hooks": "^0.10.0",

packages/core/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@
4444
},
4545
"peerDependencies": {
4646
"ethers": "^5.5.1",
47-
"react": "*",
48-
"react-dom": "*"
47+
"react": ">= 16.8.0 | >= 17.0.0"
4948
},
5049
"devDependencies": {
5150
"@web3-ui/hooks": "^0.10.0",

packages/hooks/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
A set of React hooks developed for web3 use cases.
44

55
```bash
6-
yarn add @web3-ui/hooks
6+
yarn add @web3-ui/hooks ethers
77
```
88

99
## Getting started

packages/hooks/package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,11 @@
3838
"dependencies": {
3939
"@babel/runtime": "^7.16.7",
4040
"@walletconnect/web3-provider": "^1.6.6",
41-
"ethers": "^5.5.1",
4241
"web3modal": "^1.9.4"
4342
},
4443
"peerDependencies": {
45-
"react": ">=16.8.0",
46-
"react-dom": ">=16.8.0"
44+
"react": ">= 16.8.0 | >= 17.0.0",
45+
"ethers": "^5.5.1"
4746
},
4847
"devDependencies": {
4948
"@portis/web3": "^4.0.6",

0 commit comments

Comments
 (0)