From 2d0a82167ccf083f52b3a1c9b87e7fc9cfcca3ff Mon Sep 17 00:00:00 2001 From: Wojciech Maj Date: Mon, 17 Jul 2023 08:32:28 +0200 Subject: [PATCH] Move @types/react to optional peerDependencies --- package.json | 8 +++++++- test/yarn.lock | 5 ++++- yarn.lock | 4 ++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index dd57558..f0a7350 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,6 @@ }, "license": "MIT", "dependencies": { - "@types/react": "*", "make-cancellable-promise": "^1.3.1", "prop-types": "^15.6.0" }, @@ -39,6 +38,7 @@ "@testing-library/jest-dom": "^5.15.0", "@testing-library/react": "^14.0.0", "@testing-library/user-event": "^14.4.0", + "@types/react": "*", "eslint": "^8.26.0", "eslint-config-wojtekmaj": "^0.9.0", "husky": "^8.0.0", @@ -52,8 +52,14 @@ "vitest": "^0.30.1" }, "peerDependencies": { + "@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0", "react": "^16.8.0 || ^17.0.0 || ^18.0.0" }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + }, "publishConfig": { "access": "public", "provenance": true diff --git a/test/yarn.lock b/test/yarn.lock index d2dba9b..fafabb9 100644 --- a/test/yarn.lock +++ b/test/yarn.lock @@ -656,11 +656,14 @@ __metadata: version: 0.0.0-use.local resolution: "@wojtekmaj/react-async-button@portal:../::locator=react-async-button-test-page%40workspace%3A." dependencies: - "@types/react": "*" make-cancellable-promise: ^1.3.1 prop-types: ^15.6.0 peerDependencies: + "@types/react": ^16.8.0 || ^17.0.0 || ^18.0.0 react: ^16.8.0 || ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + "@types/react": + optional: true languageName: node linkType: soft diff --git a/yarn.lock b/yarn.lock index 5ebe673..67cbf64 100644 --- a/yarn.lock +++ b/yarn.lock @@ -814,7 +814,11 @@ __metadata: typescript: ^5.0.0 vitest: ^0.30.1 peerDependencies: + "@types/react": ^16.8.0 || ^17.0.0 || ^18.0.0 react: ^16.8.0 || ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + "@types/react": + optional: true languageName: unknown linkType: soft -- 2.51.2