From b467aae8324841d3b3d2d55b8e7c42bf892d6240 Mon Sep 17 00:00:00 2001 From: Amin Abromand <34376405+aminabromand@users.noreply.github.com> Date: Sat, 30 Nov 2024 11:50:18 +0100 Subject: [PATCH 1/2] Added react ^19 and ^19.0.0-rc as peer dep Added react ^19 and ^19.0.0-rc as peer dependency. Some projects like Next.js already utilize react 19 release candidate, so that installing react-datepicker can only be done with `--legacy-peer-deps`. I have tested the `react-datepicker` with Next.js and react 19 release candidate and it works. So I have added react ^19 and ^19.0.0-rc as peer dep --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 8b6dc2d21..59a3e388a 100644 --- a/package.json +++ b/package.json @@ -78,8 +78,8 @@ "typescript": "^5.5.4" }, "peerDependencies": { - "react": "^16.9.0 || ^17 || ^18", - "react-dom": "^16.9.0 || ^17 || ^18" + "react": "^16.9.0 || ^17 || ^18 || ^19 || ^19.0.0-rc", + "react-dom": "^16.9.0 || ^17 || ^18 || ^19 || ^19.0.0-rc" }, "dependencies": { "@floating-ui/react": "^0.26.23", From a4bfe9e4e50be967144f11573baf754a6fdde546 Mon Sep 17 00:00:00 2001 From: Amin Abromand <34376405+aminabromand@users.noreply.github.com> Date: Sun, 1 Dec 2024 10:51:18 +0100 Subject: [PATCH 2/2] updated peer dependency in yarn.lock to match package.json --- yarn.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yarn.lock b/yarn.lock index 5afb9328d..5993ab2f0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9333,8 +9333,8 @@ __metadata: tslib: "npm:^2.7.0" typescript: "npm:^5.5.4" peerDependencies: - react: ^16.9.0 || ^17 || ^18 - react-dom: ^16.9.0 || ^17 || ^18 + react: ^16.9.0 || ^17 || ^18 || ^19 || ^19.0.0-rc + react-dom: ^16.9.0 || ^17 || ^18 || ^19 || ^19.0.0-rc languageName: unknown linkType: soft