From e91f7a4036055982b3ef2cedba998a50ead3316d Mon Sep 17 00:00:00 2001 From: Remco Haszing Date: Wed, 29 Mar 2023 15:16:20 +0200 Subject: [PATCH 1/3] Make @types/react an optional peerDependency of @mdx-js/react MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since `react` is a peerDependency, so should it’s matching type definitions be. However, in order not to bother people not using TypeScript, it’s made optional. --- package-lock.json | 9 +++++++-- packages/react/package.json | 11 ++++++++--- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1e417f2e1..e3d6256e6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19724,8 +19724,7 @@ "version": "2.3.0", "license": "MIT", "dependencies": { - "@types/mdx": "^2.0.0", - "@types/react": ">=16" + "@types/mdx": "^2.0.0" }, "devDependencies": { "@mdx-js/mdx": "^2.0.0", @@ -19739,7 +19738,13 @@ "url": "https://opencollective.com/unified" }, "peerDependencies": { + "@types/react": ">=16", "react": ">=16" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } } }, "packages/react/node_modules/react": { diff --git a/packages/react/package.json b/packages/react/package.json index a9ab4ef6e..0f7c34657 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -41,11 +41,16 @@ "index.js" ], "dependencies": { - "@types/mdx": "^2.0.0", - "@types/react": ">=16" + "@types/mdx": "^2.0.0" }, "peerDependencies": { - "react": ">=16" + "react": ">=16", + "@types/react": ">=16" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } }, "devDependencies": { "@mdx-js/mdx": "^2.0.0", From 7fd84563fd46a9866308b27e59fe29e7c055a65b Mon Sep 17 00:00:00 2001 From: Remco Haszing Date: Thu, 19 Oct 2023 15:02:32 +0200 Subject: [PATCH 2/3] Remove peerDependenciesMeta --- packages/react/package.json | 5 ----- 1 file changed, 5 deletions(-) diff --git a/packages/react/package.json b/packages/react/package.json index c2c5a5e78..26f391d09 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -45,11 +45,6 @@ "react": ">=16", "@types/react": ">=16" }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - }, "devDependencies": {}, "scripts": { "test": "npm run test-coverage", From 1ddd6af4b9fa998836ee669bce7ecf6d5ecb28ee Mon Sep 17 00:00:00 2001 From: Titus Date: Thu, 19 Oct 2023 15:04:05 +0200 Subject: [PATCH 3/3] Update packages/react/package.json Signed-off-by: Titus --- packages/react/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react/package.json b/packages/react/package.json index 26f391d09..03d746b5d 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -42,8 +42,8 @@ "@types/mdx": "^2.0.0" }, "peerDependencies": { - "react": ">=16", - "@types/react": ">=16" + "@types/react": ">=16", + "react": ">=16" }, "devDependencies": {}, "scripts": {