chore: support Next.js 16.4.6

Merged
SO
20d ago
+246-93

Summary

Moves upwind to Next.js 16.4.6 (54b876b6b161b0ecda19562eb264bec637e60d6d), the same way #448 moved it to 16.4.5.

16.4.6 backports three changes: route handler responses are compressed by next start (vercel/next.js#101280), Turbopack's GC is fixed for dev, and Tailwind is pinned in create-next-app. It carries no security fix, so SECURITY_FLOOR stays at 16.4.5.

What 16.4.6 changes for upwind

Its only server change is in server/base-http/node.ts. NodeNextResponse.appendHeader now sets a header's first value as a string rather than as a one-element array, because next start's compression middleware skips array values.

  • The runtime's bridges read a header as a string or an array alike (node-bridge.ts, native/headers.ts), so nothing changes in what they answer.
  • Compression is not done in the Function.
  • The redirect Location guard wraps Node's own appendHeader, which this change does not reach.

The Turbopack change is in dev's GC alone.

Changes

  • Packages: the catalog's next and @next/routing, the eight fixtures on the current release, create-upwind (^16.4.6), the web site and the READMEs move to 16.4.6. next-native, next-twoslash and next-large-prerender-bodies stay where they are.
  • deploy-tests stays on 16.4.5 for now (NIGHTLY_NEXTJS_REF, the dispatch default, and the release the copies are held to). See below.
  • Copies: each of the 12 copied suites has the same Git tree at 16.4.5 and 16.4.6, so they can move with the supported release when it does.
  • Readings: AT_16_4_6 is 16.4.5's, for a run at 16.4.6. 16.4.6 changes none of their suites, and REVIEWED.md says so.
  • Native path: it still accepts 16.4.3 to 16.4.5. Its tests now read 16.4.5 under a next-16-4-5 alias, as #448 did for 16.4.4.

What is left

  • The native path refuses 16.4.6 until a follow-up, as #452 was for 16.4.5. The follow-up needs the Pages handler corpus from the native-pages-handler-profile producer, and GitHub Actions cannot start jobs for this account at the moment (billing).
  • The supported release moves to 16.4.6 in a follow-up, once a run at 16.4.6 has been read. 16.4.6 moves compression from test/development to test/e2e, with route handler cases, so deploy mode runs it for the first time.
    • Every case expects content-encoding: gzip, a 100-byte route handler's included.
    • A host behind Cloudflare compresses at the edge. The runner's node and cloudflare targets have no such edge, and the runtime compresses no route handler response, so the suite would fail there.
    • Moving NIGHTLY_NEXTJS_REF now would fail every pull request's run with no reading to hold it to, and readings are read from a run. That follow-up dispatches 16.4.6, reads it, and then moves the default with the copies.
    • Compressing in the Function to satisfy the suite is not an option, as it would cost TTFB.

Verification

GitHub Actions cannot run here at the moment, so these were run locally:

  • Lockfiles: next@16.4.6, @next/routing@16.4.6 and @next/swc-linux-x64-gnu@16.4.6 in pnpm-lock.yaml, and next@16.4.6 in web-site/pnpm-lock.yaml, match the registry's dist.integrity.
  • Patches: check-patches.ts applies all 17 patches to 16.4.6 (71 files, 95 edits).
  • Tests:
    • adapter: the 9 test files that read the installed Next.js, 97 passed;
    • core: 2,186 passed;
    • create-upwind: 6 passed;
    • runtime: d1-observation, 32 passed;
    • deploy-tests: 230 of 231 passed. runner-watchdog fails on macOS, as it reads /proc, and this change does not touch it.
  • Format and lint: oxfmt and ESLint pass on the changed files.

Summary by CodeRabbit

  • Updates
    • Updated the project, examples, and test fixtures to use Next.js 16.4.6.
    • Added support for reviewing and validating the 16.4.6 release in deployment test documentation.
    • Updated documented release-tag examples to include newer Next.js releases.