Skip to content

Commit d547075

Browse files
authored
Support React v19 (#177)
* Support react@19 * Update peer depednedncy to support react-router-dom for < 7 * Bump version to 0.7.2
1 parent b39f0db commit d547075

File tree

7 files changed

+2784
-2334
lines changed

7 files changed

+2784
-2334
lines changed

.eslintrc.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
"es2021": true
55
},
66
"extends": [
7-
"airbnb",
8-
"airbnb-typescript",
9-
"airbnb/hooks",
7+
"eslint:recommended",
108
"plugin:@typescript-eslint/recommended",
119
"plugin:react/recommended",
1210
"prettier"
@@ -27,5 +25,10 @@
2725
"react/prop-types": "off",
2826
"react/jsx-no-bind": "off",
2927
"react/require-default-props": "off"
28+
},
29+
"settings": {
30+
"react": {
31+
"version": "detect"
32+
}
3033
}
3134
}

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pnpm lint

package.json

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "0.7.1",
2+
"version": "0.7.2",
33
"name": "react-router-prompt",
44
"description": "React Router Navigation Prompt for v6",
55
"type": "module",
@@ -12,8 +12,7 @@
1212
"exports": {
1313
".": {
1414
"import": "./dist/react-router-prompt.js",
15-
"require": "./dist/react-router-prompt.umd.cjs",
16-
"types": "./dist/index.d.ts"
15+
"require": "./dist/react-router-prompt.umd.cjs"
1716
}
1817
},
1918
"author": "Shyam Gupta (shyamm@outlook.com)",
@@ -39,23 +38,16 @@
3938
"format": "prettier \"src/**/*.{js,jsx,ts,tsx,css,scss}\" --write",
4039
"size": "size-limit",
4140
"prepublishOnly": "yarn build",
42-
"prepare": "husky install"
43-
},
44-
"husky": {
45-
"hooks": {
46-
"pre-commit": "pnpm lint"
47-
}
41+
"prepare": "husky"
4842
},
4943
"devDependencies": {
5044
"@size-limit/preset-small-lib": "^11.0.2",
51-
"@types/react": "^18.2.55",
52-
"@types/react-dom": "^18.2.19",
45+
"@types/react": "^19.0.2",
46+
"@types/react-dom": "^19.0.2",
5347
"@typescript-eslint/eslint-plugin": "^8.0.0",
5448
"@typescript-eslint/parser": "^8.0.0",
55-
"@vitejs/plugin-react-swc": "^3.6.0",
49+
"@vitejs/plugin-react-swc": "^3.7.2",
5650
"eslint": "^8.56.0",
57-
"eslint-config-airbnb": "^19.0.4",
58-
"eslint-config-airbnb-typescript": "^18.0.0",
5951
"eslint-config-prettier": "^9.1.0",
6052
"eslint-plugin-import": "^2.29.1",
6153
"eslint-plugin-jsx-a11y": "^6.8.0",
@@ -65,20 +57,20 @@
6557
"history": "^5.3.0",
6658
"husky": "^9.0.11",
6759
"path": "^0.12.7",
68-
"prettier": "^3.2.5",
69-
"react": "^18.2.0",
70-
"react-dom": "^18.2.0",
60+
"prettier": "^3.4.2",
61+
"react": "^19.0.0",
62+
"react-dom": "^19.0.0",
7163
"react-router-dom": "^6.22.1",
7264
"size-limit": "^11.0.2",
7365
"typescript": "^5.3.3",
74-
"vite": "^5.1.3",
75-
"vite-plugin-dts": "^4.0.0",
76-
"vite-tsconfig-paths": "^5.0.0"
66+
"vite": "^6.0.5",
67+
"vite-plugin-dts": "^4.4.0",
68+
"vite-tsconfig-paths": "^5.1.4"
7769
},
7870
"peerDependencies": {
7971
"react": ">=16.8",
8072
"react-dom": ">=16.8",
81-
"react-router-dom": ">=6.19"
73+
"react-router-dom": ">=6.19 <7"
8274
},
8375
"size-limit": [
8476
{

0 commit comments

Comments
 (0)