Skip to content

chore: fix example deployment - #6904

Merged
KATT merged 10 commits into
mainfrom
08-20-more
Aug 20, 2025
Merged

KATT merged 10 commits into
mainfrom
08-20-more

Conversation

@KATT

@KATT KATT commented Aug 20, 2025 •

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Chores

    • Standardized TypeScript scripts across packages (added tsc; removed typecheck/ts-watch); root scripts replaced with tsc-check and tsc-watch.
    • Updated Turbo tasks (added tsc task; adjusted typecheck dependencies).
    • CI now runs tsc-check for workspace type checking.
  • Examples

    • Next Prisma Starter: ESLint now ignored during builds; added typecheck script.
    • Next Prisma TodoMVC: ESLint ignored during builds; TypeScript build errors ignored; added typecheck script.
    • Next Big Router: added typecheck script.

@KATT
KATT requested a review from a team as a code owner August 20, 2025 19:24
@railway-app

railway-app Bot commented Aug 20, 2025 •

Copy link
Copy Markdown

πŸš… Deployed to the trpc-pr-6904 environment in trpc-sse-and-websockets

Service Status Web Updated (UTC)
next-prisma-websockets-starter ◻️ Removed (View Logs) Aug 20, 2025 at 10:31 pm
next-sse-chat ◻️ Removed (View Logs) Web Aug 20, 2025 at 10:31 pm

@coderabbitai

coderabbitai Bot commented Aug 20, 2025 •

Copy link
Copy Markdown
Contributor

Walkthrough

Replaces workspace/typecheck scripts with tsc-check/tsc-watch and a turbo tsc task; CI typecheck job now runs pnpm tsc-check. Per-package scripts unify to a single tsc command. Example Next apps set eslint.ignoreDuringBuilds to true; one adds typescript.ignoreBuildErrors: true. New example-level typecheck scripts added.

Changes

Cohort / File(s) Summary
CI Workflow
.github/workflows/main.yml
Typecheck step changed from pnpm typecheck to pnpm tsc-check.
Root scripts & turbo
package.json, turbo.json
Root package.json: replace typecheck/ts-watch with tsc-check/tsc-watch. Add tsc-check/tsc-watch scripts that invoke turbo tsc. turbo.json: add tsc task (dependsOn codegen-tests, cache disabled); update typecheck dependsOn to ^build.
Packages: TS script consolidation
packages/*/package.json β†’ packages/client/package.json, packages/next/package.json, packages/react-query/package.json, packages/server/package.json, packages/tanstack-react-query/package.json, packages/tests/package.json
Remove typecheck and ts-watch scripts; add a single tsc script ("tsc": "tsc"). No other script or export changes.
Examples: Next.js config changes
examples/next-prisma-starter/next.config.ts, examples/next-prisma-todomvc/next.config.js
Set eslint.ignoreDuringBuilds to true (was CI-gated). In todomvc add typescript.ignoreBuildErrors: true.
Examples: add typecheck scripts
examples/next-prisma-starter/package.json, examples/next-prisma-todomvc/package.json, examples/next-big-router/package.json
Add typecheck script ("tsc --noEmit") to example package.json files (one example replaced tsc with typecheck).

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Dev as Developer/CI
  participant GH as GitHub Actions
  participant WF as typecheck job
  participant PNPM as pnpm
  participant Turbo as turbo (tsc)
  participant Pkg as Packages (tsc)

  Dev->>GH: push / PR
  GH->>WF: run typecheck job
  WF->>PNPM: pnpm tsc-check
  PNPM->>Turbo: turbo tsc -- --noEmit ...
  Turbo->>Pkg: invoke package `tsc` scripts
  Pkg-->>Turbo: diagnostics
  Turbo-->>WF: aggregated result
  WF-->>GH: job success/failure
Loading
sequenceDiagram
  autonumber
  actor Dev as Developer
  participant Next as Next.js build (examples)
  note over Next: Pre-build checks
  rect rgb(240,248,255)
    Next-->>Next: eslint.ignoreDuringBuilds = true (skip ESLint at build)
  end
  rect rgb(245,245,245)
    alt example with ignoreBuildErrors
      Next-->>Next: typescript.ignoreBuildErrors = true (ignore TS errors)
    else default
      Next-->>Next: run project TypeScript checks as configured
    end
  end
  Next-->>Dev: build output
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • juliusmarminge
  • trpc-bot

Poem

I thump my paw and twitch my ear,
Turbo hums and tsc draws near.
ESLint naps while builds go fast,
Type checks hop in rows so vast.
Carrots compiled, the pipelines cheerβ€”πŸ₯•βœ¨

Tip

πŸ”Œ Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
πŸ§ͺ Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 08-20-more

πŸͺ§ Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@vercel

vercel Bot commented Aug 20, 2025 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
next-prisma-starter Ready Ready Preview Aug 20, 2025 10:29pm
og-image Ready Ready Preview Comment Aug 20, 2025 10:29pm
www Ready Ready Preview Comment Aug 20, 2025 10:29pm

@pkg-pr-new

pkg-pr-new Bot commented Aug 20, 2025 •

Copy link
Copy Markdown

Open in StackBlitz

@trpc/client

npm i https://pkg.pr.new/trpc/trpc/@trpc/client@6904

@trpc/next

npm i https://pkg.pr.new/trpc/trpc/@trpc/next@6904

@trpc/react-query

npm i https://pkg.pr.new/trpc/trpc/@trpc/react-query@6904

@trpc/server

npm i https://pkg.pr.new/trpc/trpc/@trpc/server@6904

@trpc/tanstack-react-query

npm i https://pkg.pr.new/trpc/trpc/@trpc/tanstack-react-query@6904

@trpc/upgrade

npm i https://pkg.pr.new/trpc/trpc/@trpc/upgrade@6904

commit: 8156466

This reverts commit e8cecdf.
trpc-bot
trpc-bot previously approved these changes Aug 20, 2025

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (6)
examples/next-prisma-starter/next.config.ts (1)

19-21: Confirm intent: ESLint is now always skipped during builds (not only in CI).

If the goal is to skip ESLint only on CI (per the comment on Line 18), gate it on CI instead of hardcoding true.

Apply this diff to align behavior with the comment:

-  eslint: {
-    ignoreDuringBuilds: true,
-  },
+  eslint: {
+    ignoreDuringBuilds: !!process.env.CI,
+  },

If you do intend to skip ESLint locally as well, keep the code and update the comment on Line 18 in a follow-up to avoid confusion.

packages/tests/package.json (1)

8-8: OK to expose tsc in tests package

Providing a plain "tsc" script here is fine and keeps tests aligned with the repo-wide task wiring. Nothing else needed.

If the workspace intends to use TS project references (build mode), consider switching to tsc -b later; otherwise the current setup is fine.

examples/next-prisma-starter/package.json (1)

23-24: Approve explicit typecheck script integration

The new typecheck script is correctly wired up in both the example’s package.json and its CI workflow; there are no remaining references to an old script name.

β€’ examples/next-prisma-starter/package.json (line 24) defines
"typecheck": "tsc --noEmit"
β€’ examples/next-prisma-starter/.github/workflows/main.yml (job name on line 64) reflects β€œUnit tests + typecheck” and contains no legacy type-check or tsc --watch entries

Optional refinements to improve developer ergonomics:

-    "typecheck": "tsc --noEmit"
+    "typecheck": "tsc --noEmit --pretty false"

β€’ Adding --pretty false will reduce CI log noise
β€’ You may also add a typecheck:watch script for faster local iteration

examples/next-prisma-todomvc/next.config.js (2)

15-16: Avoid unconditionally ignoring ESLint during builds; gate it via env for example deploys only.

This can mask regressions locally. Keep the relaxed behavior for deployments while preserving signal in dev.

Apply env-gated ignore:

   eslint: {
-    ignoreDuringBuilds: true,
+    // Ignore in CI and/or explicit example deploys
+    ignoreDuringBuilds: !!process.env.CI || process.env.EXAMPLE_DEPLOY === '1',
   },

17-19: Typescript ignoreBuildErrors will hide real issues; scope it narrowly.

Acceptable for demo deploys, but risky otherwise. Gate it similarly so local/dev builds still fail on type errors.

Use an env flag to relax only for the example deployment:

-  typescript: {
-    ignoreBuildErrors: true,
-  },
+  typescript: {
+    ignoreBuildErrors: process.env.EXAMPLE_DEPLOY === '1',
+  },

The comment above still reads β€œWe run eslint as a separate task in CI” while the behavior is broader. Consider updating it to reflect the env-gated logic.

package.json (1)

20-21: Deduplicate flags and use a consistent Turbo invocation.

Two small nits:

  • --pretty is repeated.
  • --noEmit is repeated in watch.
  • Use "turbo run tsc" for consistency with the watch script (and to avoid relying on CLI alias behavior).

Apply:

-    "tsc-check": "turbo tsc -- --noEmit --pretty --pretty",
-    "tsc-watch": "turbo run tsc -- --noEmit --preserveWatchOutput --pretty --noEmit --watch",
+    "tsc-check": "turbo run tsc -- --noEmit --pretty",
+    "tsc-watch": "turbo run tsc -- --noEmit --preserveWatchOutput --pretty --watch",
πŸ“œ Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

πŸ’‘ Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 020bb04 and 39c5276.

πŸ“’ Files selected for processing (13)
  • .github/workflows/main.yml (1 hunks)
  • examples/next-prisma-starter/next.config.ts (1 hunks)
  • examples/next-prisma-starter/package.json (1 hunks)
  • examples/next-prisma-todomvc/next.config.js (1 hunks)
  • examples/next-prisma-todomvc/package.json (1 hunks)
  • package.json (1 hunks)
  • packages/client/package.json (1 hunks)
  • packages/next/package.json (1 hunks)
  • packages/react-query/package.json (1 hunks)
  • packages/server/package.json (1 hunks)
  • packages/tanstack-react-query/package.json (1 hunks)
  • packages/tests/package.json (1 hunks)
  • turbo.json (2 hunks)
🧰 Additional context used
🧠 Learnings (1)
πŸ“š Learning: 2025-06-09T14:01:20.033Z
Learnt from: juliusmarminge
PR: trpc/trpc#6789
File: packages/tanstack-react-query/tsdown.config.ts:1-24
Timestamp: 2025-06-09T14:01:20.033Z
Learning: In the tRPC monorepo, packages/tests and packages/upgrade don't need main/module/types fields in their package.json because tests is not distributed and upgrade just exposes a binary.

Applied to files:

  • packages/react-query/package.json
  • packages/tanstack-react-query/package.json
  • packages/tests/package.json
πŸ”‡ Additional comments (8)
packages/tanstack-react-query/package.json (1)

21-21: Standardizing on a single tsc script is good.

This enables turbo tsc to discover the task consistently across the workspace.

examples/next-prisma-todomvc/package.json (1)

21-21: Adding scripts.typecheck enables the E2E step to run build typecheck.

This matches the workflow’s use of turbo … build typecheck for examples.

packages/server/package.json (1)

23-23: LGTM on adding tsc.

Keeps packages consistent with the new root tsc-check flow.

packages/react-query/package.json (1)

23-23: Approve consolidation of tsc script in react-query/package.json

Verified that there are no remaining references to the removed typecheck or ts-watch scripts within the packages/react-query/ directoryβ€”no matches found via the provided ripgrep check. This change cleanly consolidates to the root-managed tsc invocation.

packages/next/package.json (1)

30-30: No accidental β€œtypecheck” or β€œts-watch” script references found

I ran a ripgrep search across packages/next for any lingering "typecheck" or "ts-watch" script entries and confirmed there are none, so the added "tsc": "tsc" script is self-contained and safe to merge.

packages/client/package.json (1)

29-29: tsc script addition verified

All packages under packages/ have removed any typecheck or ts-watch scripts and now include a "tsc": "tsc" entry (including packages/client/package.json).
GitHub Actions workflows reference the new root tsc-check task (and examples intentionally continue to use typecheck).

Approving these changes.

turbo.json (2)

24-27: Verify tsc script coverage across workspaces

The audit shows that a significant number of workspaces do not define a scripts.tsc entry, which means turbo run tsc will silently skip them. If these packages should participate in your type‐checking pipeline, they need explicit tsc scripts; otherwise, you should exclude them from the tsc task in turbo.json.

Key locations missing scripts.tsc:

β€’ All example projects under examples/ (e.g. examples-bun, examples-cloudflare-workers, …)
β€’ Root package.json (name: root)
β€’ @trpc/upgrade in packages/upgrade
β€’ @www/og-image and www in www/

Next steps:

  • Audit each missing entry and decide whether it needs type‐checking.
    • If yes, add a "tsc": "tsc --build" (or equivalent) script to its package.json.
    • If no, explicitly exclude it from the tsc pipeline in your turbo.json (e.g., via –filter or workspace glob patterns).

Once updated, rerun the provided script to confirm no unintended skips remain.


58-58: Please verify CI and local scripts still run codegen-tests where needed

I confirmed that in turbo.json you’ve changed

-   "dependsOn": ["codegen-tests"],
+   "dependsOn": ["^build"],

for the typecheck task. That means:

  • turbo run typecheck (and pnpm turbo build typecheck in the examples matrix) will no longer execute codegen-tests.
  • There are no references to typecheck in our Markdown docs.
  • The only invocations of typecheck are:
    β€’ The typecheck job in .github/workflows/main.yml
    β€’ Matrix steps in that same workflow running pnpm turbo --filter ./examples/${{ matrix.dir }} build typecheck

If any part of your CI or local workflows still needs generated fixtures (via codegen-tests), you’ll need to either:

  • Update the CI job to invoke tsc-check (which still depends on codegen-tests), or
  • Explicitly add codegen-tests back into the typecheck dependency chain, or
  • Adjust documentation/scripts to call turbo codegen-tests before typecheck.

Otherwise, dropping codegen-tests from typecheck is safe.

- uses: ./.github/setup

- run: pnpm typecheck
- run: pnpm tsc-check

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ’‘ Verification agent

🧩 Analysis chain

Switch to pnpm tsc-check looks good; verify wiring across the repo.

This aligns CI with the new Turbo-driven tsc task. Please verify:

  • Root package.json exposes scripts.tsc-check (and optionally tsc-watch).
  • turbo.json declares a pipeline task named tsc.
  • Every example in the E2E matrix has a scripts.typecheck (since E2E still runs turbo … build typecheck).

Run this script from the repo root to validate the setup:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "1) Root scripts"
jq -e '.scripts["tsc-check"]' package.json >/dev/null && echo "OK: root scripts.tsc-check"
jq -e '.scripts["tsc-watch"]' package.json >/dev/null && echo "OK: root scripts.tsc-watch" || echo "WARN: root scripts.tsc-watch missing (watch may be optional)"

echo
echo "2) turbo.json has pipeline.tsc"
jq -e '.pipeline.tsc' turbo.json >/dev/null && echo "OK: turbo.json pipeline.tsc" || echo "WARN: turbo.json missing pipeline.tsc (tsc-check expects it)"

echo
echo "3) packages/* must have scripts.tsc and no legacy typecheck/ts-watch"
fail=0
while IFS= read -r f; do
  name=$(jq -r '.name' "$f")
  jq -e '.scripts.tsc' "$f" >/dev/null || { echo "FAIL: $name ($f) missing scripts.tsc"; fail=1; }
  jq -e '.scripts.typecheck' "$f" >/dev/null && { echo "FAIL: $name ($f) still has scripts.typecheck"; fail=1; }
  jq -e '.scripts["ts-watch"]' "$f" >/dev/null && { echo "FAIL: $name ($f) still has scripts.ts-watch"; fail=1; }
done < <(fd -t f package.json packages -x echo {})
(( fail == 0 )) && echo "OK: packages scripts look consistent" || true

echo
echo "4) Examples in E2E matrix must expose scripts.typecheck"
declare -a e2e=(
".experimental/next-app-dir"
".test/diagnostics-big-router"
".test/internal-types-export"
".test/ssg"
"cloudflare-workers"
"express-minimal"
"express-server"
"fastify-server"
"minimal-react"
"next-formdata"
"next-minimal-starter"
"next-prisma-starter"
"next-prisma-todomvc"
"next-prisma-websockets-starter"
"soa"
"standalone-server"
"tanstack-start"
"vercel-edge-runtime"
"nuxt"
"bun"
)
missing=0
for d in "${e2e[@]}"; do
  f="examples/$d/package.json"
  if [[ -f "$f" ]]; then
    jq -e '.scripts.typecheck' "$f" >/dev/null || { echo "FAIL: $f missing scripts.typecheck"; missing=1; }
  else
    echo "WARN: $f not found"
  fi
done

if (( fail == 0 && missing == 0 )); then
  echo "OK: tsc-check + E2E typecheck wiring passes."
else
  echo "FAIL: See issues above."
  exit 1
fi

Length of output: 839


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "1) Root scripts"
jq -e '.scripts["tsc-check"]' package.json >/dev/null && echo "OK: root scripts.tsc-check"
jq -e '.scripts["tsc-watch"]' package.json >/dev/null && echo "OK: root scripts.tsc-watch" || echo "WARN: root scripts.tsc-watch missing (watch may be optional)"

echo
echo "2) turbo.json has pipeline.tsc"
if jq -e '.pipeline.tsc' turbo.json >/dev/null; then
  echo "OK: turbo.json pipeline.tsc"
else
  echo "WARN: turbo.json missing pipeline.tsc (tsc-check expects it)"
fi

echo
echo "3) packages/* must have scripts.tsc and no legacy typecheck/ts-watch"
fail=0
# Avoid process-substitution on /dev/fd β€” use a pipe instead
fd -t f package.json packages | while IFS= read -r f; do
  name=$(jq -r '.name // "<unknown>"' "$f")
  if ! jq -e '.scripts.tsc' "$f" >/dev/null; then
    echo "FAIL: $name ($f) missing scripts.tsc"
    fail=1
  fi
  if jq -e '.scripts.typecheck' "$f" >/dev/null; then
    echo "FAIL: $name ($f) still has scripts.typecheck"
    fail=1
  fi
  if jq -e '.scripts["ts-watch"]' "$f" >/dev/null; then
    echo "FAIL: $name ($f) still has scripts.ts-watch"
    fail=1
  fi
done
(( fail == 0 )) && echo "OK: packages scripts look consistent"

echo
echo "4) Examples in E2E matrix must expose scripts.typecheck"
declare -a e2e=(
  ".experimental/next-app-dir"
  ".test/diagnostics-big-router"
  ".test/internal-types-export"
  ".test/ssg"
  "cloudflare-workers"
  "express-minimal"
  "express-server"
  "fastify-server"
  "minimal-react"
  "next-formdata"
  "next-minimal-starter"
  "next-prisma-starter"
  "next-prisma-todomvc"
  "next-prisma-websockets-starter"
  "soa"
  "standalone-server"
  "tanstack-start"
  "vercel-edge-runtime"
  "nuxt"
  "bun"
)
missing=0
for d in "${e2e[@]}"; do
  f="examples/$d/package.json"
  if [[ -f "$f" ]]; then
    if ! jq -e '.scripts.typecheck' "$f" >/dev/null; then
      echo "FAIL: $f missing scripts.typecheck"
      missing=1
    fi
  else
    echo "WARN: $f not found"
  fi
done
(( missing == 0 )) && echo "OK: all E2E examples expose scripts.typecheck"

Length of output: 7217


Action Required: Add pipeline.tsc to turbo.json and scripts.typecheck to E2E examples

The CI wiring isn’t fully in placeβ€”while root scripts and package sub-directories are correctly configured, we’re missing:

  • turbo.json
    – Currently reports: β€œWARN: turbo.json missing pipeline.tsc (tsc-check expects it)”
    – You need to declare a tsc pipeline entry so that pnpm tsc-check can invoke it. For example:

    {
      "pipeline": {
        "tsc": {
          "dependsOn": ["^tsc"],
          "outputs": []
        },
        // … other tasks
      }
    }
  • E2E example projects
    Every example in our CI matrix must expose a scripts.typecheck entry in its package.json. The verification run flagged missing scripts.typecheck in the following examples (add the same typecheck script you use elsewhere, e.g. "typecheck": "turbo run tsc"):

    β€’ examples/.experimental/next-app-dir/package.json
    β€’ examples/.test/diagnostics-big-router/package.json
    β€’ examples/.test/internal-types-export/package.json
    β€’ examples/.test/ssg/package.json
    β€’ examples/cloudflare-workers/package.json
    β€’ examples/express-minimal/package.json
    β€’ examples/minimal-react/package.json
    β€’ examples/next-formdata/package.json
    β€’ examples/next-minimal-starter/package.json
    β€’ examples/next-prisma-starter/package.json
    β€’ examples/next-prisma-websockets-starter/package.json
    β€’ examples/soa/package.json
    β€’ examples/tanstack-start/package.json
    β€’ examples/vercel-edge-runtime/package.json
    β€’ examples/nuxt/package.json

Please update turbo.json and each of the above example package.json files accordingly so that pnpm tsc-check and the E2E matrix type-check step will pass.

πŸ€– Prompt for AI Agents
.github/workflows/main.yml around line 47: the CI step calls `pnpm tsc-check`
but turbo.json lacks a `tsc` pipeline and many example package.json files lack
`scripts.typecheck`; update turbo.json to add a `pipeline.tsc` entry (dependsOn:
["^tsc"], outputs: []) and add a `typecheck` script to each listed example
package.json (set to the project convention, e.g. "typecheck": "turbo run tsc")
so the `pnpm tsc-check` and E2E matrix type-check step can run successfully.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

πŸ“œ Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

πŸ’‘ Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 39c5276 and 8156466.

πŸ“’ Files selected for processing (1)
  • examples/next-big-router/package.json (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
πŸ“š Learning: 2025-06-09T14:01:20.033Z
Learnt from: juliusmarminge
PR: trpc/trpc#6789
File: packages/tanstack-react-query/tsdown.config.ts:1-24
Timestamp: 2025-06-09T14:01:20.033Z
Learning: In the tRPC monorepo, packages/tests and packages/upgrade don't need main/module/types fields in their package.json because tests is not distributed and upgrade just exposes a binary.

Applied to files:

  • examples/next-big-router/package.json
⏰ 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). (19)
  • GitHub Check: E2E-tests (next-prisma-websockets-starter)
  • GitHub Check: E2E-tests (express-server)
  • GitHub Check: E2E-tests (tanstack-start)
  • GitHub Check: E2E-tests (next-prisma-starter)
  • GitHub Check: E2E-tests (next-prisma-todomvc)
  • GitHub Check: E2E-tests (.test/internal-types-export)
  • GitHub Check: E2E-tests (.test/diagnostics-big-router)
  • GitHub Check: Release using pkg.pr.new
  • GitHub Check: Test a monorepo using built declaration files
  • GitHub Check: e2e-legacy-node (next-prisma-todomvc, 18.x)
  • GitHub Check: e2e-legacy-node (next-prisma-starter, 18.x)
  • GitHub Check: e2e-legacy-node (next-prisma-starter, 20.x)
  • GitHub Check: e2e-legacy-node (next-prisma-websockets-starter, 18.x)
  • GitHub Check: e2e-legacy-node (next-prisma-websockets-starter, 20.x)
  • GitHub Check: E2E-tests (Deno) (deno-deploy)
  • GitHub Check: E2E-tests (Bun) (bun, ubuntu-latest)
  • GitHub Check: typecheck
  • GitHub Check: Lint and auto-fix
  • GitHub Check: test

Comment on lines +10 to 11
"typecheck": "tsc --noEmit"
},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ’‘ Verification agent

🧩 Analysis chain

Align with repo-wide β€œtsc” task; replace local β€œtypecheck” script

The PR standardizes on running Turbo’s β€œtsc” pipeline via β€œpnpm tsc-check”, which expects each package to expose a β€œtsc” script. Defining β€œtypecheck” here won’t be picked up by Turbo and can cause this example to be skipped or fail when β€œturbo run tsc” executes.

Apply this diff to align with the rest of the repo:

   "postinstall": "tsx scripts/codegen",
-    "typecheck": "tsc --noEmit"
+    "tsc": "tsc"

Run this quick check to ensure all examples expose a β€œtsc” script (and optionally no lingering β€œtypecheck” scripts):


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Scanning examples/*/package.json for scripts..."
fd -a package.json examples | while read -r f; do
  has_tsc=$(jq -r 'has("scripts") and (.scripts | has("tsc"))' "$f")
  has_typecheck=$(jq -r 'has("scripts") and (.scripts | has("typecheck"))' "$f")
  echo "== $f =="
  if [[ "$has_tsc" != "true" ]]; then
    echo "MISSING: scripts.tsc"
  else
    echo "OK: scripts.tsc -> $(jq -r '.scripts.tsc' "$f")"
  fi
  if [[ "$has_typecheck" == "true" ]]; then
    echo "NOTE: scripts.typecheck present -> $(jq -r '.scripts.typecheck' "$f")"
  fi
done

Length of output: 16464


Standardize tsc script across all example packages

The monorepo’s CI relies on running turbo run tsc, which only picks up packages that expose a scripts.tsc entry. In their current state, the following example packages define a typecheck script but lack a tsc script, causing them to be skipped:

  • examples/bun/package.json (scripts.typecheck β†’ β€œtsc --noEmit”)
  • examples/express-minimal/package.json (scripts.typecheck β†’ β€œtsc”)
  • examples/express-server/package.json (scripts.typecheck β†’ β€œtsc”)
  • examples/fastify-server/package.json (scripts.typecheck β†’ β€œtsc”)
  • examples/lambda-api-gateway/package.json (scripts.typecheck β†’ β€œtsc”)
  • examples/lambda-url/package.json (scripts.typecheck β†’ β€œtsc”)
  • examples/next-big-router/package.json (scripts.typecheck β†’ β€œtsc --noEmit”)
  • examples/next-prisma-starter/package.json (scripts.typecheck β†’ β€œtsc --noEmit”)
  • examples/next-prisma-todomvc/package.json (scripts.typecheck β†’ β€œtsc --noEmit”)
  • examples/standalone-server/package.json (scripts.typecheck β†’ β€œtsc”)

Please replace each typecheck script with a tsc script. For example, in examples/next-big-router/package.json:

   "postinstall": "tsx scripts/codegen",
