Skip to content

chore(benchmarks): remove Vite 7 runner, update Next.js to 16.2.1#699

Merged
southpolesteve merged 2 commits intomainfrom
benchmarks/remove-vite7-update-nextjs
Mar 28, 2026
Merged

chore(benchmarks): remove Vite 7 runner, update Next.js to 16.2.1#699
southpolesteve merged 2 commits intomainfrom
benchmarks/remove-vite7-update-nextjs

Conversation

@southpolesteve
Copy link
Copy Markdown
Collaborator

Summary

  • Remove the vinext-rolldown benchmark runner, which was identical to the vinext runner (both resolved to the same Vite version via catalog:), causing duplicate results on the dashboard
  • Simplify to a two-runner comparison: Next.js (Turbopack) vs vinext (Vite 8)
  • Bump Next.js benchmark dependency from 16.1.7 to 16.2.1

Changes

Benchmark runner (benchmarks/):

  • Delete vinext-rolldown/ directory
  • Remove all rolldown logic from run.mjs (--skip-rolldown, hasRolldown, vinextRolldown results)
  • Remove from generate-app.mjs copy targets
  • Clean up .gitignore

Dashboard (examples/benchmarks/):

  • Update runner labels: "Next.js (Turbopack)" and "vinext (Vite 8)"
  • Remove vinext_rolldown from worker RUNNER_MAP
  • Update DB CHECK constraint in init migration
  • Add 0002_remove_rolldown_runner.sql migration to clean existing data
  • Remove rolldown CSS theme color
  • Update CommitList to show vinext data instead of rolldown

Docs:

  • Update README.md benchmark description and Vite version notes
  • Update AGENTS.md Vite 8 defaults section

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Mar 27, 2026

Open in StackBlitz

npm i https://pkg.pr.new/vinext@699

commit: 72ffcc4

@github-actions
Copy link
Copy Markdown

Example Preview Production Original
app-router-cloudflare preview production
pages-router-cloudflare preview production
app-router-playground preview production original
realworld-api-rest preview production
nextra-docs-template preview production
benchmarks preview production
hackernews preview production original

@southpolesteve
Copy link
Copy Markdown
Collaborator Author

/bigbonk review

Copy link
Copy Markdown
Contributor

@ask-bonk ask-bonk bot left a comment

Choose a reason for hiding this comment

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

Review

This PR has two distinct changes bundled together:

  1. Benchmark cleanup — removes the vinext-rolldown runner (was identical to vinext), simplifies to a two-runner comparison, and bumps Next.js from 16.1.7 to 16.2.1.
  2. Pages Router refactor — extracts ~320 lines of inline code from the generated pages-server-entry.ts into typed helper modules (pages-api-route.ts, pages-node-compat.ts), and delegates ISR cache helpers to the existing isr-cache.ts.

The PR title and description only mention (1). The refactor in (2) is a significant structural change that should be called out in the description for reviewers.


Benchmark cleanup

Clean and complete. All rolldown references are removed consistently from run.mjs, generate-app.mjs, .gitignore, dashboard components, worker RUNNER_MAP, CSS theme color, DB migration/constraint, and docs. The migration 0002_remove_rolldown_runner.sql correctly DELETEs existing rolldown data. No issues here.


Pages Router refactor

This is a good extraction that follows the AGENTS.md guidance about keeping generated entries thin. A few observations:

Behavioral differences (intentional improvements)

  1. writeHead now lowercases non-set-cookie header keys — the old code stored them with original casing (resHeaders[k] = v), while setHeader already lowercased. The new code is consistent. Since new Headers() in end() is case-insensitive anyway, this shouldn't cause issues.

  2. send(Buffer) now converts to Uint8Array — old code passed the Buffer directly to Response. The new new Uint8Array(data) is safer for Cloudflare Workers where Buffer may not be accepted by the Response constructor.

  3. redirect(status) with missing URL — old code passed undefined as the Location; new code uses url ?? "". Minor safety improvement.

These are all net improvements, but worth noting since they're behavioral changes in a "refactor."

One question on body size enforcement

In the old code, the Content-Length fast-reject returned a Response(413) directly — before the body was read at all. In the new code, parsePagesApiBody throws Error("Request body too large") which bubbles up and is caught by handlePagesApiRoute. The catch block checks error.message === "Request body too large" via string comparison:

if ((error as Error).message === "Request body too large") {
  return new Response("Request body too large", { status: 413 });
}

This works but is fragile — if the error message text ever changes in parsePagesApiBody, the catch won't match and it'll fall through to the generic 500 handler. Consider using a typed error class (similar to PagesApiBodyParseError) or exporting a sentinel, rather than matching on string content.

Tests

Good coverage — the new pages-api-route.test.ts covers query merging, JSON body parsing, urlencoded parsing, empty JSON bodies, Buffer sends, error reporting, and the 413 body size limit. The entry template tests correctly verify delegation rather than inline implementation details.

Minor nit

The migration comment says "The Vite 7 / Rolldown runner was identical to the Vite 8 / Rollup runner" — this has the labels swapped. Should be "The Vite 7 / Rollup runner was identical to the Vite 8 / Rolldown runner" (or however they were actually named). The current wording is confusing about which is which.

@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk bot commented Mar 27, 2026

Review posted to PR #699. Here's a summary of the findings:

The PR contains two distinct changes:

  1. Benchmark cleanup (matches the title) — clean removal of the vinext-rolldown runner, consistent across all files. No issues.

  2. Pages Router refactor (not mentioned in title/description) — extracts ~320 lines from the generated pages-server-entry.ts into typed helpers pages-api-route.ts and pages-node-compat.ts, and delegates ISR cache functions to the existing isr-cache.ts. This follows the AGENTS.md guidance about keeping generated entries thin.

Key findings on the refactor:

  • Three intentional behavioral improvements (header key casing consistency, BufferUint8Array conversion for Workers compatibility, safer redirect with missing URL)
  • One fragility concern: body size limit errors are caught by string-matching error.message === "Request body too large" instead of using a typed error class
  • One nit: the migration SQL comment has Vite 7/Rollup and Vite 8/Rolldown labels swapped
  • Good test coverage in the new pages-api-route.test.ts

github run

The vinext-rolldown benchmark runner was identical to the vinext runner
(both resolved to the same Vite version via catalog), producing
duplicate results on the dashboard. Remove it entirely and simplify
to a two-runner comparison: Next.js (Turbopack) vs vinext (Vite 8).

Also bump the Next.js benchmark dependency from 16.1.7 to 16.2.1 to
pick up recent performance improvements.
@southpolesteve southpolesteve force-pushed the benchmarks/remove-vite7-update-nextjs branch from 04ad655 to 035a69b Compare March 27, 2026 23:11
@southpolesteve
Copy link
Copy Markdown
Collaborator Author

/bigbonk

Copy link
Copy Markdown
Contributor

@ask-bonk ask-bonk bot left a comment

Choose a reason for hiding this comment

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

Review

Clean removal of the vinext-rolldown benchmark runner. The diff is straightforward — all rolldown references are consistently removed from the benchmark harness, dashboard, worker, CSS, and docs. The Next.js bump to 16.2.1 and label updates look correct.

Two issues:

1. pnpm-workspace.yaml still references the deleted directory

pnpm-workspace.yaml:7 still lists benchmarks/vinext-rolldown as a workspace package:

  - benchmarks/vinext-rolldown

This will cause pnpm install to warn or error since the directory no longer exists. Needs to be removed.

2. Migration comment has Vite/bundler labels swapped

examples/benchmarks/migrations/0002_remove_rolldown_runner.sql:2:

-- The Vite 7 / Rolldown runner was identical to the Vite 8 / Rollup runner

This has the bundler names backwards. The whole point of Vite 7 was Rollup, and Vite 8 introduced Rolldown. Should be:

-- The Vite 7 / Rollup runner was identical to the Vite 8 / Rolldown runner

(The previous review flagged this too.)

@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk bot commented Mar 27, 2026

Review posted on PR #699. Two issues found:

  1. pnpm-workspace.yaml not updated — still lists benchmarks/vinext-rolldown as a workspace package (line 7), which will break pnpm install since the directory is deleted in this PR.

  2. Migration comment has swapped labels0002_remove_rolldown_runner.sql says "Vite 7 / Rolldown" and "Vite 8 / Rollup" when it should be the opposite (Vite 7 used Rollup, Vite 8 introduced Rolldown). This was also noted in the previous review.

github run

@southpolesteve
Copy link
Copy Markdown
Collaborator Author

/bigbonk review again

Copy link
Copy Markdown
Contributor

@ask-bonk ask-bonk bot left a comment

Choose a reason for hiding this comment

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

Clean PR. Both issues from prior reviews are fixed:

  1. pnpm-workspace.yaml no longer references benchmarks/vinext-rolldown
  2. Migration comment now correctly says "Vite 7 / Rollup" and "Vite 8 / Rolldown"

Verified the removal is complete — no stale vinext_rolldown/vinextRolldown references remain outside the migration's DELETE statement. The run.mjs simplification, dashboard label updates, DB constraint update, CSS theme color removal, and doc updates are all consistent.

The Next.js bump to 16.2.1 in benchmarks/nextjs/package.json is fine. Note that the catalog next version at pnpm-workspace.yaml:48 is still 16.1.7 — that's correct since the catalog version is for the vinext shim compatibility target, not the benchmark runner.

@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk bot commented Mar 28, 2026

Reviewed and approved PR #699. The two issues from prior reviews (stale pnpm-workspace.yaml entry and swapped Vite/bundler labels in the migration comment) are both fixed. The rolldown removal is clean and consistent across all files — benchmark harness, dashboard, worker, CSS, DB schema, and docs.

github run

@southpolesteve southpolesteve merged commit a62e5c4 into main Mar 28, 2026
30 checks passed
@southpolesteve southpolesteve deleted the benchmarks/remove-vite7-update-nextjs branch March 28, 2026 00:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant