From 7dd6d48db228ee4abebef3cb07c69a203902e028 Mon Sep 17 00:00:00 2001 From: Kevin Van Cott Date: Tue, 18 Aug 2026 17:05:36 -0500 Subject: [PATCH] chore: remove logs --- .../react/kitchen-sink/src/routes/__root.tsx | 32 +------------------ .../src/routes/__root.tsx | 32 +------------------ .../tests/e2e/smoke.spec.ts | 1 - 3 files changed, 2 insertions(+), 63 deletions(-) diff --git a/examples/react/kitchen-sink/src/routes/__root.tsx b/examples/react/kitchen-sink/src/routes/__root.tsx index 765dec68a..5af919412 100644 --- a/examples/react/kitchen-sink/src/routes/__root.tsx +++ b/examples/react/kitchen-sink/src/routes/__root.tsx @@ -10,33 +10,6 @@ import { TanStackDevtools } from '@tanstack/react-devtools' import { tableDevtoolsPlugin } from '@tanstack/react-table-devtools' import appCss from '../index.css?url' -// Captures console errors/warnings (e.g. React hydration mismatches) from -// before hydration starts so they can be inspected via window.__consoleLog. -const consoleProbe = ` -window.__consoleLog = []; -(function () { - var push = function (level, args) { - try { - window.__consoleLog.push({ - level: level, - msg: Array.prototype.map - .call(args, function (a) { - return String((a && a.message) || (a && a.stack) || a); - }) - .join(' ') - .slice(0, 10000), - }); - } catch (e) {} - }; - var origError = console.error; - var origWarn = console.warn; - console.error = function () { push('error', arguments); origError.apply(console, arguments); }; - console.warn = function () { push('warn', arguments); origWarn.apply(console, arguments); }; - window.addEventListener('error', function (e) { push('uncaught', [e.message]); }); - window.addEventListener('unhandledrejection', function (e) { push('rejection', [e.reason]); }); -})(); -` - export const Route = createRootRoute({ head: () => ({ meta: [ @@ -45,10 +18,7 @@ export const Route = createRootRoute({ { title: 'TanStack Table Kitchen Sink (Start SSR)' }, ], links: [{ rel: 'stylesheet', href: appCss }], - scripts: [ - { src: 'https://unpkg.com/react-scan/dist/auto.global.js' }, - { children: consoleProbe }, - ], + scripts: [{ src: 'https://unpkg.com/react-scan/dist/auto.global.js' }], }), component: RootComponent, }) diff --git a/examples/react/web-worker-row-models/src/routes/__root.tsx b/examples/react/web-worker-row-models/src/routes/__root.tsx index 03534045a..4a8e5fdc6 100644 --- a/examples/react/web-worker-row-models/src/routes/__root.tsx +++ b/examples/react/web-worker-row-models/src/routes/__root.tsx @@ -10,33 +10,6 @@ import { TanStackDevtools } from '@tanstack/react-devtools' import { tableDevtoolsPlugin } from '@tanstack/react-table-devtools' import appCss from '../index.css?url' -// Captures console errors/warnings (e.g. React hydration mismatches) from -// before hydration starts so they can be inspected via window.__consoleLog. -const consoleProbe = ` -window.__consoleLog = []; -(function () { - var push = function (level, args) { - try { - window.__consoleLog.push({ - level: level, - msg: Array.prototype.map - .call(args, function (a) { - return String((a && a.message) || (a && a.stack) || a); - }) - .join(' ') - .slice(0, 10000), - }); - } catch (e) {} - }; - var origError = console.error; - var origWarn = console.warn; - console.error = function () { push('error', arguments); origError.apply(console, arguments); }; - console.warn = function () { push('warn', arguments); origWarn.apply(console, arguments); }; - window.addEventListener('error', function (e) { push('uncaught', [e.message]); }); - window.addEventListener('unhandledrejection', function (e) { push('rejection', [e.reason]); }); -})(); -` - export const Route = createRootRoute({ head: () => ({ meta: [ @@ -45,10 +18,7 @@ export const Route = createRootRoute({ { title: 'TanStack Table Web Worker Row Models (Start SSR)' }, ], links: [{ rel: 'stylesheet', href: appCss }], - scripts: [ - { src: 'https://unpkg.com/react-scan/dist/auto.global.js' }, - { children: consoleProbe }, - ], + scripts: [{ src: 'https://unpkg.com/react-scan/dist/auto.global.js' }], }), component: RootComponent, }) diff --git a/examples/react/web-worker-row-models/tests/e2e/smoke.spec.ts b/examples/react/web-worker-row-models/tests/e2e/smoke.spec.ts index a083c542c..7ae374360 100644 --- a/examples/react/web-worker-row-models/tests/e2e/smoke.spec.ts +++ b/examples/react/web-worker-row-models/tests/e2e/smoke.spec.ts @@ -53,7 +53,6 @@ async function openExample(page: Page) { ) } catch { const diagnostics = await page.evaluate(() => ({ - console: (window as any).__consoleLog, readyState: document.readyState, scripts: Array.from(document.scripts).map((script) => ({ src: script.src,