From 7a07982822e25ceb29d91110be5076805bff9299 Mon Sep 17 00:00:00 2001 From: Matan Borenkraout Date: Wed, 24 Apr 2024 09:14:25 +0300 Subject: [PATCH 1/2] feat!: move dtl to peerDeps --- README.md | 9 +++++---- package.json | 3 ++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 85613475..2951841f 100644 --- a/README.md +++ b/README.md @@ -97,10 +97,11 @@ 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 @@ -108,10 +109,10 @@ 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:_ diff --git a/package.json b/package.json index 9483256a..bbb4659e 100644 --- a/package.json +++ b/package.json @@ -46,10 +46,10 @@ "license": "MIT", "dependencies": { "@babel/runtime": "^7.12.5", - "@testing-library/dom": "^10.0.0", "@types/react-dom": "^18.0.0" }, "devDependencies": { + "@testing-library/dom": "^10.0.0", "@testing-library/jest-dom": "^5.11.6", "chalk": "^4.1.2", "dotenv-cli": "^4.0.0", @@ -62,6 +62,7 @@ "typescript": "^4.1.2" }, "peerDependencies": { + "@testing-library/dom": "^10.0.0", "react": "^18.0.0", "react-dom": "^18.0.0" }, From 2fa5eac17254b5bfb94cb510cba22b665c234ebf Mon Sep 17 00:00:00 2001 From: Matan Borenkraout Date: Wed, 24 Apr 2024 11:06:27 +0300 Subject: [PATCH 2/2] fix formatting --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2951841f..bffa75a5 100644 --- a/README.md +++ b/README.md @@ -98,7 +98,8 @@ primary guiding principle is: This module is distributed via [npm][npm] which is bundled with [node][node] and should be installed as one of your project's `devDependencies`. -Starting from RTL version 16, you'll also need to install `@testing-library/dom`: +Starting from RTL version 16, you'll also need to install +`@testing-library/dom`: ``` npm install --save-dev @testing-library/react @testing-library/dom @@ -112,7 +113,8 @@ for installation via [yarn][yarn] yarn add --dev @testing-library/react @testing-library/dom ``` -This library has `peerDependencies` listings for `react`, `react-dom` and starting from RTL version 16 also `@testing-library/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:_