chore: support Next.js 16.5.0

Merged
SO
3d ago
+3057-529

Summary

Supports Next.js 16.5.0 (62f94d4a9a8fc30e79a6295413cfeba462ab75ac, published 2026-12-02) on the Worker path, and moves the catalog to it.

16.5.0 is a minor cut from the canary line at v16.4.0. 16.4.6 is not its ancestor. Apps created with ^16.4.6 already install it, so the build has to hold today. Nothing in it is a security fix past 16.4.5, so SECURITY_FLOOR stays 16.4.5.

Changes

  • WebAssembly loader (patches/wasm-loader.ts)
    • 16.5 turns on turbopackMinifyBeforeChunking by default (vercel/next.js#102520), so the loader module registers its exports as function expressions written in place.
    • The patch did not recognise that, and every build that imports a .wasm failed with "no Turbopack WebAssembly loader was found to rewrite" (check:matrix, next-minimal).
    • An entry may now be a local or an inline function, whose role is read from its own arity and streaming call. Anything else is still refused.
    • The patch gains tests of its own, including the 16.5.0 chunk run in a VM.
  • Classified Flight twins (core/bundle)
    • 16.5 classifies a page's full-route .rsc output too.
    • The router's names now require the narrower-class arm to be a document, so /x/[id].rsc twins are not named.
  • Next.js's own bot list (request/blocking-metadata.ts)
    • 16.5 respells its default HTML-limited bot list ([\w-]-Google|…). A default-config build no longer matched NEXT_HTML_LIMITED_BOTS, so the edge compiled it and capped agents at 512 characters.
    • isNextOwnList recognises both spellings, which name the same agents.
  • x-next-prelude-metadata
    • 16.5 puts this mark on a document whose prelude lacks its metadata.
    • It now passes the shell header allowlist, so it reaches documents, and is taken off segments and Flight payloads, as Next.js does. Nothing acts on it yet.
  • bypassFor: 16.5 widens it to PrerenderBypassCondition. The adapter carries the RouteHas conditions and refuses a method condition, which it does not declare support for.
  • upwind dev and AGENTS.md
    • 16.5's next dev keeps a second block, the upgrade reminders, and keeps the rules block on every run.
    • From 16.4, upwind dev calls the project's own syncAgentRulesForDev / syncAgentUpgradeForDev, so each release's semantics follow without version checks.
    • The website's AGENTS.md gains the block Next.js's own writer adds.
  • @next/routing 16.5 (vercel/next.js#101934)
    • It lands a rewritten path on a name it is handed before dynamic routes, as next start does in 16.4 and 16.5.
    • What is served does not change (landedRoute already put it right); the tests expect the router's own answer.
  • Tests pinned to 16.4 sources: these read route-kind.js and load-manifest.external.js, which changed, so they now read the pinned release package.
  • Go Route Handlers: next-go-routes and next-go-routes-single hold at 16.5.0, so the proofs take 16.5.0 beside rc.5. The example and the README follow.
  • Catalog
    • next and @next/routing move to 16.5.0, along with the matrix fixtures, the website, the READMEs and create-upwind's ^16.5.0.
    • create-upwind's scaffold still matches 16.5's (check:agent-rules).

Not here

  • deploy-tests stays at 16.4.5.
    • 16.5.0's test tree differs in 352 e2e test files, and its harness changed (pnpm i, a vercel gate).
    • Its failures are to be read from a run before the nightly or a pull request is held to it. REVIEWED.md records this.
    • The 12 copied supplements stay at 16.4.5.
  • The native Node path still accepts 16.4.3–16.4.5 only. 16.5.0 changes the single pins every release shared (pages-handler.js, the evaluator, route-kind.js, templates), so it needs per-release pins and the producer's Pages handler references. That comes in a separate pull request on top of #474.
  • The new Adapter API capabilities (getCapabilities: method-based prerender bypass, HTML-limited bot prerenders) come next, in their own pull requests.

Deploy order

  • The bundle schema already accepts compute: 'dynamic' (327d53dd). Nothing here changes a manifest or bundle version.
  • A host that parses bundles with an older core refuses a 16.5.0 Cache Components bundle loudly rather than mis-serving it. Update hosts before building with 16.5.0.

Verification

GitHub Actions cannot start jobs for this account at the moment, so the matrix and patch checks were run locally.

  • pnpm check:patches: every patch applies to 16.5.0 (17 patches, 71 files, 95 edits).
  • check:matrix --versions 16.5.0:
    • all nine fixtures of the default set build and hold;
    • so do next-go-routes, next-go-routes-single, next-go-proxy and next-go-proxy-path (Go 1.27.4).
  • The Go tests of go-routes and go-http pass, as do the identicon example's Go and Node tests.
  • The touched suites pass (core, runtime, edge, adapter, upwind), as do tools/next-matrix's tests.
  • pnpm format, knip, check:agent-rules, check:vocabulary and eslint on the touched files are clean.

Devin Review


Summary by cubic

Supports Next.js 16.5.0 on the Worker path and moves the catalog (next, @next/routing, fixtures, website, create-upwind) to it. 16.5.0 is a minor cut from the canary line rather than from 16.4.6, so apps created with ^16.4.6 already install it and the build has to hold.

Fixed for 16.5.0

  • The wasm-loader patch now recognizes the inline registrations 16.5.0 writes when turbopackMinifyBeforeChunking takes effect; previously every .wasm import failed the build with "no Turbopack WebAssembly loader was found to rewrite".
  • Classified .rsc Flight twins are no longer named as their own classes, 16.5.0's respelled bot list is recognized without being compiled (long agents judged rather than capped), x-next-prelude-metadata passes the shell header allowlist and is stripped from segments and Flight payloads, and bypassFor refuses 16.5.0's method condition rather than dropping it.
  • upwind dev now calls the project's own agent-file sync functions, so 16.5's upgrade-reminder block and 16.4's rules rewrites follow each release's own semantics. The same refresh now runs in create-upwind before the first commit, via the installed writeAgentUpgradeFiles, so a new project's first next dev leaves the tree clean.
  • The cookie-echo and websocket-response suites now run against each release's own modules (16.5.0 and the next-16-4-5 alias): 16.5 changed the request store's input and the send-response serializer's header check.
  • Go Route Handler fixtures and the identicon example prove 16.5.0 alongside rc.5.

Left behind

  • deploy-tests stays at 16.4.5: 16.5.0's test tree differs in 352 e2e files and its harness changed, so failures there should be read from a run first. The native Node path still accepts 16.4.3–16.4.5 only, and new adapter capabilities (method-based prerender bypass, HTML-limited bot prerenders) come in separate PRs. SECURITY_FLOOR stays 16.4.5.
  • Update bundle-parsing hosts before building with 16.5.0: an older core refuses a 16.5.0 Cache Components bundle loudly rather than mis-serving it.