From 68ef0aa5de1a81be58e050166bd27e9f1e6135fc Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 19 Oct 2026 20:00:09 +0000 Subject: [PATCH 1/2] Initial plan From 73693e9ad3bcc28aece3dfc998c7b9af87345359 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 19 Oct 2026 20:06:32 +0000 Subject: [PATCH 2/2] Fix web-vitals v4 build compatibility Co-authored-by: jasonjoh <8966342+jasonjoh@users.noreply.github.com> --- graph-tutorial/package.json | 2 +- graph-tutorial/src/reportWebVitals.ts | 16 ++++++++-------- graph-tutorial/yarn.lock | 8 ++++---- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/graph-tutorial/package.json b/graph-tutorial/package.json index f3388ae..bd1fb32 100644 --- a/graph-tutorial/package.json +++ b/graph-tutorial/package.json @@ -15,7 +15,7 @@ "react-dom": "^18.3.1", "react-router-dom": "^6.26.1", "react-scripts": "5.0.1", - "web-vitals": "^3.5.2", + "web-vitals": "4.2.4", "windows-iana": "^5.1.0" }, "scripts": { diff --git a/graph-tutorial/src/reportWebVitals.ts b/graph-tutorial/src/reportWebVitals.ts index 49a2a16..af13188 100644 --- a/graph-tutorial/src/reportWebVitals.ts +++ b/graph-tutorial/src/reportWebVitals.ts @@ -1,13 +1,13 @@ -import { ReportHandler } from 'web-vitals'; +import { MetricType } from 'web-vitals'; -const reportWebVitals = (onPerfEntry?: ReportHandler) => { +const reportWebVitals = (onPerfEntry?: (metric: MetricType) => void) => { if (onPerfEntry && onPerfEntry instanceof Function) { - import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { - getCLS(onPerfEntry); - getFID(onPerfEntry); - getFCP(onPerfEntry); - getLCP(onPerfEntry); - getTTFB(onPerfEntry); + import('web-vitals').then(({ onCLS, onINP, onFCP, onLCP, onTTFB }) => { + onCLS(onPerfEntry); + onINP(onPerfEntry); + onFCP(onPerfEntry); + onLCP(onPerfEntry); + onTTFB(onPerfEntry); }); } }; diff --git a/graph-tutorial/yarn.lock b/graph-tutorial/yarn.lock index f0415de..84b31f4 100644 --- a/graph-tutorial/yarn.lock +++ b/graph-tutorial/yarn.lock @@ -9584,10 +9584,10 @@ wbuf@^1.1.0, wbuf@^1.7.3: dependencies: minimalistic-assert "^1.0.0" -web-vitals@^3.5.2: - version "3.5.2" - resolved "https://registry.yarnpkg.com/web-vitals/-/web-vitals-3.5.2.tgz#5bb58461bbc173c3f00c2ddff8bfe6e680999ca9" - integrity sha512-c0rhqNcHXRkY/ogGDJQxZ9Im9D19hDihbzSQJrsioex+KnFgmMzBiy57Z1EjkhX/+OjyBpclDCzz2ITtjokFmg== +web-vitals@4.2.4: + version "4.2.4" + resolved "https://registry.yarnpkg.com/web-vitals/-/web-vitals-4.2.4.tgz#1d20bc8590a37769bd0902b289550936069184b7" + integrity sha512-r4DIlprAGwJ7YM11VZp4R884m0Vmgr6EAKe3P+kO0PPj3Unqyvv59rczf6UiGcb9Z8QxZVcqKNwv/g0WNdWwsw== webidl-conversions@^4.0.2: version "4.0.2"