-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
chore: use "preview" instead of "serve" to refer to "vite preview" #5917
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughSystematically renames npm scripts from "serve" to "preview" across 100+ package.json files in e2e test directories and example projects, updating corresponding Playwright configurations to invoke the renamed "preview" script instead of "serve". Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
View your CI Pipeline Execution ↗ for commit 5e96e70
☁️ Nx Cloud last updated this comment at |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
e2e/solid-router/js-only-file-based/playwright.config.ts (1)
30-30: Confirm whether VITE_ vars are needed bypnpm previewas well*As written,
VITE_NODE_ENV,VITE_EXTERNAL_PORT, andVITE_SERVER_PORTare only applied topnpm build; in most shells, they won’t be set for thepnpm previewstep incmd1 && cmd2.If the runtime app/tests rely on these VITE_* vars during preview (similar to how
e2e/solid-router/basic-virtual-file-based/playwright.config.tsprefixes both commands), consider mirroring that pattern:- command: `VITE_NODE_ENV="test" VITE_EXTERNAL_PORT=${EXTERNAL_PORT} VITE_SERVER_PORT=${PORT} pnpm build && pnpm preview --port ${PORT}`, + command: `VITE_NODE_ENV="test" VITE_EXTERNAL_PORT=${EXTERNAL_PORT} VITE_SERVER_PORT=${PORT} pnpm build && VITE_NODE_ENV="test" VITE_EXTERNAL_PORT=${EXTERNAL_PORT} VITE_SERVER_PORT=${PORT} pnpm preview --port ${PORT}`,e2e/react-router/view-transitions/playwright.config.ts (1)
29-29: Double-check env propagation topnpm previewHere too,
VITE_NODE_ENV,VITE_SERVER_PORT, andVITE_EXTERNAL_PORTare only applied topnpm build; thepnpm previewstep will typically not inherit these inline assignments.If your view-transitions tests depend on these VITE_* values at runtime, consider mirroring the pattern used in
e2e/solid-router/basic-virtual-file-based/playwright.config.ts:- command: `VITE_NODE_ENV="test" VITE_SERVER_PORT=${PORT} VITE_EXTERNAL_PORT=${EXTERNAL_PORT} pnpm build && pnpm preview --port ${PORT}`, + command: `VITE_NODE_ENV="test" VITE_SERVER_PORT=${PORT} VITE_EXTERNAL_PORT=${EXTERNAL_PORT} pnpm build && VITE_NODE_ENV="test" VITE_SERVER_PORT=${PORT} VITE_EXTERNAL_PORT=${EXTERNAL_PORT} pnpm preview --port ${PORT}`,
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (107)
e2e/react-router/basepath-file-based/package.json(1 hunks)e2e/react-router/basepath-file-based/playwright.config.ts(1 hunks)e2e/react-router/basic-file-based-code-splitting/package.json(1 hunks)e2e/react-router/basic-file-based-code-splitting/playwright.config.ts(1 hunks)e2e/react-router/basic-file-based/package.json(1 hunks)e2e/react-router/basic-file-based/playwright.config.ts(1 hunks)e2e/react-router/basic-react-query-file-based/package.json(1 hunks)e2e/react-router/basic-react-query-file-based/playwright.config.ts(1 hunks)e2e/react-router/basic-react-query/package.json(1 hunks)e2e/react-router/basic-react-query/playwright.config.ts(1 hunks)e2e/react-router/basic-scroll-restoration/package.json(1 hunks)e2e/react-router/basic-scroll-restoration/playwright.config.ts(1 hunks)e2e/react-router/basic-virtual-file-based/package.json(1 hunks)e2e/react-router/basic-virtual-file-based/playwright.config.ts(1 hunks)e2e/react-router/basic-virtual-named-export-config-file-based/package.json(1 hunks)e2e/react-router/basic-virtual-named-export-config-file-based/playwright.config.ts(1 hunks)e2e/react-router/basic/package.json(1 hunks)e2e/react-router/basic/playwright.config.ts(1 hunks)e2e/react-router/generator-cli-only/package.json(1 hunks)e2e/react-router/generator-cli-only/playwright.config.ts(1 hunks)e2e/react-router/js-only-file-based/package.json(1 hunks)e2e/react-router/js-only-file-based/playwright.config.ts(1 hunks)e2e/react-router/scroll-restoration-sandbox-vite/package.json(1 hunks)e2e/react-router/scroll-restoration-sandbox-vite/playwright.browser.config.ts(1 hunks)e2e/react-router/scroll-restoration-sandbox-vite/playwright.hash.config.ts(1 hunks)e2e/react-router/sentry-integration/package.json(1 hunks)e2e/react-router/sentry-integration/playwright.config.ts(1 hunks)e2e/react-router/view-transitions/package.json(1 hunks)e2e/react-router/view-transitions/playwright.config.ts(1 hunks)e2e/solid-router/basepath-file-based/package.json(1 hunks)e2e/solid-router/basepath-file-based/playwright.config.ts(1 hunks)e2e/solid-router/basic-file-based-code-splitting/package.json(1 hunks)e2e/solid-router/basic-file-based-code-splitting/playwright.config.ts(1 hunks)e2e/solid-router/basic-file-based/package.json(1 hunks)e2e/solid-router/basic-file-based/playwright.config.ts(1 hunks)e2e/solid-router/basic-scroll-restoration/package.json(1 hunks)e2e/solid-router/basic-scroll-restoration/playwright.config.ts(1 hunks)e2e/solid-router/basic-solid-query-file-based/package.json(1 hunks)e2e/solid-router/basic-solid-query-file-based/playwright.config.ts(1 hunks)e2e/solid-router/basic-solid-query/package.json(1 hunks)e2e/solid-router/basic-solid-query/playwright.config.ts(1 hunks)e2e/solid-router/basic-virtual-file-based/package.json(1 hunks)e2e/solid-router/basic-virtual-file-based/playwright.config.ts(1 hunks)e2e/solid-router/basic-virtual-named-export-config-file-based/package.json(1 hunks)e2e/solid-router/basic-virtual-named-export-config-file-based/playwright.config.ts(1 hunks)e2e/solid-router/basic/package.json(1 hunks)e2e/solid-router/basic/playwright.config.ts(1 hunks)e2e/solid-router/generator-cli-only/package.json(1 hunks)e2e/solid-router/generator-cli-only/playwright.config.ts(1 hunks)e2e/solid-router/js-only-file-based/package.json(1 hunks)e2e/solid-router/js-only-file-based/playwright.config.ts(1 hunks)e2e/solid-router/scroll-restoration-sandbox-vite/package.json(1 hunks)e2e/solid-router/scroll-restoration-sandbox-vite/playwright.browser.config.ts(1 hunks)e2e/solid-router/scroll-restoration-sandbox-vite/playwright.hash.config.ts(1 hunks)e2e/solid-router/sentry-integration/package.json(1 hunks)e2e/solid-router/sentry-integration/playwright.config.ts(1 hunks)e2e/solid-router/view-transitions/package.json(1 hunks)e2e/solid-router/view-transitions/playwright.config.ts(1 hunks)examples/react/authenticated-routes-firebase/package.json(1 hunks)examples/react/authenticated-routes/package.json(1 hunks)examples/react/basic-default-search-params/package.json(1 hunks)examples/react/basic-devtools-panel/package.json(1 hunks)examples/react/basic-file-based/package.json(1 hunks)examples/react/basic-non-nested-devtools/package.json(1 hunks)examples/react/basic-react-query-file-based/package.json(1 hunks)examples/react/basic-react-query/package.json(1 hunks)examples/react/basic-virtual-file-based/package.json(1 hunks)examples/react/basic-virtual-inside-file-based/package.json(1 hunks)examples/react/basic/package.json(1 hunks)examples/react/deferred-data/package.json(1 hunks)examples/react/i18n-paraglide/package.json(1 hunks)examples/react/kitchen-sink-file-based/package.json(1 hunks)examples/react/kitchen-sink-react-query-file-based/package.json(1 hunks)examples/react/kitchen-sink-react-query/package.json(1 hunks)examples/react/kitchen-sink/package.json(1 hunks)examples/react/large-file-based/package.json(1 hunks)examples/react/location-masking/package.json(1 hunks)examples/react/navigation-blocking/package.json(1 hunks)examples/react/quickstart-file-based/package.json(1 hunks)examples/react/quickstart/package.json(1 hunks)examples/react/router-monorepo-react-query/packages/app/package.json(1 hunks)examples/react/router-monorepo-simple-lazy/packages/app/package.json(1 hunks)examples/react/router-monorepo-simple/packages/app/package.json(1 hunks)examples/react/scroll-restoration/package.json(1 hunks)examples/react/search-validator-adapters/package.json(1 hunks)examples/react/start-bun/package.json(1 hunks)examples/react/start-i18n-paraglide/package.json(1 hunks)examples/react/view-transitions/package.json(1 hunks)examples/react/with-framer-motion/package.json(1 hunks)examples/solid/authenticated-routes-firebase/package.json(1 hunks)examples/solid/authenticated-routes/package.json(1 hunks)examples/solid/basic-default-search-params/package.json(1 hunks)examples/solid/basic-devtools-panel/package.json(1 hunks)examples/solid/basic-file-based/package.json(1 hunks)examples/solid/basic-non-nested-devtools/package.json(1 hunks)examples/solid/basic-solid-query-file-based/package.json(1 hunks)examples/solid/basic-solid-query/package.json(1 hunks)examples/solid/basic-virtual-file-based/package.json(1 hunks)examples/solid/basic-virtual-inside-file-based/package.json(1 hunks)examples/solid/basic/package.json(1 hunks)examples/solid/deferred-data/package.json(1 hunks)examples/solid/i18n-paraglide/package.json(1 hunks)examples/solid/kitchen-sink-file-based/package.json(1 hunks)examples/solid/kitchen-sink-solid-query-file-based/package.json(1 hunks)examples/solid/kitchen-sink-solid-query/package.json(1 hunks)examples/solid/kitchen-sink/package.json(1 hunks)examples/solid/large-file-based/package.json(1 hunks)
⛔ Files not processed due to max files limit (13)
- examples/solid/location-masking/package.json
- examples/solid/navigation-blocking/package.json
- examples/solid/quickstart-file-based/package.json
- examples/solid/quickstart/package.json
- examples/solid/router-monorepo-simple-lazy/packages/app/package.json
- examples/solid/router-monorepo-simple/packages/app/package.json
- examples/solid/router-monorepo-solid-query/packages/app/package.json
- examples/solid/scroll-restoration/package.json
- examples/solid/search-validator-adapters/package.json
- examples/solid/start-bun/package.json
- examples/solid/start-i18n-paraglide/package.json
- examples/solid/view-transitions/package.json
- examples/solid/with-framer-motion/package.json
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-10-08T08:11:47.088Z
Learnt from: nlynzaad
Repo: TanStack/router PR: 5402
File: packages/router-generator/tests/generator/no-formatted-route-tree/routeTree.nonnested.snapshot.ts:19-21
Timestamp: 2025-10-08T08:11:47.088Z
Learning: Test snapshot files in the router-generator tests directory (e.g., files matching the pattern `packages/router-generator/tests/generator/**/routeTree*.snapshot.ts` or `routeTree*.snapshot.js`) should not be modified or have issues flagged, as they are fixtures used to verify the generator's output and are intentionally preserved as-is.
Applied to files:
e2e/solid-router/basic/playwright.config.tse2e/solid-router/basepath-file-based/playwright.config.tse2e/solid-router/basic-file-based/playwright.config.tse2e/solid-router/generator-cli-only/playwright.config.ts
🧬 Code graph analysis (20)
e2e/react-router/basic-react-query-file-based/playwright.config.ts (2)
e2e/react-start/server-functions/playwright.config.ts (1)
PORT(5-5)e2e/solid-start/server-functions/playwright.config.ts (1)
PORT(5-5)
e2e/react-router/basic-scroll-restoration/playwright.config.ts (2)
e2e/react-start/server-functions/playwright.config.ts (1)
PORT(5-5)e2e/solid-start/server-functions/playwright.config.ts (1)
PORT(5-5)
e2e/solid-router/basic/playwright.config.ts (2)
e2e/react-start/server-functions/playwright.config.ts (1)
PORT(5-5)e2e/solid-start/server-functions/playwright.config.ts (1)
PORT(5-5)
e2e/solid-router/basic-scroll-restoration/playwright.config.ts (2)
e2e/react-start/server-functions/playwright.config.ts (1)
PORT(5-5)e2e/solid-start/server-functions/playwright.config.ts (1)
PORT(5-5)
e2e/react-router/sentry-integration/playwright.config.ts (2)
e2e/react-start/server-functions/playwright.config.ts (1)
PORT(5-5)e2e/solid-start/server-functions/playwright.config.ts (1)
PORT(5-5)
e2e/react-router/scroll-restoration-sandbox-vite/playwright.browser.config.ts (2)
e2e/react-start/server-functions/playwright.config.ts (1)
PORT(5-5)e2e/solid-start/server-functions/playwright.config.ts (1)
PORT(5-5)
e2e/react-router/basic-virtual-named-export-config-file-based/playwright.config.ts (2)
e2e/react-start/server-functions/playwright.config.ts (1)
PORT(5-5)e2e/solid-start/server-functions/playwright.config.ts (1)
PORT(5-5)
e2e/solid-router/basic-virtual-file-based/playwright.config.ts (2)
e2e/react-start/server-functions/playwright.config.ts (1)
PORT(5-5)e2e/solid-start/server-functions/playwright.config.ts (1)
PORT(5-5)
e2e/react-router/scroll-restoration-sandbox-vite/playwright.hash.config.ts (2)
e2e/react-start/server-functions/playwright.config.ts (1)
PORT(5-5)e2e/solid-start/server-functions/playwright.config.ts (1)
PORT(5-5)
e2e/react-router/basic-virtual-file-based/playwright.config.ts (2)
e2e/react-start/server-functions/playwright.config.ts (1)
PORT(5-5)e2e/solid-start/server-functions/playwright.config.ts (1)
PORT(5-5)
e2e/solid-router/basic-file-based-code-splitting/playwright.config.ts (2)
e2e/react-start/server-functions/playwright.config.ts (1)
PORT(5-5)e2e/solid-start/server-functions/playwright.config.ts (1)
PORT(5-5)
e2e/solid-router/basic-solid-query-file-based/playwright.config.ts (2)
e2e/react-start/server-functions/playwright.config.ts (1)
PORT(5-5)e2e/solid-start/server-functions/playwright.config.ts (1)
PORT(5-5)
e2e/react-router/js-only-file-based/playwright.config.ts (2)
e2e/react-start/server-functions/playwright.config.ts (1)
PORT(5-5)e2e/solid-start/server-functions/playwright.config.ts (1)
PORT(5-5)
e2e/react-router/basic-file-based-code-splitting/playwright.config.ts (2)
e2e/react-start/server-functions/playwright.config.ts (1)
PORT(5-5)e2e/solid-start/server-functions/playwright.config.ts (1)
PORT(5-5)
e2e/react-router/basic-react-query/playwright.config.ts (2)
e2e/react-start/server-functions/playwright.config.ts (1)
PORT(5-5)e2e/solid-start/server-functions/playwright.config.ts (1)
PORT(5-5)
e2e/solid-router/basic-solid-query/playwright.config.ts (2)
e2e/react-start/server-functions/playwright.config.ts (1)
PORT(5-5)e2e/solid-start/server-functions/playwright.config.ts (1)
PORT(5-5)
e2e/solid-router/basic-virtual-named-export-config-file-based/playwright.config.ts (2)
e2e/react-start/server-functions/playwright.config.ts (1)
PORT(5-5)e2e/solid-start/server-functions/playwright.config.ts (1)
PORT(5-5)
e2e/react-router/generator-cli-only/playwright.config.ts (2)
e2e/react-start/server-functions/playwright.config.ts (1)
PORT(5-5)e2e/solid-start/server-functions/playwright.config.ts (1)
PORT(5-5)
e2e/react-router/basic/playwright.config.ts (2)
e2e/react-start/server-functions/playwright.config.ts (1)
PORT(5-5)e2e/solid-start/server-functions/playwright.config.ts (1)
PORT(5-5)
e2e/solid-router/scroll-restoration-sandbox-vite/playwright.hash.config.ts (2)
e2e/react-start/server-functions/playwright.config.ts (1)
PORT(5-5)e2e/solid-start/server-functions/playwright.config.ts (1)
PORT(5-5)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Preview
- GitHub Check: Test
🔇 Additional comments (107)
examples/react/start-i18n-paraglide/package.json (1)
9-9: LGTM!The script rename from
"serve"to"preview"is a straightforward, low-risk change that aligns with Vite's naming convention and the PR objectives. The underlying command (vite preview) remains unchanged, preserving the intended behavior for this example project.examples/react/quickstart-file-based/package.json (1)
8-8: Script rename is semantically appropriate and aligns with PR objectives.Renaming "serve" to "preview" accurately reflects the command's purpose (
vite previewserves the production build for preview, distinct from the dev server). The change is consistent with the broader systematic updates across the repository.examples/solid/large-file-based/package.json (1)
8-8: Script naming aligns with Vite terminology.The renamed "preview" script correctly points to
vite preview, which is Vite's standard command for previewing production builds. This naming change improves clarity and consistency with Vite's vocabulary throughout the codebase.examples/react/basic-devtools-panel/package.json (1)
8-8: Script renamed for terminology alignment.Renaming
servetopreviewbetter reflects Vite's terminology and intent—this script runs the Vite preview server, not a general-purpose development server.examples/solid/basic-solid-query-file-based/package.json (1)
9-9: Terminology alignment looks good.The rename from
"serve"to"preview"correctly reflects Vite's conventions for production preview builds, improving script naming clarity and consistency.examples/solid/authenticated-routes/package.json (1)
8-8: LGTM!Renaming the script from "serve" to "preview" correctly aligns with Vite's native command terminology and improves clarity for developers familiar with Vite's CLI.
examples/react/location-masking/package.json (1)
8-8: Script rename is semantically accurate.Renaming the script from "serve" to "preview" aligns with Vite's CLI terminology and clarifies intent.
Please verify that all references to the "serve" script have been updated elsewhere in the codebase (e.g., Playwright configurations, CI/CD scripts, documentation, or test runners that may invoke this script). Since this is part of a systematic rename across 100+ files, ensure consistency across the entire PR scope.
examples/solid/basic-non-nested-devtools/package.json (1)
8-8: Script rename aligns with Vite terminology.The rename from
"serve"to"preview"accurately reflects the underlying command (vite preview) and aligns with the broader PR objective to standardize terminology across the repository.Please confirm that all Playwright/e2e configurations and other test/build tooling that previously invoked
pnpm serve(ornpm run serve) in this example have been similarly updated to invokepnpm preview(ornpm run preview). The AI-generated summary indicates this is a coordinated 100+ file rename; ensure no orphaned references remain.examples/solid/basic-solid-query/package.json (1)
8-8: Script rename from "serve" to "preview" looks good.Renaming to "preview" better aligns with Vite's terminology (
vite previewcommand). The change is appropriate for this example project.Since this is part of a systematic rename across 100+ files, please verify that all corresponding Playwright test configurations for this example have been updated to reference the renamed "preview" script instead of "serve".
examples/react/router-monorepo-react-query/packages/app/package.json (1)
8-8: Naming improvement aligns with Vite's standard terminology.Renaming the script from "serve" to "preview" improves semantic clarity and aligns with Vite's standard CLI naming convention for the
vite previewcommand. The underlying functionality remains unchanged, and this change is consistent with the broader systematic updates across the project.e2e/solid-router/scroll-restoration-sandbox-vite/package.json (1)
10-10: Script rename aligns with PR objectives.The renaming of "serve" to "preview" correctly mirrors the underlying
vite previewcommand and improves semantic clarity across the codebase.Verify that the Playwright config files referenced in this package.json (playwright.browser.config.ts and playwright.hash.config.ts) have been updated to invoke
pnpm previewinstead ofpnpm serve, ensuring consistency across the e2e test setup.examples/solid/basic/package.json (1)
8-8: Script rename looks good.The "serve" → "preview" rename aligns with the PR objective and is semantically more accurate for
vite preview. Ensure any Playwright configurations in this directory were also updated to call the new "preview" script instead of "serve".examples/react/search-validator-adapters/package.json (1)
8-8: Script rename aligns with Vite conventions.The change from "serve" to "preview" standardizes the script naming to match Vite's native
vite previewcommand, improving clarity and consistency across the project.examples/react/basic-react-query-file-based/package.json (1)
8-8: ✓ Semantic naming improvement.Renaming the script from "serve" to "preview" is appropriate since
vite previewpreviews the production build rather than serving a dev server. This aligns with Vite's CLI conventions and improves clarity.examples/solid/i18n-paraglide/package.json (1)
9-9: LGTM!The rename from "serve" to "preview" aligns with Vite's command naming convention and is consistent with the PR objective. The underlying command remains correct, and the vite dependency is present.
examples/react/basic-virtual-file-based/package.json (1)
8-8: Script rename is semantically correct.The change from
"serve"to"preview"aligns with Vite conventions and clearly indicates the script invokesvite preview.Verify that all corresponding Playwright configuration files and documentation have been updated to reference the renamed
"preview"script instead of"serve", ensuring consistency across the entire PR scope (reported as 100+ files).examples/react/basic-virtual-inside-file-based/package.json (1)
8-8: Consistent renaming across example projects.This change mirrors the pattern in the sibling example project and maintains consistency throughout the refactor.
examples/react/basic-react-query/package.json (1)
8-8: ✓ Script rename is correct and aligns with PR objectives.The addition of the "preview" script using the
vite previewcommand is appropriate and consistent with the broader systematic rename across the codebase. The naming now aligns with Vite's terminology and conventions.e2e/solid-router/basic-virtual-named-export-config-file-based/playwright.config.ts (1)
28-33: webServer now correctly targets the renamedpreviewscriptSwitching the command to
pnpm preview --port ${PORT}while keeping the same env vars and build step is consistent with the newpreviewscript and the PR’s intent. No issues spotted.e2e/solid-router/basic-virtual-named-export-config-file-based/package.json (1)
5-12:previewscript aligns with Vite and Playwright usageDefining
"preview": "vite preview"matches Vite’s standard naming and the updated Playwright command (pnpm preview). This keeps scripts consistent and clear.examples/react/router-monorepo-simple-lazy/packages/app/package.json (1)
5-10: Script rename from "serve" to "preview" improves alignment with Vite terminology.The change correctly renames the npm script key from "serve" to "preview" while preserving the underlying "vite preview" command. This improves clarity and aligns the script name with Vite's own naming conventions.
Verify that all references to this package's "serve" script have been updated: Since this is a breaking change for anyone calling
pnpm servefrom this package, please confirm that:
- All e2e/Playwright configuration files that invoke this script have been updated to use
pnpm previewinstead.- No other files in the codebase continue to reference
npm run servefor this package.examples/react/router-monorepo-simple/packages/app/package.json (1)
5-10: Script rename from "serve" to "preview" improves alignment with Vite terminology.The change correctly renames the npm script key from "serve" to "preview" while preserving the underlying "vite preview" command. This improves clarity and aligns the script name with Vite's own naming conventions.
Verify that all references to this package's "serve" script have been updated: Since this is a breaking change for anyone calling
pnpm servefrom this package, please confirm that:
- All e2e/Playwright configuration files that invoke this script have been updated to use
pnpm previewinstead.- No other files in the codebase continue to reference
npm run servefor this package.e2e/react-router/basic-scroll-restoration/playwright.config.ts (1)
22-22: LGTM! Script reference updated correctly.The command now correctly references
pnpm previewto match the renamed script in package.json, while preserving all environment variables and port configurations.e2e/react-router/basic-scroll-restoration/package.json (1)
9-9: LGTM! Script name now matches Vite's terminology.The script key has been correctly renamed from "serve" to "preview", which better reflects the actual
vite previewcommand being executed. The corresponding playwright.config.ts has also been updated consistently.e2e/solid-router/basic-scroll-restoration/package.json (1)
9-9: LGTM! Script rename aligns with Vite conventions.The rename from "serve" to "preview" better reflects Vite's official naming and improves semantic clarity throughout the codebase.
e2e/solid-router/basic-scroll-restoration/playwright.config.ts (1)
22-22: LGTM! Command correctly updated to match renamed script.The Playwright webServer command now correctly invokes
pnpm preview, maintaining consistency with the package.json script rename.e2e/solid-router/scroll-restoration-sandbox-vite/playwright.browser.config.ts (1)
32-32: LGTM! Thepreviewscript is properly defined in package.json.Verification confirms that
e2e/solid-router/scroll-restoration-sandbox-vite/package.jsoncontains thepreviewscript (vite preview), making the command update on line 32 valid and consistent with the PR objectives.e2e/react-router/basic-virtual-file-based/playwright.config.ts (1)
29-29: LGTM! Script name updated correctly.The change from
pnpm servetopnpm previewcorrectly reflects the script rename in package.json while preserving all functionality (build step, environment variables, and port configuration).e2e/react-router/basic-virtual-file-based/package.json (1)
9-9: LGTM! Terminology aligned with Vite conventions.The rename from "serve" to "preview" correctly aligns with Vite's official terminology for serving production builds locally, while maintaining the same underlying command.
e2e/react-router/scroll-restoration-sandbox-vite/playwright.hash.config.ts (1)
33-33: Verification confirmed: package.json is correctly updated.The package.json contains the "preview" script (
vite preview) and the "serve" script has been removed. The change in playwright.hash.config.ts is safe and will execute correctly.examples/solid/basic-devtools-panel/package.json (1)
8-8: Script rename is correctly applied with no lingering references.The package.json change to
"preview": "vite preview"is properly implemented. Verification confirms no "serve" script references remain in the example directory, and there are no integrated Playwright configurations at this level requiring updates.examples/react/start-bun/package.json (1)
9-9: No consuming code found; change is isolated and safe.The "start-bun" example package is not referenced by any e2e tests, CI/CD workflows, or orchestration code. Search results show references only in the dependency lock file, package metadata, and documentation links—none of which invoke npm scripts. The rename from "serve" to "preview" is isolated to this single file and aligns with Vite conventions.
examples/solid/basic-virtual-file-based/package.json (1)
8-8: Script rename correctly implemented across example and e2e tests.The change in
examples/solid/basic-virtual-file-based/package.jsonaligns with Vite conventions. Verification confirms that the corresponding e2e test configuration (e2e/solid-router/basic-virtual-file-based/) has been consistently updated: both the e2epackage.jsonandplaywright.config.tsnow referencepnpm previewinstead of the oldservescript. No further action needed.e2e/solid-router/scroll-restoration-sandbox-vite/playwright.hash.config.ts (1)
32-32: The--outDirflag is not recognized byvite previewand will not work as intended.The
previewscript is the standardvite previewcommand, which does not accept--outDiras a CLI argument. The flag will be silently ignored, causing the preview to serve from the defaultdistdirectory instead ofdist-hashwhere the build artifacts were placed.Fix: Add
build.outDir = 'dist-hash'to yourvite.config.tsso that both the build and preview commands reference the same output directory. Alternatively, remove the--outDir dist-hashflag from the preview command if the vite config is properly configured.export default defineConfig({ build: { outDir: 'dist-hash', }, plugins: [tanstackRouter({ target: 'solid' }), solid()], })⛔ Skipped due to learnings
Learnt from: nlynzaad Repo: TanStack/router PR: 5402 File: packages/router-generator/tests/generator/no-formatted-route-tree/routeTree.nonnested.snapshot.ts:19-21 Timestamp: 2025-10-08T08:11:47.088Z Learning: Test snapshot files in the router-generator tests directory (e.g., files matching the pattern `packages/router-generator/tests/generator/**/routeTree*.snapshot.ts` or `routeTree*.snapshot.js`) should not be modified or have issues flagged, as they are fixtures used to verify the generator's output and are intentionally preserved as-is.Learnt from: schiller-manuel Repo: TanStack/router PR: 5330 File: e2e/react-start/custom-basepath/src/routeTree.gen.ts:58-61 Timestamp: 2025-10-01T18:31:35.420Z Learning: Do not review files named `routeTree.gen.ts` in TanStack Router repositories, as these are autogenerated files that should not be manually modified.Learnt from: schiller-manuel Repo: TanStack/router PR: 5330 File: packages/router-core/src/router.ts:2231-2245 Timestamp: 2025-10-01T18:30:26.591Z Learning: In `packages/router-core/src/router.ts`, the `resolveRedirect` method intentionally strips the router's origin from redirect URLs when they match (e.g., `https://foo.com/bar` → `/bar` for same-origin redirects) while preserving the full URL for cross-origin redirects. This logic should not be removed or simplified to use `location.publicHref` directly.Learnt from: hokkyss Repo: TanStack/router PR: 5418 File: e2e/react-start/custom-identifier-prefix/public/site.webmanifest:2-3 Timestamp: 2025-10-09T12:59:14.842Z Learning: In e2e test fixtures (files under e2e directories), empty or placeholder values in configuration files like site.webmanifest are acceptable and should not be flagged unless the test specifically validates those fields.examples/react/authenticated-routes/package.json (1)
8-8: Preview script aligns with PR intent
"preview": "vite preview"is consistent with the rest of the scripts and the PR’s rename goal; no issues here.examples/solid/deferred-data/package.json (1)
8-8: Script rename is consistent and non-breakingUsing
"preview": "vite preview"here keeps behavior the same while standardizing the script name.examples/solid/basic-virtual-inside-file-based/package.json (1)
8-8: Preview script matches other Solid examplesThe
"preview": "vite preview"script is correct and consistent with the rest of the repo’s convention in this PR.e2e/solid-router/basic/playwright.config.ts (1)
29-29: Web server command correctly switched topnpm previewThe command keeps the same env vars, build step, and port while replacing
servewithpreview, which is exactly what we want.e2e/solid-router/sentry-integration/playwright.config.ts (1)
22-22: Preview server usage is consistent with other e2e configsSwitching to
pnpm previewhere maintains the same build and port wiring and aligns with the rest of the suite.e2e/solid-router/basic-solid-query/package.json (1)
9-9: Preview script wired correctly for this e2e packageThe
"preview": "vite preview"entry fits with the existing dev/build/test scripts and supports the Playwright config changes.e2e/solid-router/basic-solid-query/playwright.config.ts (1)
30-30: Playwright webServer now correctly targetspnpm previewThe updated command mirrors the pattern used in other configs and preserves env/port handling.
examples/react/basic/package.json (1)
8-8: React example’s preview script matches the new conventionDefining
"preview": "vite preview"here aligns this example with the rest of the repo’s script naming.e2e/react-router/scroll-restoration-sandbox-vite/playwright.browser.config.ts (1)
33-33: LGTM! Consistent rename to "preview".The change from
pnpm servetopnpm previewaligns with Vite's naming convention and matches the corresponding package.json update.examples/solid/kitchen-sink-file-based/package.json (1)
8-8: LGTM! Script name now matches Vite convention.The rename from "serve" to "preview" better reflects that this runs
vite preview, which previews the production build.e2e/react-router/basic/playwright.config.ts (1)
29-29: LGTM! Consistent with the "preview" naming convention.The command correctly switches to
pnpm previewwhile preserving all environment variables and build steps.e2e/react-router/generator-cli-only/playwright.config.ts (1)
29-29: LGTM! Playwright config updated correctly.The server command now uses
pnpm preview, matching the renamed package.json script.e2e/react-router/basic-virtual-named-export-config-file-based/playwright.config.ts (1)
29-29: LGTM! Webserver command updated appropriately.e2e/solid-router/view-transitions/package.json (1)
9-9: LGTM! Script naming now aligns with Vite.examples/react/large-file-based/package.json (1)
8-8: LGTM! Consistent script rename.e2e/react-router/scroll-restoration-sandbox-vite/package.json (1)
10-10: Verification complete—no issues found, changes are consistent.The verification confirms the script rename is correct and complete. All playwright configs that reference scripts have corresponding definitions in their package.json files. The two remaining "serve" references are in esbuild-based projects (not Vite), where the "serve" script legitimately uses
esbuild --servedirrather thanvite preview, so these are intentionally preserved and not part of the rename scope.e2e/solid-router/basic-file-based-code-splitting/playwright.config.ts (1)
29-29: LGTM! Script reference updated correctly.The command now correctly references
pnpm previewinstead ofpnpm serve, aligning with Vite's terminology. Port and environment variable configurations are preserved.e2e/solid-router/basic-solid-query-file-based/playwright.config.ts (1)
29-29: LGTM! Script reference updated correctly.The command now references
pnpm previewinstead ofpnpm serve. Configuration remains otherwise unchanged.e2e/solid-router/view-transitions/playwright.config.ts (1)
29-29: LGTM! Script reference updated correctly.The webServer command now uses
pnpm previewinstead ofpnpm serve, consistent with the PR's renaming objective.e2e/solid-router/generator-cli-only/playwright.config.ts (1)
29-29: LGTM! Script reference updated correctly.The command now uses
pnpm preview, aligning with the renamed script in the corresponding package.json.e2e/solid-router/basic-file-based/playwright.config.ts (1)
12-13: LGTM! Command variables renamed correctly.Both command variables now reference the renamed
previewandpreview:nonnestedscripts instead ofserve. The logic and configuration remain unchanged.examples/react/with-framer-motion/package.json (1)
8-8: LGTM! Script renamed correctly.The script has been renamed from
servetopreview, maintaining the samevite previewcommand. This change aligns with Vite's naming conventions.examples/react/view-transitions/package.json (1)
8-8: LGTM! Script renamed correctly.The script has been renamed from
servetopreviewwhile keeping the underlyingvite previewcommand unchanged. This aligns with Vite's official terminology.e2e/solid-router/basic-file-based/package.json (1)
11-12: Verification complete: Script renaming is correctly implemented throughout the codebase.The playwright.config.ts correctly references the renamed scripts:
- Lines 13-14 use
pnpm preview:nonnestedandpnpm preview(updated from oldservevariants)- Global search found no remaining references to old script names
- No broken references exist
e2e/react-router/basic-file-based/playwright.config.ts (1)
12-13: Switch topnpm previewfor Playwright webServer is consistentUsing
pnpm build(:nonnested) && pnpm preview(:nonnested) --port ${PORT}matches the PR intent and keeps behavior aligned with the configured env/ports.examples/react/quickstart/package.json (1)
8-8:previewscript rename looks goodRenaming the script key to
"preview"while keeping"vite preview"preserves behavior and matches the new naming convention.examples/solid/basic-default-search-params/package.json (1)
8-8: Solid examplepreviewscript rename is correctUsing
"preview": "vite preview"matches the new convention and keeps the same Vite behavior.e2e/solid-router/basic-virtual-file-based/playwright.config.ts (1)
29-29:pnpm previewswitch with duplicated env prefix is appropriateRepeating the
VITE_*assignments for bothpnpm buildandpnpm previewkeeps runtime env consistent while achieving the serve→preview rename.examples/react/kitchen-sink-file-based/package.json (1)
8-8: React kitchen-sinkpreviewscript rename matches conventionThe new
"preview": "vite preview"script aligns with the rest of the repo and doesn’t change functionality.e2e/react-router/view-transitions/package.json (1)
9-9: E2Epreviewscript is consistent with updated Playwright configExposing
"preview": "vite preview"matches the new server command used by the Playwright config for this suite.examples/react/kitchen-sink-react-query/package.json (1)
8-8: LGTM! Script rename aligns with Vite terminology.The rename from "serve" to "preview" better reflects Vite's official documentation and improves clarity.
examples/react/kitchen-sink/package.json (1)
8-8: LGTM!Consistent with the PR-wide refactor to standardize on "preview" terminology.
examples/react/kitchen-sink-react-query-file-based/package.json (1)
8-8: LGTM!Script rename is consistent with the repository-wide standardization effort.
e2e/react-router/js-only-file-based/package.json (1)
9-9: LGTM!The script rename maintains consistency across e2e test packages.
e2e/solid-router/js-only-file-based/package.json (1)
9-9: LGTM!Change is consistent across both React and Solid router test suites.
e2e/react-router/sentry-integration/playwright.config.ts (1)
22-22: LGTM! Command updated to match renamed script.The webServer command correctly references the new "preview" script, maintaining alignment with the package.json changes.
examples/react/i18n-paraglide/package.json (1)
9-9: LGTM!Script rename maintains consistency across example projects.
e2e/react-router/sentry-integration/package.json (1)
9-9: I need to verify whether the sentry-integration playwright configuration still references the old "serve" script. Let me search for that:Based on the verification script output, there are two remaining inconsistencies that need attention:
Update playwright.config.ts files in:
e2e/solid-router/basic-esbuild-file-based/playwright.config.ts:22e2e/react-router/basic-esbuild-file-based/playwright.config.ts:29Both still reference
pnpm run servein theirwebServer.commandconfiguration, but the correspondingpackage.jsonfiles in these directories still define a "serve" script (not "preview"), so these are actually consistent within their own directories.However, the core issue is: if
e2e/react-router/sentry-integration/package.jsonrenamed "serve" to "preview", verify that itsplaywright.config.tswas also updated. The script output doesn't show a reference to sentry-integration's playwright.config.ts file specifically, which suggests either it doesn't exist yet or the search didn't capture it.Recommend verifying:
- Does
e2e/react-router/sentry-integration/playwright.config.tsexist?- If it exists, what command does it specify in the webServer configuration?
- Ensure it matches the renamed "preview" script if that's the intended change.
examples/react/basic-non-nested-devtools/package.json (1)
8-8: LGTM! Script rename aligns with Vite conventions.The rename from "serve" to "preview" better reflects Vite's official terminology for previewing production builds.
examples/solid/kitchen-sink/package.json (1)
8-8: LGTM! Consistent script rename.The change aligns with the PR's objective to standardize on "preview" terminology.
e2e/react-router/js-only-file-based/playwright.config.ts (1)
30-30: LGTM! Playwright config correctly updated.The webServer command properly references the renamed "preview" script from package.json, ensuring E2E tests continue to work correctly.
examples/react/scroll-restoration/package.json (1)
8-8: LGTM! Script rename is correct.Consistent with the broader refactoring to use "preview" terminology.
e2e/solid-router/basic-solid-query-file-based/package.json (1)
9-9: LGTM! E2E script updated correctly.The rename ensures consistency with the corresponding Playwright configuration updates.
e2e/solid-router/basic-virtual-file-based/package.json (1)
9-9: LGTM! Script rename is consistent.Properly aligns with the "preview" terminology used throughout the PR.
examples/solid/kitchen-sink-solid-query/package.json (1)
8-8: LGTM! Script rename applied correctly.The change maintains consistency across all example projects.
examples/react/navigation-blocking/package.json (1)
8-8: LGTM! Script rename completed consistently with no lingering documentation references.All reviewed files properly rename "serve" to "preview" while maintaining the same underlying command. Verification confirms that no README files or documentation reference the old "serve" script, so no further updates are needed.
e2e/solid-router/basic-file-based-code-splitting/package.json (1)
9-9: Script rename is correct and consistent.The change from
servetopreviewaligns the npm script name with Vite's terminology and matches the underlying command. This is part of a coordinated refactor across the repository.e2e/solid-router/generator-cli-only/package.json (1)
9-9: Consistent script rename.examples/solid/basic-file-based/package.json (1)
8-8: Consistent script rename.e2e/react-router/basic/package.json (1)
9-9: Consistent script rename.examples/react/deferred-data/package.json (1)
8-8: Consistent script rename.e2e/react-router/generator-cli-only/package.json (1)
9-9: Consistent script rename.examples/solid/kitchen-sink-solid-query-file-based/package.json (1)
8-8: Consistent script rename.e2e/react-router/basic-virtual-named-export-config-file-based/package.json (2)
9-9: Consistent script rename.
1-12: Playwright config updates verified across all 62 e2e suites.All Playwright configurations have been properly updated to invoke appropriate preview/serve commands. No remaining references to the old
pnpm servepattern found. Variation in commands across suites is intentional and project-specific:
- Vite-based projects:
pnpm preview- esbuild projects:
pnpm run serve(custom script)- rspack projects:
pnpm start(aliases to preview in package.json)All invoked scripts are defined in their respective package.json files. Test runner compatibility maintained.
examples/react/basic-default-search-params/package.json (1)
8-8: LGTM! Script rename aligns with Vite's terminology.The script name change from "serve" to "preview" better reflects the underlying
vite previewcommand and improves consistency across the codebase.examples/react/basic-file-based/package.json (1)
8-8: LGTM! Consistent script rename.The change from "serve" to "preview" maintains consistency with the Vite preview server terminology.
e2e/solid-router/basic/package.json (1)
9-9: LGTM! E2E script updated consistently.The script rename aligns with the broader pattern across the repository and will work correctly with the updated Playwright configurations.
e2e/solid-router/sentry-integration/package.json (1)
9-9: LGTM! Sentry integration e2e script updated.The change maintains consistency with other e2e packages in the repository.
examples/solid/authenticated-routes-firebase/package.json (1)
8-8: LGTM! Example script updated consistently.The rename from "serve" to "preview" improves clarity and aligns with Vite's standard terminology.
examples/react/authenticated-routes-firebase/package.json (1)
8-8: LGTM! React example updated consistently.The script rename maintains consistency across both React and Solid examples.
e2e/react-router/basic-file-based/package.json (1)
11-12: LGTM! Both preview scripts renamed consistently.The rename of both "serve" and "serve:nonnested" to "preview" and "preview:nonnested" maintains the variant pattern while improving terminology consistency.
e2e/react-router/basic-file-based-code-splitting/playwright.config.ts (1)
29-29: LGTM! Playwright config updated to match script rename.The command update from
pnpm servetopnpm previewcorrectly aligns with the script renames in the corresponding package.json files.e2e/react-router/basepath-file-based/playwright.config.ts (1)
28-33: Switch topnpm previewis consistent with scriptsThe webServer command still builds first, preserves env/port wiring, and now correctly calls the
previewscript defined as"preview": "vite preview"ine2e/react-router/basepath-file-based/package.json(line 9).e2e/react-router/basic-react-query/playwright.config.ts (1)
28-33: Updated web server command correctly targetspnpm previewThe Playwright webServer now runs
pnpm preview --port ${PORT}after build, matching the"preview": "vite preview"script ine2e/react-router/basic-react-query/package.json(line 9) with no other behavior changes.e2e/react-router/basic-react-query-file-based/playwright.config.ts (1)
27-32: Preview command matches package script and preserves behaviorThe webServer command now calls
pnpm preview --port ${PORT}with the same env vars as before, aligned with the"preview": "vite preview"script ine2e/react-router/basic-react-query-file-based/package.json(line 9).e2e/solid-router/basepath-file-based/playwright.config.ts (1)
28-33: Serve-to-preview swap in Playwright config looks goodThe config now uses
pnpm preview --port ${PORT}after build, with unchanged env wiring, and matches the"preview": "vite preview"script ine2e/solid-router/basepath-file-based/package.json(line 9).e2e/react-router/basepath-file-based/package.json (1)
5-12:previewscript aligns with Playwright usageAdding
"preview": "vite preview"cleanly exposes the preview command and matches thepnpm previewinvocation ine2e/react-router/basepath-file-based/playwright.config.ts.e2e/react-router/basic-react-query-file-based/package.json (1)
5-12: Preview script is correctly defined for e2eThe
"preview": "vite preview"script fits alongside the existing dev/build/test scripts and matches thepnpm previewcommand used ine2e/react-router/basic-react-query-file-based/playwright.config.ts.e2e/solid-router/basepath-file-based/package.json (1)
5-12: Solid router e2epreviewscript matches test harnessDefining
"preview": "vite preview"keeps behavior identical to the old serve alias while aligning with thepnpm previewcommand in the corresponding Playwright config.e2e/react-router/basic-react-query/package.json (1)
5-12: React basic React Query e2epreviewscript is consistentThe
"preview": "vite preview"entry cleanly replaces the old serve alias and matches the updatedpnpm previewusage ine2e/react-router/basic-react-query/playwright.config.ts.e2e/react-router/basic-file-based-code-splitting/package.json (2)
9-9: Script rename aligns with Vite conventions. ✓Renaming from "serve" to "preview" correctly reflects Vite's standard terminology for the preview command, which runs the production build locally.
Verify that all Playwright configurations in the e2e test suite have been updated to invoke
pnpm previewinstead ofpnpm serve. Per the AI summary, related Playwright config files should be updated as part of this systematic change.
1-34: No lingering "serve" script references found—verification complete.The search confirmed no stray references to
pnpm serveorpnpm run serveexist in this e2e test directory. The playwright configuration correctly usespnpm build && pnpm previewfor the test server setup instead.
vite previewlaunches the server on the ./dist production buildvite servelaunches the dev server, since it's mapping tovitejust likevite devIt's therefore confusing if we use "serve": "vite preview"
This PR makes it consistently for the router projects to have:
"preview": "vite preview"This also prepares for adding the vite preview to start, now that it's supported:
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.