Skip to content

Commit c4b764e

Browse files
committed
feat!: move dtl to peerDeps
commit 2fa5eac Author: Matan Borenkraout <[email protected]> Date: Wed Apr 24 11:06:27 2024 +0300 fix formatting commit 7a07982 Author: Matan Borenkraout <[email protected]> Date: Wed Apr 24 09:14:25 2024 +0300 feat!: move dtl to peerDeps
1 parent 9e34b45 commit c4b764e

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

README.md

+7-4
Original file line numberDiff line numberDiff line change
@@ -97,21 +97,24 @@ primary guiding principle is:
9797
## Installation
9898

9999
This module is distributed via [npm][npm] which is bundled with [node][node] and
100-
should be installed as one of your project's `devDependencies`:
100+
should be installed as one of your project's `devDependencies`.
101+
Starting from RTL version 16, you'll also need to install
102+
`@testing-library/dom`:
101103

102104
```
103-
npm install --save-dev @testing-library/react
105+
npm install --save-dev @testing-library/react @testing-library/dom
104106
```
105107

106108
or
107109

108110
for installation via [yarn][yarn]
109111

110112
```
111-
yarn add --dev @testing-library/react
113+
yarn add --dev @testing-library/react @testing-library/dom
112114
```
113115

114-
This library has `peerDependencies` listings for `react` and `react-dom`.
116+
This library has `peerDependencies` listings for `react`, `react-dom` and
117+
starting from RTL version 16 also `@testing-library/dom`.
115118

116119
_React Testing Library versions 13+ require React v18. If your project uses an
117120
older version of React, be sure to install version 12:_

package.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@
4545
"author": "Kent C. Dodds <[email protected]> (https://kentcdodds.com)",
4646
"license": "MIT",
4747
"dependencies": {
48-
"@babel/runtime": "^7.12.5",
49-
"@testing-library/dom": "^10.0.0"
48+
"@babel/runtime": "^7.12.5"
5049
},
5150
"devDependencies": {
52-
"@types/react-dom": "^18.2.25",
51+
"@testing-library/dom": "^10.0.0",
5352
"@testing-library/jest-dom": "^5.11.6",
53+
"@types/react-dom": "^18.2.25",
5454
"chalk": "^4.1.2",
5555
"dotenv-cli": "^4.0.0",
5656
"jest-diff": "^29.7.0",
@@ -62,6 +62,7 @@
6262
"typescript": "^4.1.2"
6363
},
6464
"peerDependencies": {
65+
"@testing-library/dom": "^10.0.0",
6566
"@types/react-dom": "^18.0.0",
6667
"react": "^18.0.0",
6768
"react-dom": "^18.0.0"

0 commit comments

Comments
 (0)