From 4f1765c4dd3bf3c512e5d990001529ac9f3c262e Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Sat, 4 May 2024 08:20:26 +0300 Subject: [PATCH] fix: allow react v17 and v18 in peerDependencies and mark them as optional --- package-lock.json | 47 +++++++++++++++++++++++++---------------------- package.json | 16 ++++++++++++---- 2 files changed, 37 insertions(+), 26 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6632962e..c7292a7d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26,15 +26,23 @@ "microbundle": "0.15.1", "npm-run-all2": "^6.2.2", "puppeteer": "^22.13.1", - "react": "^16.14.0", - "react-dom": "^16.14.0", + "react": "^18.3.1", + "react-dom": "^18.3.1", "sirv-cli": "^2.0.2", "size-limit": "^11.1.4", "uvu": "^0.5.6" }, "peerDependencies": { - "react": "^16.8.0", - "react-dom": "^16.8.0" + "react": "^16.8.0 || ^17 || ^18", + "react-dom": "^16.8.0 || ^17 || ^18" + }, + "peerDependenciesMeta": { + "react": { + "optional": true + }, + "react-dom": { + "optional": true + } } }, "node_modules/@ampproject/remapping": { @@ -8660,34 +8668,30 @@ } }, "node_modules/react": { - "version": "16.14.0", - "resolved": "https://registry.npmjs.org/react/-/react-16.14.0.tgz", - "integrity": "sha512-0X2CImDkJGApiAlcf0ODKIneSwBPhqJawOa5wCtKbu7ZECrmS26NvtSILynQ66cgkT/RJ4LidJOc3bUESwmU8g==", + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", + "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", "dev": true, "license": "MIT", "dependencies": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1", - "prop-types": "^15.6.2" + "loose-envify": "^1.1.0" }, "engines": { "node": ">=0.10.0" } }, "node_modules/react-dom": { - "version": "16.14.0", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.14.0.tgz", - "integrity": "sha512-1gCeQXDLoIqMgqD3IO2Ah9bnf0w9kzhwN5q4FGnHZ67hBm9yePzB5JJAIQCc8x3pFnNlwFq4RidZggNAAkzWWw==", + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", + "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", "dev": true, "license": "MIT", "dependencies": { "loose-envify": "^1.1.0", - "object-assign": "^4.1.1", - "prop-types": "^15.6.2", - "scheduler": "^0.19.1" + "scheduler": "^0.23.2" }, "peerDependencies": { - "react": "^16.14.0" + "react": "^18.3.1" } }, "node_modules/react-is": { @@ -9420,14 +9424,13 @@ } }, "node_modules/scheduler": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.19.1.tgz", - "integrity": "sha512-n/zwRWRYSUj0/3g/otKDRPMh6qv2SYMWNq85IEa8iZyAv8od9zDYpGSnpBEjNgcMNq6Scbu5KfIPxNF72R/2EA==", + "version": "0.23.2", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", + "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", "dev": true, "license": "MIT", "dependencies": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1" + "loose-envify": "^1.1.0" } }, "node_modules/semiver": { diff --git a/package.json b/package.json index 249df064..993eb0ff 100644 --- a/package.json +++ b/package.json @@ -48,8 +48,16 @@ "throttles": "^1.0.1" }, "peerDependencies": { - "react": "^16.8.0", - "react-dom": "^16.8.0" + "react": "^16.8.0 || ^17 || ^18", + "react-dom": "^16.8.0 || ^17 || ^18" + }, + "peerDependenciesMeta": { + "react": { + "optional": true + }, + "react-dom": { + "optional": true + } }, "devDependencies": { "@babel/cli": "^7.24.8", @@ -65,8 +73,8 @@ "microbundle": "0.15.1", "npm-run-all2": "^6.2.2", "puppeteer": "^22.13.1", - "react": "^16.14.0", - "react-dom": "^16.14.0", + "react": "^18.3.1", + "react-dom": "^18.3.1", "sirv-cli": "^2.0.2", "size-limit": "^11.1.4", "uvu": "^0.5.6"