From 9d20e42e0e46fa818cb3a2c43b22debfed013c4c Mon Sep 17 00:00:00 2001 From: FlopBut Date: Sun, 24 May 2026 14:34:31 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20Drop=20web-vitals=20boilerplate,?= =?UTF-8?q?=20patch=20yaml=20advisory?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Remove unused web-vitals dep + src/reportWebVitals.ts (CRA leftover on the removed v2 onCLS/getFID API; not called for any real metrics). - Drop the reportWebVitals import/call from src/index.tsx. - Bump yaml ^2.8.2 -> ^2.8.3 (resolves 2.9.0) to clear GHSA-48c2-rrv3-qjmp (moderate: stack overflow via deeply nested collections). - @types/node was already ^22 (handled in FLO-158), so no change needed. Verification: yarn typecheck / build / test all green (117 tests); yarn npm audit reports no advisories; app loads and board renders. Co-Authored-By: Paperclip --- package.json | 3 +-- src/index.tsx | 3 --- src/reportWebVitals.ts | 15 --------------- yarn.lock | 18 +++++------------- 4 files changed, 6 insertions(+), 33 deletions(-) delete mode 100644 src/reportWebVitals.ts diff --git a/package.json b/package.json index 88d0db5..245e1eb 100644 --- a/package.json +++ b/package.json @@ -11,8 +11,7 @@ "react": "^19.2.3", "react-dom": "^19.2.3", "react-router-dom": "^7.11.0", - "web-vitals": "^2.1.0", - "yaml": "^2.8.2", + "yaml": "^2.8.3", "zod": "^4.3.5" }, "scripts": { diff --git a/src/index.tsx b/src/index.tsx index 88b4f64..1fd12b7 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -2,7 +2,6 @@ import React from 'react'; import ReactDOM from 'react-dom/client'; import './index.css'; import App from './App'; -import reportWebVitals from './reportWebVitals'; const root = ReactDOM.createRoot( document.getElementById('root') as HTMLElement @@ -12,5 +11,3 @@ root.render( ); - -reportWebVitals(); diff --git a/src/reportWebVitals.ts b/src/reportWebVitals.ts deleted file mode 100644 index 49a2a16..0000000 --- a/src/reportWebVitals.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { ReportHandler } from 'web-vitals'; - -const reportWebVitals = (onPerfEntry?: ReportHandler) => { - if (onPerfEntry && onPerfEntry instanceof Function) { - import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { - getCLS(onPerfEntry); - getFID(onPerfEntry); - getFCP(onPerfEntry); - getLCP(onPerfEntry); - getTTFB(onPerfEntry); - }); - } -}; - -export default reportWebVitals; diff --git a/yarn.lock b/yarn.lock index eaf4cc3..8a06784 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1144,8 +1144,7 @@ __metadata: typescript-eslint: "npm:^8.59.4" vite: "npm:^8.0.14" vitest: "npm:^4.1.7" - web-vitals: "npm:^2.1.0" - yaml: "npm:^2.8.2" + yaml: "npm:^2.8.3" zod: "npm:^4.3.5" languageName: unknown linkType: soft @@ -2730,13 +2729,6 @@ __metadata: languageName: node linkType: hard -"web-vitals@npm:^2.1.0": - version: 2.1.4 - resolution: "web-vitals@npm:2.1.4" - checksum: 10c0/c71ab674936c6b4d51679e037e3819c24bdad9f30410fe8a84fd8218d29d9bacf15ae9fd570d361f3e9621aa8454f61277f66ac1a5c19b50facf3220a37a73eb - languageName: node - linkType: hard - "which@npm:^2.0.1": version: 2.0.2 resolution: "which@npm:2.0.2" @@ -2799,12 +2791,12 @@ __metadata: languageName: node linkType: hard -"yaml@npm:^2.8.2": - version: 2.8.2 - resolution: "yaml@npm:2.8.2" +"yaml@npm:^2.8.3": + version: 2.9.0 + resolution: "yaml@npm:2.9.0" bin: yaml: bin.mjs - checksum: 10c0/703e4dc1e34b324aa66876d63618dcacb9ed49f7e7fe9b70f1e703645be8d640f68ab84f12b86df8ac960bac37acf5513e115de7c970940617ce0343c8c9cd96 + checksum: 10c0/f340718df45e97a9551b9bf9dac61c80050bc464513b710debfb5067c380c8472e3b67809cffacb4ab5ffb5e66ef9310816c88b05f371cec60abfedd8c88e0a2 languageName: node linkType: hard