Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Move @testing-library/dom and @types/react-dom to peer dependencies #1305

Merged
merged 4 commits into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat!: move dtl to peerDeps
commit 2fa5eac
Author: Matan Borenkraout <matanbobi@gmail.com>
Date:   Wed Apr 24 11:06:27 2024 +0300

    fix formatting

commit 7a07982
Author: Matan Borenkraout <matanbobi@gmail.com>
Date:   Wed Apr 24 09:14:25 2024 +0300

    feat!: move dtl to peerDeps
  • Loading branch information
eps1lon committed Apr 26, 2024
commit c4b764e737134f98ac96b5dc608e69d9500a4dbb
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,21 +97,24 @@ primary guiding principle is:
## Installation

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

```
npm install --save-dev @testing-library/react
npm install --save-dev @testing-library/react @testing-library/dom
```

or

for installation via [yarn][yarn]

```
yarn add --dev @testing-library/react
yarn add --dev @testing-library/react @testing-library/dom
```

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

_React Testing Library versions 13+ require React v18. If your project uses an
older version of React, be sure to install version 12:_
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@
"author": "Kent C. Dodds <me@kentcdodds.com> (https://kentcdodds.com)",
"license": "MIT",
"dependencies": {
"@babel/runtime": "^7.12.5",
"@testing-library/dom": "^10.0.0"
"@babel/runtime": "^7.12.5"
},
"devDependencies": {
"@types/react-dom": "^18.2.25",
"@testing-library/dom": "^10.0.0",
"@testing-library/jest-dom": "^5.11.6",
"@types/react-dom": "^18.2.25",
"chalk": "^4.1.2",
"dotenv-cli": "^4.0.0",
"jest-diff": "^29.7.0",
Expand All @@ -62,6 +62,7 @@
"typescript": "^4.1.2"
},
"peerDependencies": {
"@testing-library/dom": "^10.0.0",
"@types/react-dom": "^18.0.0",
"react": "^18.0.0",
"react-dom": "^18.0.0"
Expand Down