From 9afe20b917129e7646bb2119f2edc0bd12c5fede Mon Sep 17 00:00:00 2001 From: Adam Kudrna Date: Mon, 29 Jul 2024 16:18:02 +0200 Subject: [PATCH] Restrict React version to 18.2.x to prevent tests from failing due to deprecation warnings Also, remove npm from "engines" as npm is not an engine. --- package-lock.json | 35 +++++++++++++++++++---------------- package.json | 9 +++++---- 2 files changed, 24 insertions(+), 20 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2d8cf11f..c8820ba8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -48,6 +48,8 @@ "postcss": "^8.4.39", "postcss-loader": "^8.1.1", "prop-types": "^15.8.1", + "react": "~18.2.0", + "react-dom": "~18.2.0", "sass": "^1.77.6", "sass-loader": "^14.2.1", "stylelint": "^16.7.0", @@ -58,13 +60,12 @@ "webpack-visualizer-plugin2": "^1.1.0" }, "engines": { - "node": ">=20", - "npm": ">=10" + "node": ">=20" }, "peerDependencies": { "prop-types": "^15.8.0", - "react": "^18.0.0", - "react-dom": "^18.0.0" + "react": "~18.2.0", + "react-dom": "~18.2.0" } }, "node_modules/@adobe/css-tools": { @@ -10398,7 +10399,8 @@ "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true }, "node_modules/js-yaml": { "version": "3.14.1", @@ -10664,6 +10666,7 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dev": true, "dependencies": { "js-tokens": "^3.0.0 || ^4.0.0" }, @@ -12004,10 +12007,10 @@ } }, "node_modules/react": { - "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==", - "peer": true, + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", + "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", + "dev": true, "dependencies": { "loose-envify": "^1.1.0" }, @@ -12016,16 +12019,16 @@ } }, "node_modules/react-dom": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", - "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", - "peer": true, + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz", + "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==", + "dev": true, "dependencies": { "loose-envify": "^1.1.0", - "scheduler": "^0.23.2" + "scheduler": "^0.23.0" }, "peerDependencies": { - "react": "^18.3.1" + "react": "^18.2.0" } }, "node_modules/react-is": { @@ -12436,7 +12439,7 @@ "version": "0.23.2", "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", - "peer": true, + "dev": true, "dependencies": { "loose-envify": "^1.1.0" } diff --git a/package.json b/package.json index 90c0f591..910c9c60 100644 --- a/package.json +++ b/package.json @@ -29,8 +29,7 @@ "url": "https://github.com/react-ui-org/react-ui" }, "engines": { - "node": ">=20", - "npm": ">=10" + "node": ">=20" }, "scripts": { "build": "webpack --mode=production && webpack --mode=development", @@ -54,8 +53,8 @@ }, "peerDependencies": { "prop-types": "^15.8.0", - "react": "^18.0.0", - "react-dom": "^18.0.0" + "react": "~18.2.0", + "react-dom": "~18.2.0" }, "devDependencies": { "@babel/cli": "^7.24.7", @@ -93,6 +92,8 @@ "postcss": "^8.4.39", "postcss-loader": "^8.1.1", "prop-types": "^15.8.1", + "react": "~18.2.0", + "react-dom": "~18.2.0", "sass": "^1.77.6", "sass-loader": "^14.2.1", "stylelint": "^16.7.0",