Skip to content

Migrate to Next 15 so the Cloudflare adapter can move again #89

Description

@royalpinto007

Why

@opennextjs/cloudflare cannot be updated past 1.15.1 while this project is on
Next 14. Dependabot proposes the bump every week and it fails at
npm ci every time, because the adapter declares a peer on Next.

Checked the whole range rather than guessing:

adapter peer next
1.15.1 (pinned here) ^14.2.35 || ~15.0.7 … ^16.0.10
1.16.0 to 1.18.0 ~15.0.8 and up, no 14
1.19.0 >=15.5.15 || >=16.2.3
1.20.2 >=15.5.21 <16 || >=16.2.11

1.15.1 is the last release that accepts Next 14 at all, so we are sitting on the
ceiling. Everything downstream of the adapter is frozen with it.

Scope

Migrate next from ^14.2.35 to 15, then take the adapter with it.

Next 15's breaking changes that actually touch this codebase:

  • cookies(), headers(), params and searchParams became async. This repo
    reads them in route handlers and server components, so each call site needs
    awaiting.
  • fetch is no longer cached by default. Anywhere that relied on implicit
    caching needs an explicit cache option.
  • eslint-config-next and @types/react move with it.

Done when

  • next is on 15.x and @opennextjs/cloudflare is off the 1.15 pin
  • npm ci, tsc, eslint, prettier, vitest and next build all pass
  • A preview deploy renders the feed, a case page and the export route
  • The dependabot ignore added for the adapter (see the sibling issue) is removed

Notes for whoever picks this up

Do the Next bump and the adapter bump in one PR. Splitting them leaves the repo
in a state where npm ci fails, since the peer range is the thing being
satisfied.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions