Skip to content

Commit

Permalink
fix(deps): update dependency react-router-dom to v6 (#337)
Browse files Browse the repository at this point in the history
* fix(deps): update dependency react-router-dom to v6

* fix(template-bod): rectify broken router APIs

* fix(template-bod): remove redundant types packages

* chore(deps): remove redundant types packages

* chore(website-deps): remove redundant dependencies

* chore(website): skip tsc type check due to react-router-dom conflicts

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: sabertazimi <sabertazimi@gmail.com>
  • Loading branch information
3 people committed Nov 7, 2021
1 parent 8623a63 commit 96488b4
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 33 deletions.
4 changes: 1 addition & 3 deletions packages/cra-template-bod/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-redux": "^7.2.6",
"react-router-dom": "^5.3.0",
"react-router-dom": "^6.0.1",
"web-vitals": "^2.1.2"
},
"devDependencies": {
Expand All @@ -58,8 +58,6 @@
"@types/node": "^16.11.6",
"@types/react": "^17.0.34",
"@types/react-dom": "^17.0.11",
"@types/react-redux": "^7.1.20",
"@types/react-router-dom": "^5.3.2",
"@types/react-test-renderer": "^17.0.1",
"react-test-renderer": "^17.0.2",
"typescript": "^4.4.4"
Expand Down
10 changes: 4 additions & 6 deletions packages/cra-template-bod/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Route, Switch } from 'react-router-dom';
import { Route, Routes } from 'react-router-dom';
import './App.css';
import { Counter } from './containers';
import logo from './logo.svg';
Expand All @@ -9,11 +9,9 @@ const App = (): JSX.Element => {
<div className="text-center bg-white">
<header className="app-header">
<img src={logo} className="app-logo" alt="logo" />
<Switch>
<Route path="/">
<Counter />
</Route>
</Switch>
<Routes>
<Route path="/" element={<Counter />} />
</Routes>
<p>
Edit <code>src/App.tsx</code> and save to reload.
</p>
Expand Down
9 changes: 1 addition & 8 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
"build:docs": "docusaurus build && yarn build:post",
"build:post": "cp -fr build ../",
"clear": "docusaurus clear",
"lint": "yarn lint:style && yarn lint:type-check",
"lint:style": "eslint --ext .ts,.tsx ./src && stylelint ./src/**/*.css",
"lint:type-check": "tsc --noEmit",
"lint": "eslint --ext .ts,.tsx ./src && stylelint ./src/**/*.css",
"serve": "docusaurus serve",
"start": "docusaurus start"
},
Expand All @@ -27,18 +25,13 @@
"@docusaurus/core": "2.0.0-beta.9",
"@docusaurus/preset-classic": "2.0.0-beta.9",
"@easyops-cn/docusaurus-search-local": "^0.19.1",
"clsx": "^1.1.1",
"react": "^17.0.2",
"react-dom": "^17.0.2"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "2.0.0-beta.9",
"@tsconfig/docusaurus": "^1.0.4",
"@types/react": "^17.0.34",
"@types/react-helmet": "^6.1.4",
"@types/react-router-dom": "^5.3.2",
"nodejieba": "^2.5.2",
"prism-react-renderer": "^1.2.1",
"typescript": "^4.4.4"
}
}
5 changes: 4 additions & 1 deletion website/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"extends": "@tsconfig/docusaurus/tsconfig.json",
"include": ["src/"]
"include": ["src/"],
"compilerOptions": {
"skipLibCheck": true
}
}
56 changes: 41 additions & 15 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1619,12 +1619,12 @@ __metadata:
languageName: node
linkType: hard

"@babel/runtime@npm:^7.1.2, @babel/runtime@npm:^7.10.2, @babel/runtime@npm:^7.10.3, @babel/runtime@npm:^7.11.2, @babel/runtime@npm:^7.12.1, @babel/runtime@npm:^7.12.13, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.14.5, @babel/runtime@npm:^7.15.4, @babel/runtime@npm:^7.8.4, @babel/runtime@npm:^7.9.2":
version: 7.15.4
resolution: "@babel/runtime@npm:7.15.4"
"@babel/runtime@npm:^7.1.2, @babel/runtime@npm:^7.10.2, @babel/runtime@npm:^7.10.3, @babel/runtime@npm:^7.11.2, @babel/runtime@npm:^7.12.1, @babel/runtime@npm:^7.12.13, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.14.5, @babel/runtime@npm:^7.15.4, @babel/runtime@npm:^7.7.6, @babel/runtime@npm:^7.8.4, @babel/runtime@npm:^7.9.2":
version: 7.16.0
resolution: "@babel/runtime@npm:7.16.0"
dependencies:
regenerator-runtime: ^0.13.4
checksum: c40825430400e47c19b97e4142d5315d2910305b9714d44a711472587ee2fd4521fdba5f02ddd9df3902f5e988d9854fa83f4da1e0c091f70f6983fa52480606
checksum: bfbca3ec52c94de262a3932473bceeead1a088b50194108fa1ff6eda447333f0f7d43fa4e9c5937c6e5d45bf838da8480905d0a227589b257c51f954ea060bac
languageName: node
linkType: hard

