Skip to content

Commit 7a07982

Browse files
committed
feat!: move dtl to peerDeps
1 parent 48282c2 commit 7a07982

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

README.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -97,21 +97,22 @@ 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 `@testing-library/dom`:
101102

102103
```
103-
npm install --save-dev @testing-library/react
104+
npm install --save-dev @testing-library/react @testing-library/dom
104105
```
105106

106107
or
107108

108109
for installation via [yarn][yarn]
109110

110111
```
111-
yarn add --dev @testing-library/react
112+
yarn add --dev @testing-library/react @testing-library/dom
112113
```
113114

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

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

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@
4646
"license": "MIT",
4747
"dependencies": {
4848
"@babel/runtime": "^7.12.5",
49-
"@testing-library/dom": "^10.0.0",
5049
"@types/react-dom": "^18.0.0"
5150
},
5251
"devDependencies": {
52+
"@testing-library/dom": "^10.0.0",
5353
"@testing-library/jest-dom": "^5.11.6",
5454
"chalk": "^4.1.2",
5555
"dotenv-cli": "^4.0.0",
@@ -62,6 +62,7 @@
6262
"typescript": "^4.1.2"
6363
},
6464
"peerDependencies": {
65+
"@testing-library/dom": "^10.0.0",
6566
"react": "^18.0.0",
6667
"react-dom": "^18.0.0"
6768
},

0 commit comments

Comments
 (0)