From 2ae1508b7fbf93f4492a3313d5b5aa975618a6aa Mon Sep 17 00:00:00 2001 From: Matteo Trapani Date: Tue, 26 Aug 2025 17:33:55 +0200 Subject: [PATCH 1/2] upgraded dependency to React 19 --- package.json | 6 +++--- .../DiffViewer/components/VirtualizedDiffViewer.tsx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index f126d50..cc584e6 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "lint:fix": "eslint --fix" }, "peerDependencies": { - "react": "^18.0.0" + "react": "^19.0.0" }, "dependencies": { "json-diff-kit": "^1.0.32", @@ -68,7 +68,7 @@ "@storybook/react": "8.6.0-alpha.0", "@storybook/react-vite": "8.6.0-alpha.0", "@types/node": "^22.14.1", - "@types/react": "^18.2.15", + "@types/react": "^19.0.0", "@types/react-window": "^1.8.8", "eslint": "^9.33.0", "eslint-plugin-format": "^1.0.1", @@ -76,7 +76,7 @@ "eslint-plugin-react-refresh": "^0.4.20", "lint-staged": "^16.1.5", "postcss": "^8.5.1", - "react": "^18.2.0", + "react": "^19.0.0", "rollup": "^3.26.3", "rollup-plugin-dts": "^5.3.0", "rollup-plugin-peer-deps-external": "^2.2.4", diff --git a/src/components/DiffViewer/components/VirtualizedDiffViewer.tsx b/src/components/DiffViewer/components/VirtualizedDiffViewer.tsx index 826bda5..3d0f197 100644 --- a/src/components/DiffViewer/components/VirtualizedDiffViewer.tsx +++ b/src/components/DiffViewer/components/VirtualizedDiffViewer.tsx @@ -78,7 +78,7 @@ export const VirtualizedDiffViewer: React.FC = ({ miniMapWidth, }) => { const listRef = useRef(null); - const searchTimeoutRef = useRef(); + const searchTimeoutRef = useRef(undefined); const [scrollTop, setScrollTop] = useState(0); const [segments, setSegments] = useState([]); From eb29d143354346f6371b53059e7c01edb658aa33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Utku=20Aky=C3=BCz?= <79662515+utkuakyuz@users.noreply.github.com> Date: Tue, 26 Aug 2025 18:40:07 +0300 Subject: [PATCH 2/2] chore: update package.json to also support react 18 --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index cc584e6..17caf27 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "lint:fix": "eslint --fix" }, "peerDependencies": { - "react": "^19.0.0" + "react": ">=18.0.0" }, "dependencies": { "json-diff-kit": "^1.0.32", @@ -68,7 +68,7 @@ "@storybook/react": "8.6.0-alpha.0", "@storybook/react-vite": "8.6.0-alpha.0", "@types/node": "^22.14.1", - "@types/react": "^19.0.0", + "@types/react": ">=18.0.0", "@types/react-window": "^1.8.8", "eslint": "^9.33.0", "eslint-plugin-format": "^1.0.1", @@ -76,7 +76,7 @@ "eslint-plugin-react-refresh": "^0.4.20", "lint-staged": "^16.1.5", "postcss": "^8.5.1", - "react": "^19.0.0", + "react": ">=18.0.0", "rollup": "^3.26.3", "rollup-plugin-dts": "^5.3.0", "rollup-plugin-peer-deps-external": "^2.2.4",