From d09716c864fa6413b0d79d151913661c4a2b6ff3 Mon Sep 17 00:00:00 2001 From: Syed Ali Abbas Zaidi <88369802+Syed-Ali-Abbas-Zaidi@users.noreply.github.com> Date: Tue, 12 Sep 2023 22:44:30 +0500 Subject: [PATCH] feat: upgrade react router to v6 (#90) * feat: upgrade react router to v6 * chore: update peer deps --- package-lock.json | 98 ++++++++++++++++++----------------------------- package.json | 12 +++--- 2 files changed, 44 insertions(+), 66 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6dcb3dcd..6542d520 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,7 +19,7 @@ }, "devDependencies": { "@edx/frontend-build": "12.8.16", - "@edx/frontend-platform": "4.6.0", + "@edx/frontend-platform": "5.0.0", "@edx/paragon": "20.44.0", "@edx/reactifex": "^2.1.1", "@reduxjs/toolkit": "^1.5.1", @@ -36,22 +36,22 @@ "react-dom": "17.0.2", "react-intl": "^5.25.0", "react-redux": "^7.2.9", - "react-router": "5.1.2", - "react-router-dom": "5.1.2", + "react-router": "6.15.0", + "react-router-dom": "6.15.0", "redux": "4.0.5", "rosie": "2.0.1", "semantic-release": "^20.1.3" }, "peerDependencies": { - "@edx/frontend-platform": "^4.2.0", + "@edx/frontend-platform": "^4.2.0 || ^5.0.0", "@edx/paragon": "^19.4.1 || ^20.22.4", "@reduxjs/toolkit": "^1.5.1", "prop-types": "^15.7.2", "react": "^16.14.0 || ^17.0.0", "react-dom": "^16.14.0 || ^17.0.0", "react-redux": "^7.1.3", - "react-router": "^5.1.2", - "react-router-dom": "^5.1.2", + "react-router": "^5.1.2 || ^6.0.0", + "react-router-dom": "^5.1.2 || ^6.0.0", "redux": "^4.0.5" } }, @@ -2173,9 +2173,9 @@ } }, "node_modules/@edx/frontend-platform": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/@edx/frontend-platform/-/frontend-platform-4.6.0.tgz", - "integrity": "sha512-NZ1I3BgUZl7bqvDwSnnL+LxqZOdOUGZU55KiwvknqiKU8RS5Lx9tc4arp+NcX1u58xy/Xbinv+mriSO6PPxQNQ==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@edx/frontend-platform/-/frontend-platform-5.0.0.tgz", + "integrity": "sha512-DD9/B4rnC3BKPiWlbEFF1JIYFbWC6vUBKTyN8sf4khi4DNhhWhsobk+iNeCWNzF9UgCPRbniIqesdV1F9NXNZw==", "dev": true, "dependencies": { "@cospired/i18n-iso-languages": "4.1.0", @@ -2203,13 +2203,13 @@ "transifex-utils.js": "i18n/scripts/transifex-utils.js" }, "peerDependencies": { - "@edx/frontend-build": ">= 8.1.0", + "@edx/frontend-build": ">= 8.1.0 || ^12.9.0-alpha.1", "@edx/paragon": ">= 10.0.0 < 21.0.0", "prop-types": "^15.7.2", "react": "^16.9.0 || ^17.0.0", "react-dom": "^16.9.0 || ^17.0.0", "react-redux": "^7.1.1", - "react-router-dom": "^5.0.1", + "react-router-dom": "^6.0.0", "redux": "^4.0.4" } }, @@ -4477,6 +4477,15 @@ "@babel/runtime": "^7.9.2" } }, + "node_modules/@remix-run/router": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.8.0.tgz", + "integrity": "sha512-mrfKqIHnSZRyIzBcanNJmVQELTnX+qagEDlcKO90RgRBVOZGSGvZKeDihTRfWcqoDn5N/NkUcwWTccnpN18Tfg==", + "dev": true, + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/@restart/context": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/@restart/context/-/context-2.1.4.tgz", @@ -17864,21 +17873,6 @@ "node": ">=4" } }, - "node_modules/mini-create-react-context": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/mini-create-react-context/-/mini-create-react-context-0.3.3.tgz", - "integrity": "sha512-TtF6hZE59SGmS4U8529qB+jJFeW6asTLDIpPgvPLSCsooAwJS7QprHIFTqv9/Qh3NdLwQxFYgiHX5lqb6jqzPA==", - "deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.", - "dev": true, - "dependencies": { - "@babel/runtime": "^7.12.1", - "tiny-warning": "^1.0.3" - }, - "peerDependencies": { - "prop-types": "^15.0.0", - "react": "^0.14.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" - } - }, "node_modules/mini-css-extract-plugin": { "version": "1.6.2", "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-1.6.2.tgz", @@ -21603,15 +21597,6 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, - "node_modules/path-to-regexp": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", - "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", - "dev": true, - "dependencies": { - "isarray": "0.0.1" - } - }, "node_modules/path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", @@ -23723,42 +23708,35 @@ } }, "node_modules/react-router": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/react-router/-/react-router-5.1.2.tgz", - "integrity": "sha512-yjEuMFy1ONK246B+rsa0cUam5OeAQ8pyclRDgpxuSCrAlJ1qN9uZ5IgyKC7gQg0w8OM50NXHEegPh/ks9YuR2A==", + "version": "6.15.0", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.15.0.tgz", + "integrity": "sha512-NIytlzvzLwJkCQj2HLefmeakxxWHWAP+02EGqWEZy+DgfHHKQMUoBBjUQLOtFInBMhWtb3hiUy6MfFgwLjXhqg==", "dev": true, "dependencies": { - "@babel/runtime": "^7.1.2", - "history": "^4.9.0", - "hoist-non-react-statics": "^3.1.0", - "loose-envify": "^1.3.1", - "mini-create-react-context": "^0.3.0", - "path-to-regexp": "^1.7.0", - "prop-types": "^15.6.2", - "react-is": "^16.6.0", - "tiny-invariant": "^1.0.2", - "tiny-warning": "^1.0.0" + "@remix-run/router": "1.8.0" + }, + "engines": { + "node": ">=14.0.0" }, "peerDependencies": { - "react": ">=15" + "react": ">=16.8" } }, "node_modules/react-router-dom": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-5.1.2.tgz", - "integrity": "sha512-7BPHAaIwWpZS074UKaw1FjVdZBSVWEk8IuDXdB+OkLb8vd/WRQIpA4ag9WQk61aEfQs47wHyjWUoUGGZxpQXew==", + "version": "6.15.0", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.15.0.tgz", + "integrity": "sha512-aR42t0fs7brintwBGAv2+mGlCtgtFQeOzK0BM1/OiqEzRejOZtpMZepvgkscpMUnKb8YO84G7s3LsHnnDNonbQ==", "dev": true, "dependencies": { - "@babel/runtime": "^7.1.2", - "history": "^4.9.0", - "loose-envify": "^1.3.1", - "prop-types": "^15.6.2", - "react-router": "5.1.2", - "tiny-invariant": "^1.0.2", - "tiny-warning": "^1.0.0" + "@remix-run/router": "1.8.0", + "react-router": "6.15.0" + }, + "engines": { + "node": ">=14.0.0" }, "peerDependencies": { - "react": ">=15" + "react": ">=16.8", + "react-dom": ">=16.8" } }, "node_modules/react-style-singleton": { diff --git a/package.json b/package.json index 9d4423b4..a0904ea6 100644 --- a/package.json +++ b/package.json @@ -53,20 +53,20 @@ "eventemitter3": "^4.0.7" }, "peerDependencies": { - "@edx/frontend-platform": "^4.2.0", + "@edx/frontend-platform": "^4.2.0 || ^5.0.0", "@edx/paragon": "^19.4.1 || ^20.22.4", "@reduxjs/toolkit": "^1.5.1", "prop-types": "^15.7.2", "react": "^16.14.0 || ^17.0.0", "react-dom": "^16.14.0 || ^17.0.0", "react-redux": "^7.1.3", - "react-router": "^5.1.2", - "react-router-dom": "^5.1.2", + "react-router": "^5.1.2 || ^6.0.0", + "react-router-dom": "^5.1.2 || ^6.0.0", "redux": "^4.0.5" }, "devDependencies": { "@edx/frontend-build": "12.8.16", - "@edx/frontend-platform": "4.6.0", + "@edx/frontend-platform": "5.0.0", "@edx/paragon": "20.44.0", "@edx/reactifex": "^2.1.1", "@reduxjs/toolkit": "^1.5.1", @@ -83,8 +83,8 @@ "react-dom": "17.0.2", "react-intl": "^5.25.0", "react-redux": "^7.2.9", - "react-router": "5.1.2", - "react-router-dom": "5.1.2", + "react-router": "6.15.0", + "react-router-dom": "6.15.0", "redux": "4.0.5", "rosie": "2.0.1", "semantic-release": "^20.1.3"