Expand Down Expand Up @@ -4610,7 +4610,7 @@ __metadata:
languageName: node
linkType: hard

"@types/react-helmet@npm:*, @types/react-helmet@npm:^6.1.4":
"@types/react-helmet@npm:*":
version: 6.1.4
resolution: "@types/react-helmet@npm:6.1.4"
dependencies:
Expand Down Expand Up @@ -4642,7 +4642,7 @@ __metadata:
languageName: node
linkType: hard

"@types/react-router-dom@npm:*, @types/react-router-dom@npm:^5.3.2":
"@types/react-router-dom@npm:*":
version: 5.3.2
resolution: "@types/react-router-dom@npm:5.3.2"
dependencies:
Expand Down Expand Up @@ -6174,12 +6174,7 @@ __metadata:
"@docusaurus/preset-classic": 2.0.0-beta.9
"@easyops-cn/docusaurus-search-local": ^0.19.1
"@tsconfig/docusaurus": ^1.0.4
"@types/react": ^17.0.34
"@types/react-helmet": ^6.1.4
"@types/react-router-dom": ^5.3.2
clsx: ^1.1.1
nodejieba: ^2.5.2
prism-react-renderer: ^1.2.1
react: ^17.0.2
react-dom: ^17.0.2
typescript: ^4.4.4
Expand Down Expand Up @@ -7469,13 +7464,11 @@ __metadata:
"@types/node": ^16.11.6
"@types/react": ^17.0.34
"@types/react-dom": ^17.0.11
"@types/react-redux": ^7.1.20
"@types/react-router-dom": ^5.3.2
"@types/react-test-renderer": ^17.0.1
react: ^17.0.2
react-dom: ^17.0.2
react-redux: ^7.2.6
react-router-dom: ^5.3.0
react-router-dom: ^6.0.1
react-test-renderer: ^17.0.2
typescript: ^4.4.4
web-vitals: ^2.1.2
Expand Down Expand Up @@ -10793,6 +10786,15 @@ __metadata:
languageName: node
linkType: hard

"history@npm:^5.1.0":
version: 5.1.0
resolution: "history@npm:5.1.0"
dependencies:
"@babel/runtime": ^7.7.6
checksum: c978710a188ee5ad5d2acf55721c77e27469578c891a66311e71e8920d1390d14476e39a6db07e0ab0f5f8d594f1f62eb55a1059c7549cde7795a36367df5869
languageName: node
linkType: hard

"hoist-non-react-statics@npm:^3.1.0, hoist-non-react-statics@npm:^3.3.0, hoist-non-react-statics@npm:^3.3.2":
version: 3.3.2
resolution: "hoist-non-react-statics@npm:3.3.2"
Expand Down Expand Up @@ -17093,7 +17095,7 @@ __metadata:
languageName: node
linkType: hard

"react-router-dom@npm:^5.2.0, react-router-dom@npm:^5.3.0":
"react-router-dom@npm:^5.2.0":
version: 5.3.0
resolution: "react-router-dom@npm:5.3.0"
dependencies:
Expand All @@ -17110,6 +17112,19 @@ __metadata:
languageName: node
linkType: hard

"react-router-dom@npm:^6.0.1":
version: 6.0.1
resolution: "react-router-dom@npm:6.0.1"
dependencies:
history: ^5.1.0
react-router: 6.0.1
peerDependencies:
react: ">=16.8"
react-dom: ">=16.8"
checksum: cc2d80536f4a02b8fcef826185ad0acb5d66245e9fb89345d54ec0eaea73eb4ff809cbf68ebb1ac8c3de15cbe45f539d7879cc2d3ed4a76c8c42a602dece71b0
languageName: node
linkType: hard

"react-router@npm:5.2.1, react-router@npm:^5.2.0":
version: 5.2.1
resolution: "react-router@npm:5.2.1"
Expand All @@ -17130,6 +17145,17 @@ __metadata:
languageName: node
linkType: hard

"react-router@npm:6.0.1":
version: 6.0.1
resolution: "react-router@npm:6.0.1"
dependencies:
history: ^5.1.0
peerDependencies:
react: ">=16.8"
checksum: 66bbaaa98637a0bf4e4c3e4392f8929388e2d07438759129e14709809add974bfa3307d508055c259986439b2f5f9c5558410771355e547c06005ed4feef7c7f
languageName: node
linkType: hard

"react-shallow-renderer@npm:^16.13.1":
version: 16.14.1
resolution: "react-shallow-renderer@npm:16.14.1"
Expand Down

0 comments on commit 96488b4

Please sign in to comment.