Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: vercel/next.js
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v15.5.21
Choose a base ref
...
head repository: vercel/next.js
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v15.5.22
Choose a head ref
  • 2 commits
  • 23 files changed
  • 2 contributors

Commits on Jul 24, 2026

  1. [15.5] Reject TypeScript >= 7.0 with an actionable error (#96110)

    ## Summary
    
    A minimal mitigation for the TypeScript 7 problem on the `15.5.x` line,
    ported from the `next-16-2` mitigation (#95837).
    
    TypeScript 7's native compiler no longer ships the JavaScript compiler
    API (`typescript/lib/typescript.js`) that Next.js loads via
    `require('typescript')`, so an installed TS7 produces surprising
    failures with no actionable message. This was reported against 16.2 in
    #95801.
    
    ## What it does
    
    - Because the missing compiler-API file makes an installed TS7 look like
    a *missing* dependency, `hasNecessaryDependencies` now also exposes the
    resolved `typescript/package.json` path. `verifyTypeScriptSetup` reads
    that version up front and, if it's `>= 7.0.0` (including prereleases —
    `7.0.0-beta`/`-rc`, nightly `7.0.0-dev.*`, via the `7.0.0-0` sentinel
    with `includePrerelease`), throws a `CompileError` with guidance to
    install TypeScript 6 or upgrade Next.js, before the `require()` runs.
    
    Unlike the 16.2 mitigation, no install-specifier change is needed here:
    the `15.5` line already pins TypeScript auto-installs via
    `getTypeScriptPackageSpec` (`[email protected]`) rather than pulling
    `latest`.
    
    Applies to both `next dev` and `next build`.
    
    ## Notes
    
    - This is the minimal fix for `15.5`; the full
    `experimental.useTypeScriptCli` backend (real TS7 support) is a
    separate, larger effort and was considered overkill for this stable
    line.
    - Related: `next-16-2` mitigation #95837, and full backport #95831.
    
    ## Verification
    
    - `pnpm --filter=next build`
    - Boundary verified against the compiled semver: `5.8.2` / `6.x` (incl.
    `6.0.0-beta`) are not rejected; `7.0.0-dev.*` / `7.0.0-beta` /
    `7.0.0-rc` / `7.0.0` / `7.0.2` are rejected.
    - Manual repro with `typescript@7` + `[email protected]`: `next build` and `CI=1
    next build` exit non-zero with the actionable error instead of the
    opaque failure.
    lukesandberg authored Jul 24, 2026
    Configuration menu
    Copy the full SHA
    fcc0424 View commit details
    Browse the repository at this point in the history

Commits on Jul 25, 2026

  1. v15.5.22

    next-js-bot[bot] authored Jul 25, 2026
    Configuration menu
    Copy the full SHA
    6ad9e56 View commit details
    Browse the repository at this point in the history
Loading