-  "typecheck": "tsc --noEmit"
+  "tsc": "tsc"

This change ensures Turbo’s tsc task will include all example packages in its type‐checking pipeline.

πŸ“ Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"typecheck": "tsc --noEmit"
},
"postinstall": "tsx scripts/codegen",
"tsc": "tsc"
},
πŸ€– Prompt for AI Agents
In examples/next-big-router/package.json around lines 10 to 11, the package
defines "typecheck": "tsc --noEmit" which prevents turbo from picking it up;
rename the script key from "typecheck" to "tsc" preserving the exact command
(i.e., "tsc --noEmit") so the package exposes scripts.tsc and will be included
by turbo run tsc; ensure the package.json remains valid JSON after the edit.

@KATT
KATT merged commit e6fc309 into main Aug 20, 2025
@KATT
KATT deleted the 08-20-more branch August 20, 2025 22:31
@coderabbitai coderabbitai Bot mentioned this pull request Aug 20, 2025
@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been locked because we are very unlikely to see comments on closed issues. If you think, this PR is still necessary, create a new one with the same branch. Thank you.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Aug 22, 2025

This branch was successfully deployed

5 active deployments
Preview – www β€” 81564660 Deployed Aug 20, 2025 by vercel[bot]
Preview – examples-todomvc β€” 81564660 Deployed Aug 20, 2025 by vercel[bot]
Preview – next-prisma-starter β€” 81564660 Deployed Aug 20, 2025 by vercel[bot]
Preview – og-image β€” 81564660 Deployed Aug 20, 2025 by vercel[bot]
Preview – trpc-next-app-dir β€” 81564660 Deployed Aug 20, 2025 by vercel[bot]
trpc-pr-6904 β€” 81564660 Deployed Aug 20, 2025 by railway-app[bot]
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants