From d8e63f7b38af5bb9930deb93fdbe01a66d9bf76b Mon Sep 17 00:00:00 2001 From: DimaDemchenko Date: Tue, 21 Jan 2025 13:24:53 +0200 Subject: [PATCH] feat: React v19 in demo package --- demo/package.json | 8 +- packages/p2p-media-loader-demo/package.json | 8 +- .../components/chart/DownloadStatsChart.tsx | 2 - pnpm-lock.yaml | 106 +++++++----------- 4 files changed, 48 insertions(+), 76 deletions(-) diff --git a/demo/package.json b/demo/package.json index 01d66fd2..89d0b542 100644 --- a/demo/package.json +++ b/demo/package.json @@ -18,12 +18,12 @@ "p2p-media-loader-demo": "workspace:*", "p2p-media-loader-hlsjs": "workspace:*", "p2p-media-loader-shaka": "workspace:*", - "react": "^18.3.1", - "react-dom": "^18.3.1" + "react": "^19.0.0", + "react-dom": "^19.0.0" }, "devDependencies": { - "@types/react": "^18.3.18", - "@types/react-dom": "^18.3.5", + "@types/react": "^19.0.7", + "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^4.3.4", "eslint-plugin-react": "^7.37.4", "eslint-plugin-react-hooks": "^5.1.0", diff --git a/packages/p2p-media-loader-demo/package.json b/packages/p2p-media-loader-demo/package.json index 99e1cd99..fdbacdd6 100644 --- a/packages/p2p-media-loader-demo/package.json +++ b/packages/p2p-media-loader-demo/package.json @@ -62,14 +62,14 @@ "devDependencies": { "@types/d3": "^7.4.3", "@types/dplayer": "^1.25.5", - "@types/react": "^18.3.12", - "@types/react-dom": "^18.3.1", + "@types/react": "^19.0.7", + "@types/react-dom": "^19.0.3", "cpy-cli": "^5.0.0", "eslint-plugin-react": "^7.37.4", "eslint-plugin-react-hooks": "^5.1.0", "eslint-plugin-react-refresh": "^0.4.18", - "react": "^18.3.1", - "react-dom": "^18.3.1" + "react": "^19.0.0", + "react-dom": "^19.0.0" }, "peerDependencies": { "react": ">=16", diff --git a/packages/p2p-media-loader-demo/src/components/chart/DownloadStatsChart.tsx b/packages/p2p-media-loader-demo/src/components/chart/DownloadStatsChart.tsx index 52c2a2c7..3847929f 100644 --- a/packages/p2p-media-loader-demo/src/components/chart/DownloadStatsChart.tsx +++ b/packages/p2p-media-loader-demo/src/components/chart/DownloadStatsChart.tsx @@ -55,8 +55,6 @@ export const DownloadStatsChart = ({ downloadStatsRef }: StatsChartProps) => { useEffect(() => { const intervalID = setInterval(() => { - if (!downloadStatsRef.current) return; - const { httpDownloaded, p2pDownloaded, p2pUploaded } = downloadStatsRef.current; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c8ecefce..a33f9899 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -60,18 +60,18 @@ importers: specifier: workspace:* version: link:../packages/p2p-media-loader-shaka react: - specifier: ^18.3.1 - version: 18.3.1 + specifier: ^19.0.0 + version: 19.0.0 react-dom: - specifier: ^18.3.1 - version: 18.3.1(react@18.3.1) + specifier: ^19.0.0 + version: 19.0.0(react@19.0.0) devDependencies: '@types/react': - specifier: ^18.3.18 - version: 18.3.18 + specifier: ^19.0.7 + version: 19.0.7 '@types/react-dom': - specifier: ^18.3.5 - version: 18.3.5(@types/react@18.3.18) + specifier: ^19.0.3 + version: 19.0.3(@types/react@19.0.7) '@vitejs/plugin-react': specifier: ^4.3.4 version: 4.3.4(vite@6.0.10(@types/node@22.9.1)(terser@5.36.0)(yaml@2.6.1)) @@ -120,7 +120,7 @@ importers: dependencies: '@vidstack/react': specifier: ^1.12.12 - version: 1.12.12(@types/react@18.3.12)(react@18.3.1) + version: 1.12.12(@types/react@19.0.7)(react@19.0.0) d3: specifier: ^7.9.0 version: 7.9.0 @@ -159,11 +159,11 @@ importers: specifier: ^1.25.5 version: 1.25.5 '@types/react': - specifier: ^18.3.12 - version: 18.3.12 + specifier: ^19.0.7 + version: 19.0.7 '@types/react-dom': - specifier: ^18.3.1 - version: 18.3.1 + specifier: ^19.0.3 + version: 19.0.3(@types/react@19.0.7) cpy-cli: specifier: ^5.0.0 version: 5.0.0 @@ -177,11 +177,11 @@ importers: specifier: ^0.4.18 version: 0.4.18(eslint@9.18.0) react: - specifier: ^18.3.1 - version: 18.3.1 + specifier: ^19.0.0 + version: 19.0.0 react-dom: - specifier: ^18.3.1 - version: 18.3.1(react@18.3.1) + specifier: ^19.0.0 + version: 19.0.0(react@19.0.0) packages/p2p-media-loader-hlsjs: dependencies: @@ -857,22 +857,13 @@ packages: '@types/node@22.9.1': resolution: {integrity: sha512-p8Yy/8sw1caA8CdRIQBG5tiLHmxtQKObCijiAa9Ez+d4+PRffM4054xbju0msf+cvhJpnFEeNjxmVT/0ipktrg==} - '@types/prop-types@15.7.13': - resolution: {integrity: sha512-hCZTSvwbzWGvhqxp/RqVqwU999pBf2vp7hzIjiYOsl8wqOmUxkQ6ddw1cV3l8811+kdUFus/q4d1Y3E3SyEifA==} - - '@types/react-dom@18.3.1': - resolution: {integrity: sha512-qW1Mfv8taImTthu4KoXgDfLuk4bydU6Q/TkADnDWWHwi4NX4BR+LWfTp2sVmTqRrsHvyDDTelgelxJ+SsejKKQ==} - - '@types/react-dom@18.3.5': - resolution: {integrity: sha512-P4t6saawp+b/dFrUr2cvkVsfvPguwsxtH6dNIYRllMsefqFzkZk5UIjzyDOv5g1dXIPdG4Sp1yCR4Z6RCUsG/Q==} + '@types/react-dom@19.0.3': + resolution: {integrity: sha512-0Knk+HJiMP/qOZgMyNFamlIjw9OFCsyC2ZbigmEEyXXixgre6IQpm/4V+r3qH4GC1JPvRJKInw+on2rV6YZLeA==} peerDependencies: - '@types/react': ^18.0.0 - - '@types/react@18.3.12': - resolution: {integrity: sha512-D2wOSq/d6Agt28q7rSI3jhU7G6aiuzljDGZ2hTZHIkrTLUI+AF3WMeKkEZ9nN2fkBAlcktT6vcZjDFiIhMYEQw==} + '@types/react': ^19.0.0 - '@types/react@18.3.18': - resolution: {integrity: sha512-t4yC+vtgnkYjNSKlFx1jkAhH8LgTo2N/7Qvi83kdEaUtMDiwpbLAktKDaAMlRcJ5eSxZkH74eEGt1ky31d7kfQ==} + '@types/react@19.0.7': + resolution: {integrity: sha512-MoFsEJKkAtZCrC1r6CM8U22GzhG7u2Wir8ons/aCKH6MBdD1ibV24zOSSkdZVUKqN5i396zG5VKLYZ3yaUZdLA==} '@types/streamx@2.9.5': resolution: {integrity: sha512-IHYsa6jYrck8VEdSwpY141FTTf6D7boPeMq9jy4qazNrFMA4VbRz/sw5LSsfR7jwdDcx0QKWkUexZvsWBC2eIQ==} @@ -2813,10 +2804,10 @@ packages: resolution: {integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==} hasBin: true - react-dom@18.3.1: - resolution: {integrity: sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==} + react-dom@19.0.0: + resolution: {integrity: sha512-4GV5sHFG0e/0AD4X+ySy6UJd3jVl1iNsNHdpad0qhABJ11twS3TTBnseqsKurKcsNqCEFeGL3uLpVChpIO3QfQ==} peerDependencies: - react: ^18.3.1 + react: ^19.0.0 react-is@16.13.1: resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} @@ -2825,8 +2816,8 @@ packages: resolution: {integrity: sha512-jCvmsr+1IUSMUyzOkRcvnVbX3ZYC6g9TDrDbFuFmRDq7PD4yaGbLKNQL6k2jnArV8hjYxh7hVhAZB6s9HDGpZA==} engines: {node: '>=0.10.0'} - react@18.3.1: - resolution: {integrity: sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==} + react@19.0.0: + resolution: {integrity: sha512-V8AVnmPIICiWpGfm6GLzCR/W5FXLchHop40W4nXBmdlEceh16rCN8O8LNWm5bh5XUX91fh7KpA+W0TgMKmgTpQ==} engines: {node: '>=0.10.0'} readable-stream@2.3.8: @@ -2922,8 +2913,8 @@ packages: safer-buffer@2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} - scheduler@0.23.2: - resolution: {integrity: sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==} + scheduler@0.25.0: + resolution: {integrity: sha512-xFVuu11jh+xcO7JOAGJNOXld8/TcEHK/4CituBUeUb5hqxJLj9YuemAEuvm9gQ/+pgXYfbQuqAkiYu+u7YEsNA==} semver@6.3.1: resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} @@ -4163,24 +4154,12 @@ snapshots: dependencies: undici-types: 6.19.8 - '@types/prop-types@15.7.13': {} - - '@types/react-dom@18.3.1': - dependencies: - '@types/react': 18.3.18 - - '@types/react-dom@18.3.5(@types/react@18.3.18)': + '@types/react-dom@19.0.3(@types/react@19.0.7)': dependencies: - '@types/react': 18.3.18 + '@types/react': 19.0.7 - '@types/react@18.3.12': + '@types/react@19.0.7': dependencies: - '@types/prop-types': 15.7.13 - csstype: 3.1.3 - - '@types/react@18.3.18': - dependencies: - '@types/prop-types': 15.7.13 csstype: 3.1.3 '@types/streamx@2.9.5': @@ -4314,12 +4293,12 @@ snapshots: '@typescript-eslint/types': 8.21.0 eslint-visitor-keys: 4.2.0 - '@vidstack/react@1.12.12(@types/react@18.3.12)(react@18.3.1)': + '@vidstack/react@1.12.12(@types/react@19.0.7)(react@19.0.0)': dependencies: '@floating-ui/dom': 1.6.12 - '@types/react': 18.3.12 + '@types/react': 19.0.7 media-captions: 1.0.4 - react: 18.3.1 + react: 19.0.0 '@vitejs/plugin-react@4.3.4(vite@6.0.10(@types/node@22.9.1)(terser@5.36.0)(yaml@2.6.1))': dependencies: @@ -6611,19 +6590,16 @@ snapshots: minimist: 1.2.8 strip-json-comments: 2.0.1 - react-dom@18.3.1(react@18.3.1): + react-dom@19.0.0(react@19.0.0): dependencies: - loose-envify: 1.4.0 - react: 18.3.1 - scheduler: 0.23.2 + react: 19.0.0 + scheduler: 0.25.0 react-is@16.13.1: {} react-refresh@0.14.2: {} - react@18.3.1: - dependencies: - loose-envify: 1.4.0 + react@19.0.0: {} readable-stream@2.3.8: dependencies: @@ -6769,9 +6745,7 @@ snapshots: safer-buffer@2.1.2: {} - scheduler@0.23.2: - dependencies: - loose-envify: 1.4.0 + scheduler@0.25.0: {} semver@6.3.1: {}