-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Move
@testing-library/dom
and @types/react-dom
to peer depe…
…ndencies (#1305) BREAKING CHANGE: `@testing-library/dom` was moved to a peer dependency and needs to be explicitly installed. This reduces the chance of having conflicting versions of `@testing-library/dom` installed that frequently caused bugs when used with `@testing-library/user-event`. We will also be able to allow new versions of `@testing-library/dom` being used without a SemVer major release of `@testing-library/react` by just widening the peer dependency. `@types/react-dom` needs to be installed if you're typechecking files using `@testing-library/react`. Co-authored-by: Matan Borenkraout <[email protected]>
- Loading branch information
Showing
2 changed files
with
15 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,13 +45,13 @@ | |
"author": "Kent C. Dodds <[email protected]> (https://kentcdodds.com)", | ||
"license": "MIT", | ||
"dependencies": { | ||
"@babel/runtime": "^7.12.5", | ||
"@testing-library/dom": "^10.0.0", | ||
"@types/react-dom": "^18.0.0" | ||
"@babel/runtime": "^7.12.5" | ||
}, | ||
"devDependencies": { | ||
"@testing-library/dom": "^10.0.0", | ||
"@testing-library/jest-dom": "^5.11.6", | ||
"@types/react": "^18.3.1", | ||
"@types/react-dom": "^18.3.0", | ||
"chalk": "^4.1.2", | ||
"dotenv-cli": "^4.0.0", | ||
"jest-diff": "^29.7.0", | ||
|
@@ -63,13 +63,18 @@ | |
"typescript": "^4.1.2" | ||
}, | ||
"peerDependencies": { | ||
"@testing-library/dom": "^10.0.0", | ||
"@types/react": "^18.0.0", | ||
"@types/react-dom": "^18.0.0", | ||
"react": "^18.0.0", | ||
"react-dom": "^18.0.0" | ||
}, | ||
"peerDependenciesMeta": { | ||
"@types/react": { | ||
"optional": true | ||
}, | ||
"@types/react-dom": { | ||
"optional": true | ||
} | ||
}, | ||
"eslintConfig": { | ||
|