fix: strip invariant and warning strings from prod bundles#7007
fix: strip invariant and warning strings from prod bundles#7007
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughReplaced external Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~75 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
View your CI Pipeline Execution ↗ for commit ab84127
☁️ Nx Cloud last updated this comment at |
🚀 Changeset Version Preview10 package(s) bumped directly, 17 bumped as dependents. 🟩 Patch bumps
|
Bundle Size Benchmarks
Trend sparkline is historical gzip bytes ending with this PR measurement; lower is better. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c64c1d5f7d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (3)
examples/react/start-trellaux/src/components/Column.tsx (1)
51-51:⚠️ Potential issue | 🔴 CriticalMissing message argument.
This call will fail TypeScript compilation since
messageis required in the currentinvariantsignature. Onceinvariant.tsis fixed to makemessageoptional, this will work correctly.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@examples/react/start-trellaux/src/components/Column.tsx` at line 51, The call to invariant in Column.tsx is missing the required message argument and will fail TypeScript; update the invariant call that checks listRef.current (reference: invariant and listRef.current in Column.tsx) to include a short descriptive string message as the second argument (e.g., indicating that listRef.current is null/unavailable) so it matches the invariant signature.examples/react/start-trellaux/src/components/NewCard.tsx (1)
36-36:⚠️ Potential issue | 🔴 CriticalMissing message argument.
This call will fail TypeScript compilation since
messageis required in the currentinvariantsignature. Onceinvariant.tsis fixed to makemessageoptional, this will work correctly.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@examples/react/start-trellaux/src/components/NewCard.tsx` at line 36, The invariant call in NewCard.tsx (involving invariant and textAreaRef.current) lacks the required message argument and will fail TypeScript compilation; update the call to pass a descriptive error message (e.g., indicating textAreaRef.current is null/unavailable) so invariant(textAreaRef.current, "<your message>") satisfies the current signature, or alternatively use a non-null assertion at the usage site after the invariant check if appropriate.examples/react/start-convex-trellaux/src/components/NewCard.tsx (1)
36-36:⚠️ Potential issue | 🔴 CriticalMissing required
messageargument will cause TypeScript error.The local
invariantfunction signature requires two arguments:(value: unknown, message: string). This call passes only one argument.Proposed fix
- invariant(textAreaRef.current) + invariant(textAreaRef.current, 'expected textArea ref')🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@examples/react/start-convex-trellaux/src/components/NewCard.tsx` at line 36, The call to invariant in NewCard.tsx uses only one argument (invariant(textAreaRef.current)) but the function signature requires (value: unknown, message: string); update the call inside the NewCard component to pass a descriptive message as the second argument (e.g., "textAreaRef.current is null") so TypeScript errors are resolved and the runtime assertion provides context; locate the invariant call by name (invariant) in NewCard.tsx and add the message string as the second parameter.
🧹 Nitpick comments (9)
examples/react/start-convex-trellaux/src/components/Column.tsx (1)
2-2: Import order violation flagged by ESLint.The
../invariantimport should be placed after external package imports (react-dom,tailwind-merge) to comply with the project's import ordering rules.Suggested fix
import { forwardRef, useCallback, useMemo, useRef, useState } from 'react' -import { invariant } from '../invariant' import { twMerge } from 'tailwind-merge' import { flushSync } from 'react-dom' +import { invariant } from '../invariant' import { CONTENT_TYPES } from '../types'🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@examples/react/start-convex-trellaux/src/components/Column.tsx` at line 2, The ESLint import-order error is caused by placing the local import "invariant" before external package imports; update the import order in Column.tsx so that external modules (e.g., "react-dom" and "tailwind-merge") come first and then import the local module "../invariant" after them, ensuring imports are grouped as [external packages] then [local/internal] to satisfy the project's import ordering rules.examples/react/start-convex-trellaux/src/components/Board.tsx (1)
2-2: Import order violation flagged by ESLint.The
../invariantimport should be placed after external package imports to comply with the project's import ordering rules.Suggested fix
import { useCallback, useMemo, useRef } from 'react' -import { invariant } from '../invariant' import { useSuspenseQuery } from '@tanstack/react-query' import { convexQuery } from '@convex-dev/react-query' import { api } from '../../convex/_generated/api.js' +import { invariant } from '../invariant' import { useUpdateBoardMutation } from '../queries.js'🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@examples/react/start-convex-trellaux/src/components/Board.tsx` at line 2, In Board.tsx the local import "import { invariant } from '../invariant'" is placed before external package imports and violates ESLint import-order; move the invariant import so that all external package imports (React, other npm packages) appear first and then place the local relative import of invariant after them, ensuring import { invariant } from '../invariant' is relocated below the external imports to satisfy the project's ordering rules.packages/solid-router/src/renderRouteNotFound.tsx (1)
22-27: Remove redundant nested condition aroundconsole.warn.Inside this branch,
route.options.notFoundComponentis already known to be missing, so the extra innerifadds noise only.♻️ Suggested cleanup
- if (process.env.NODE_ENV !== 'production') { - if (!route.options.notFoundComponent) { - console.warn( - `Warning: A notFoundError was encountered on the route with ID "${route.id}", but a notFoundComponent option was not configured, nor was a router level defaultNotFoundComponent configured. Consider configuring at least one of these to avoid TanStack Router's overly generic defaultNotFoundComponent (<p>Not Found</p>)`, - ) - } - } + if (process.env.NODE_ENV !== 'production') { + console.warn( + `Warning: A notFoundError was encountered on the route with ID "${route.id}", but a notFoundComponent option was not configured, nor was a router level defaultNotFoundComponent configured. Consider configuring at least one of these to avoid TanStack Router's overly generic defaultNotFoundComponent (<p>Not Found</p>)`, + ) + }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/solid-router/src/renderRouteNotFound.tsx` around lines 22 - 27, The nested check around console.warn is redundant; inside the renderRouteNotFound flow where process.env.NODE_ENV !== 'production' you already know you should warn when route.options.notFoundComponent is missing, so remove the inner if and directly emit the warning. Locate the block using process.env.NODE_ENV !== 'production' and the route.options.notFoundComponent reference (and the console.warn call) and replace the nested if/console.warn with a single conditional or inline console.warn guarded by the existing NODE_ENV check, keeping the same warning text and referencing route.id.packages/vue-router/src/renderRouteNotFound.tsx (1)
23-28: RedundantnotFoundComponentre-check can be removed.The outer guard already guarantees this condition, so simplifying this block improves readability without changing behavior.
♻️ Suggested cleanup
- if (process.env.NODE_ENV !== 'production') { - if (!route.options.notFoundComponent) { - console.warn( - `Warning: A notFoundError was encountered on the route with ID "${route.id}", but a notFoundComponent option was not configured, nor was a router level defaultNotFoundComponent configured. Consider configuring at least one of these to avoid TanStack Router's overly generic defaultNotFoundComponent (<p>Not Found</p>)`, - ) - } - } + if (process.env.NODE_ENV !== 'production') { + console.warn( + `Warning: A notFoundError was encountered on the route with ID "${route.id}", but a notFoundComponent option was not configured, nor was a router level defaultNotFoundComponent configured. Consider configuring at least one of these to avoid TanStack Router's overly generic defaultNotFoundComponent (<p>Not Found</p>)`, + ) + }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/vue-router/src/renderRouteNotFound.tsx` around lines 23 - 28, Remove the redundant inner check for route.options.notFoundComponent inside the development-only block in renderRouteNotFound.tsx: the outer guard already ensures notFoundComponent is falsey, so delete the if (!route.options.notFoundComponent) wrapper and call console.warn(...) directly; reference the existing route.options.notFoundComponent and the development guard (process.env.NODE_ENV !== 'production') when making the change to keep behavior identical and improve readability.packages/router-devtools-core/src/BaseTanStackRouterDevtoolsPanel.tsx (1)
2-3: Consolidate duplicate imports from@tanstack/router-core.The ESLint
import/no-duplicatesrule correctly flags that@tanstack/router-coreis imported twice. Merge these into a single import statement.♻️ Proposed fix
-import { invariant } from '@tanstack/router-core' -import { interpolatePath, rootRouteId, trimPath } from '@tanstack/router-core' +import { invariant, interpolatePath, rootRouteId, trimPath } from '@tanstack/router-core'🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/router-devtools-core/src/BaseTanStackRouterDevtoolsPanel.tsx` around lines 2 - 3, Consolidate the duplicate imports by combining both import statements from '@tanstack/router-core' into a single import that lists invariant, interpolatePath, rootRouteId, and trimPath together; update the top of BaseTanStackRouterDevtoolsPanel.tsx to import these symbols in one line to satisfy the import/no-duplicates ESLint rule.packages/react-router/src/renderRouteNotFound.tsx (1)
23-29: Redundant condition check.The inner
if (!route.options.notFoundComponent)check on line 24 is redundant since we're already inside the outerif (!route.options.notFoundComponent)block (line 18). This was likely carried over from the previouswarning(false, ...)pattern.♻️ Suggested simplification
if (process.env.NODE_ENV !== 'production') { - if (!route.options.notFoundComponent) { - console.warn( - `Warning: A notFoundError was encountered on the route with ID "${route.id}", but a notFoundComponent option was not configured, nor was a router level defaultNotFoundComponent configured. Consider configuring at least one of these to avoid TanStack Router's overly generic defaultNotFoundComponent (<p>Not Found</p>)`, - ) - } + console.warn( + `Warning: A notFoundError was encountered on the route with ID "${route.id}", but a notFoundComponent option was not configured, nor was a router level defaultNotFoundComponent configured. Consider configuring at least one of these to avoid TanStack Router's overly generic defaultNotFoundComponent (<p>Not Found</p>)`, + ) }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/react-router/src/renderRouteNotFound.tsx` around lines 23 - 29, The code in renderRouteNotFound contains a redundant nested check for route.options.notFoundComponent: inside the outer if that already verifies !route.options.notFoundComponent you should remove the inner if and directly call console.warn when process.env.NODE_ENV !== 'production' and the route.options.notFoundComponent is falsy; update the block around renderRouteNotFound/route/options.notFoundComponent to eliminate the duplicate condition and leave a single console.warn invocation.packages/start-server-core/src/server-functions-handler.ts (1)
1-6: Consolidate duplicate imports from@tanstack/router-core.ESLint correctly flags that
@tanstack/router-coreis imported twice. Merge the imports into a single statement for cleaner code.♻️ Proposed fix
import { createRawStreamRPCPlugin, + invariant, isNotFound, isRedirect, } from '@tanstack/router-core' -import { invariant } from '@tanstack/router-core'🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/start-server-core/src/server-functions-handler.ts` around lines 1 - 6, Merge the duplicate imports from `@tanstack/router-core` into a single import statement: combine createRawStreamRPCPlugin, isNotFound, isRedirect and invariant into one consolidated import (referencing the symbols createRawStreamRPCPlugin, isNotFound, isRedirect, invariant) and remove the second import line so there is only one import from `@tanstack/router-core`.packages/start-client-core/src/client-rpc/serverFnFetcher.ts (1)
1-8: Consolidate duplicate imports from@tanstack/router-core.ESLint correctly flags that
@tanstack/router-coreis imported twice. Merge the imports into a single statement.♻️ Proposed fix
import { createRawStreamDeserializePlugin, encode, + invariant, isNotFound, parseRedirect, } from '@tanstack/router-core' import { fromCrossJSON, toJSONAsync } from 'seroval' -import { invariant } from '@tanstack/router-core'🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/start-client-core/src/client-rpc/serverFnFetcher.ts` around lines 1 - 8, The file currently imports from '@tanstack/router-core' twice; consolidate into one import by merging the two import lists so symbols createRawStreamDeserializePlugin, encode, isNotFound, parseRedirect, and invariant are imported from a single import statement; update the top-of-file imports accordingly to remove the duplicate import and keep all referenced symbols in that single import.packages/react-router/src/Match.tsx (1)
174-176: Include the caught error in the dev warning.Switching from
tiny-warningto bareconsole.warndrops the useful context you used to get when this path fired. Loggingerror(and optionallyerrorInfo) keeps production clean but makes dev failures much easier to act on.♻️ Suggested tweak
if (process.env.NODE_ENV !== 'production') { - console.warn(`Warning: Error in route match: ${matchId}`) + console.warn( + `Warning: Error in route match: ${matchId}`, + error, + errorInfo, + ) }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/react-router/src/Match.tsx` around lines 174 - 176, The dev-only warning drops useful context; update the warning inside the error-handling branch where process.env.NODE_ENV !== 'production' (the block that currently does console.warn(`Warning: Error in route match: ${matchId}`)) to include the caught error (and errorInfo if available) in the console.warn call so developers see full details — e.g., change the message to include the error object and optional errorInfo alongside matchId and ensure you reference the caught variables from the surrounding catch handler that encloses matchId.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@examples/react/start-trellaux/src/components/Column.tsx`:
- Line 2: Import order violation: move the named import "invariant" from
'../invariant' so it appears after the existing 'react-dom' import (the import
on line 5) to satisfy the ESLint import-order rule; update the import block in
Column.tsx by reordering the imports accordingly and re-run the linter to
confirm the error is resolved.
In `@examples/react/start-trellaux/src/invariant.ts`:
- Around line 1-5: The invariant function requires a message but some call sites
(e.g., Column.tsx and NewCard.tsx) call invariant(value) without it; update the
invariant function signature to make the message optional (message?: string) and
when throwing use a fallback like 'Invariant failed' (or include
String(message)) so the function still throws a meaningful error while
preserving the asserts value return type; update the export function
invariant(...) accordingly so existing call sites compile without changes.
---
Outside diff comments:
In `@examples/react/start-convex-trellaux/src/components/NewCard.tsx`:
- Line 36: The call to invariant in NewCard.tsx uses only one argument
(invariant(textAreaRef.current)) but the function signature requires (value:
unknown, message: string); update the call inside the NewCard component to pass
a descriptive message as the second argument (e.g., "textAreaRef.current is
null") so TypeScript errors are resolved and the runtime assertion provides
context; locate the invariant call by name (invariant) in NewCard.tsx and add
the message string as the second parameter.
In `@examples/react/start-trellaux/src/components/Column.tsx`:
- Line 51: The call to invariant in Column.tsx is missing the required message
argument and will fail TypeScript; update the invariant call that checks
listRef.current (reference: invariant and listRef.current in Column.tsx) to
include a short descriptive string message as the second argument (e.g.,
indicating that listRef.current is null/unavailable) so it matches the invariant
signature.
In `@examples/react/start-trellaux/src/components/NewCard.tsx`:
- Line 36: The invariant call in NewCard.tsx (involving invariant and
textAreaRef.current) lacks the required message argument and will fail
TypeScript compilation; update the call to pass a descriptive error message
(e.g., indicating textAreaRef.current is null/unavailable) so
invariant(textAreaRef.current, "<your message>") satisfies the current
signature, or alternatively use a non-null assertion at the usage site after the
invariant check if appropriate.
---
Nitpick comments:
In `@examples/react/start-convex-trellaux/src/components/Board.tsx`:
- Line 2: In Board.tsx the local import "import { invariant } from
'../invariant'" is placed before external package imports and violates ESLint
import-order; move the invariant import so that all external package imports
(React, other npm packages) appear first and then place the local relative
import of invariant after them, ensuring import { invariant } from
'../invariant' is relocated below the external imports to satisfy the project's
ordering rules.
In `@examples/react/start-convex-trellaux/src/components/Column.tsx`:
- Line 2: The ESLint import-order error is caused by placing the local import
"invariant" before external package imports; update the import order in
Column.tsx so that external modules (e.g., "react-dom" and "tailwind-merge")
come first and then import the local module "../invariant" after them, ensuring
imports are grouped as [external packages] then [local/internal] to satisfy the
project's import ordering rules.
In `@packages/react-router/src/Match.tsx`:
- Around line 174-176: The dev-only warning drops useful context; update the
warning inside the error-handling branch where process.env.NODE_ENV !==
'production' (the block that currently does console.warn(`Warning: Error in
route match: ${matchId}`)) to include the caught error (and errorInfo if
available) in the console.warn call so developers see full details — e.g.,
change the message to include the error object and optional errorInfo alongside
matchId and ensure you reference the caught variables from the surrounding catch
handler that encloses matchId.
In `@packages/react-router/src/renderRouteNotFound.tsx`:
- Around line 23-29: The code in renderRouteNotFound contains a redundant nested
check for route.options.notFoundComponent: inside the outer if that already
verifies !route.options.notFoundComponent you should remove the inner if and
directly call console.warn when process.env.NODE_ENV !== 'production' and the
route.options.notFoundComponent is falsy; update the block around
renderRouteNotFound/route/options.notFoundComponent to eliminate the duplicate
condition and leave a single console.warn invocation.
In `@packages/router-devtools-core/src/BaseTanStackRouterDevtoolsPanel.tsx`:
- Around line 2-3: Consolidate the duplicate imports by combining both import
statements from '@tanstack/router-core' into a single import that lists
invariant, interpolatePath, rootRouteId, and trimPath together; update the top
of BaseTanStackRouterDevtoolsPanel.tsx to import these symbols in one line to
satisfy the import/no-duplicates ESLint rule.
In `@packages/solid-router/src/renderRouteNotFound.tsx`:
- Around line 22-27: The nested check around console.warn is redundant; inside
the renderRouteNotFound flow where process.env.NODE_ENV !== 'production' you
already know you should warn when route.options.notFoundComponent is missing, so
remove the inner if and directly emit the warning. Locate the block using
process.env.NODE_ENV !== 'production' and the route.options.notFoundComponent
reference (and the console.warn call) and replace the nested if/console.warn
with a single conditional or inline console.warn guarded by the existing
NODE_ENV check, keeping the same warning text and referencing route.id.
In `@packages/start-client-core/src/client-rpc/serverFnFetcher.ts`:
- Around line 1-8: The file currently imports from '@tanstack/router-core'
twice; consolidate into one import by merging the two import lists so symbols
createRawStreamDeserializePlugin, encode, isNotFound, parseRedirect, and
invariant are imported from a single import statement; update the top-of-file
imports accordingly to remove the duplicate import and keep all referenced
symbols in that single import.
In `@packages/start-server-core/src/server-functions-handler.ts`:
- Around line 1-6: Merge the duplicate imports from `@tanstack/router-core` into a
single import statement: combine createRawStreamRPCPlugin, isNotFound,
isRedirect and invariant into one consolidated import (referencing the symbols
createRawStreamRPCPlugin, isNotFound, isRedirect, invariant) and remove the
second import line so there is only one import from `@tanstack/router-core`.
In `@packages/vue-router/src/renderRouteNotFound.tsx`:
- Around line 23-28: Remove the redundant inner check for
route.options.notFoundComponent inside the development-only block in
renderRouteNotFound.tsx: the outer guard already ensures notFoundComponent is
falsey, so delete the if (!route.options.notFoundComponent) wrapper and call
console.warn(...) directly; reference the existing
route.options.notFoundComponent and the development guard (process.env.NODE_ENV
!== 'production') when making the change to keep behavior identical and improve
readability.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 19faa4b5-fa00-4dbd-a537-e86414655b9f
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (59)
examples/react/start-convex-trellaux/convex/board.tsexamples/react/start-convex-trellaux/convex/invariant.tsexamples/react/start-convex-trellaux/package.jsonexamples/react/start-convex-trellaux/src/components/Board.tsxexamples/react/start-convex-trellaux/src/components/Card.tsxexamples/react/start-convex-trellaux/src/components/Column.tsxexamples/react/start-convex-trellaux/src/components/NewCard.tsxexamples/react/start-convex-trellaux/src/components/NewColumn.tsxexamples/react/start-convex-trellaux/src/invariant.tsexamples/react/start-trellaux/package.jsonexamples/react/start-trellaux/src/components/Board.tsxexamples/react/start-trellaux/src/components/Card.tsxexamples/react/start-trellaux/src/components/Column.tsxexamples/react/start-trellaux/src/components/NewCard.tsxexamples/react/start-trellaux/src/components/NewColumn.tsxexamples/react/start-trellaux/src/db/board.tsexamples/react/start-trellaux/src/invariant.tspackages/react-router/package.jsonpackages/react-router/src/Match.tsxpackages/react-router/src/Matches.tsxpackages/react-router/src/fileRoute.tspackages/react-router/src/renderRouteNotFound.tsxpackages/react-router/src/useMatch.tsxpackages/react-router/src/useRouter.tsxpackages/react-router/tests/redirect.test.tsxpackages/react-start-client/package.jsonpackages/react-start-client/src/renderRSC.tsxpackages/router-core/package.jsonpackages/router-core/src/index.tspackages/router-core/src/invariant.tspackages/router-core/src/load-matches.tspackages/router-core/src/new-process-route-tree.tspackages/router-core/src/route.tspackages/router-core/src/ssr/ssr-client.tspackages/router-core/src/ssr/ssr-server.tspackages/router-devtools-core/package.jsonpackages/router-devtools-core/src/BaseTanStackRouterDevtoolsPanel.tsxpackages/solid-router/package.jsonpackages/solid-router/src/Match.tsxpackages/solid-router/src/Matches.tsxpackages/solid-router/src/fileRoute.tspackages/solid-router/src/renderRouteNotFound.tsxpackages/solid-router/src/useMatch.tsxpackages/solid-router/src/useRouter.tsxpackages/solid-router/tests/redirect.test.tsxpackages/solid-start-client/package.jsonpackages/start-client-core/package.jsonpackages/start-client-core/src/client-rpc/serverFnFetcher.tspackages/start-server-core/package.jsonpackages/start-server-core/src/server-functions-handler.tspackages/vue-router/package.jsonpackages/vue-router/src/Match.tsxpackages/vue-router/src/Matches.tsxpackages/vue-router/src/fileRoute.tspackages/vue-router/src/renderRouteNotFound.tsxpackages/vue-router/src/useMatch.tsxpackages/vue-router/src/useRouter.tsxpackages/vue-router/tests/redirect.test.tsxpackages/vue-start-client/package.json
💤 Files with no reviewable changes (2)
- examples/react/start-trellaux/package.json
- examples/react/start-convex-trellaux/package.json
Summary
invariant()helper from@tanstack/router-coreand replacetiny-invariantacross the repo with dev-only detailed errors plus a generic production throwtiny-warningusages with dev-onlyconsole.warn(...)guards so warning strings disappear from production bundlestiny-invariantandtiny-warningdependencies, update the lockfile, and replace example/test-only assertions with local helpers or direct checksBenchmark
mainbaseline from@benchmarks/bundle-size:react-router.minimal:-889 raw / -401 gzip / -355 brotlireact-router.full:-889 raw / -415 gzip / -306 brotlireact-start.minimal:-1204 raw / -555 gzip / -349 brotlireact-start.full:-1202 raw / -506 gzip / -440 brotliTesting
CI=1 NX_DAEMON=false pnpm nx affected --target=test:eslint --exclude=examples/**,e2e/** --outputStyle=stream --skipRemoteCacheCI=1 NX_DAEMON=false pnpm nx affected --target=test:types --exclude=examples/** --outputStyle=stream --skipRemoteCacheCI=1 NX_DAEMON=false pnpm nx affected --target=test:unit --exclude=examples/**,e2e/** --outputStyle=stream --skipRemoteCacheCI=1 NX_DAEMON=false pnpm nx run @benchmarks/bundle-size:build --outputStyle=stream --skipRemoteCache --skipNxCacheSummary by CodeRabbit
Chores
Refactor