From 29ac35cef60dc063679331c0ecb2d696d4b6cfcd Mon Sep 17 00:00:00 2001 From: prql-bot <107324867+prql-bot@users.noreply.github.com> Date: Wed, 26 Aug 2026 06:36:18 +0000 Subject: [PATCH] refine: remove no-op `reportWebVitals` from playground `reportWebVitals()` is called with no argument, and its body is guarded on that argument being a function, so the dynamic `import("web-vitals")` inside it never ran. Remove the module, its call site, and the `web-vitals` dependency it was the sole reachable importer of. --- CHANGELOG.md | 5 +++++ web/playground/package-lock.json | 7 ------- web/playground/package.json | 1 - web/playground/src/main.jsx | 6 ------ web/playground/src/reportWebVitals.js | 13 ------------- 5 files changed, 5 insertions(+), 27 deletions(-) delete mode 100644 web/playground/src/reportWebVitals.js diff --git a/CHANGELOG.md b/CHANGELOG.md index 2765a8cb7eee..9042f05030b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -47,6 +47,11 @@ **Web**: +- The playground no longer depends on `web-vitals`. `reportWebVitals` was called + with no argument, and its body is guarded on that argument being a function — + so the dynamic `import("web-vitals")` inside it never ran. It was Create React + App boilerplate that outlived the migration to Vite. (@prql-bot, #6233) + **Integrations**: - The `prqlc` Python package now declares `requires-python = ">=3.10"`. Python diff --git a/web/playground/package-lock.json b/web/playground/package-lock.json index 77918ac9ad3b..279b85575d6c 100644 --- a/web/playground/package-lock.json +++ b/web/playground/package-lock.json @@ -18,7 +18,6 @@ "react": "^19.2.0", "react-dom": "^19.2.0", "react-syntax-highlighter": "^16.1.0", - "web-vitals": "^6.1.0", "yaml": "^2.9.0" }, "devDependencies": { @@ -1888,12 +1887,6 @@ "vite": "^2 || ^3 || ^4 || ^5 || ^6 || ^7 || ^8" } }, - "node_modules/web-vitals": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/web-vitals/-/web-vitals-6.1.0.tgz", - "integrity": "sha512-ZNoJ/MbU6aaR2WjKrFVUvy5WQx+G96YvXQFSsmKTz3A/0VlAFywjUcxl00hc/S6wef2stfgQ4yWYIJCWCNudkA==", - "license": "Apache-2.0" - }, "node_modules/wordwrapjs": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/wordwrapjs/-/wordwrapjs-5.1.0.tgz", diff --git a/web/playground/package.json b/web/playground/package.json index 3fe2d2262af5..2ab42c29e1e4 100644 --- a/web/playground/package.json +++ b/web/playground/package.json @@ -22,7 +22,6 @@ "react": "^19.2.0", "react-dom": "^19.2.0", "react-syntax-highlighter": "^16.1.0", - "web-vitals": "^6.1.0", "yaml": "^2.9.0" }, "devDependencies": { diff --git a/web/playground/src/main.jsx b/web/playground/src/main.jsx index d62a6a4e3afc..a476ba4d599f 100644 --- a/web/playground/src/main.jsx +++ b/web/playground/src/main.jsx @@ -3,7 +3,6 @@ import ReactDOM from "react-dom/client"; import "./index.css"; import "./highlight.css"; import App from "./app/App"; -import reportWebVitals from "./reportWebVitals"; const root = ReactDOM.createRoot(document.getElementById("root")); root.render( @@ -11,8 +10,3 @@ root.render( , ); - -// If you want to start measuring performance in your app, pass a function -// to log results (for example: reportWebVitals(console.log)) -// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals -reportWebVitals(); diff --git a/web/playground/src/reportWebVitals.js b/web/playground/src/reportWebVitals.js deleted file mode 100644 index 2ecbf13e99f3..000000000000 --- a/web/playground/src/reportWebVitals.js +++ /dev/null @@ -1,13 +0,0 @@ -const reportWebVitals = (onPerfEntry) => { - if (onPerfEntry && onPerfEntry instanceof Function) { - import("web-vitals").then(({ onCLS, onINP, onFCP, onLCP, onTTFB }) => { - onCLS(onPerfEntry); - onINP(onPerfEntry); - onFCP(onPerfEntry); - onLCP(onPerfEntry); - onTTFB(onPerfEntry); - }); - } -}; - -export default reportWebVitals;