Summary
Next.js 16 (released 2025-10-21) is now latest on npm (16.2.4). findable-ui currently pins next ^15.5.13 as a peer dep. This spike scopes what a v16 upgrade costs for this library and for each consuming app (data-browser, ncpi-dataset-catalog, hca-atlas-tracker, etc.) and proposes a phased upgrade plan.
Current state (audit)
- Peer deps:
next ^15.5.13, react ^19.2.3, Node 22.12.0
- Pages Router APIs in library:
next/router, GetStaticProps*, GetStaticPaths* (in src/utils/mdx/staticGeneration/)
- MDX:
next-mdx-remote/serialize v5 — runtime serializer consumed via getStaticProps pattern
- No App Router RSC usage: no
"use client"/"use server", no next/headers, no next/cookies
- Router-agnostic imports in use:
next/link, next/head, next/image, usePathname, useSearchParams, ReadonlyURLSearchParams
Goals
- Go/no-go recommendation with rough effort estimate (S/M/L per consumer).
- Identify blockers that need upstream fixes before we can bump the peer range.
- Draft a phased rollout plan: library bump → per-consumer upgrades.
Deliverables
- Compatibility matrix: findable-ui features × Next 16 changes.
- Per-consumer impact notes (router type, MDX use, image/middleware use).
- Proposed PR sequence + fallback plan if any consumer must stay on 15.
Areas to evaluate
1. Router strategy (biggest open question)
- findable-ui ships Pages Router helpers. Pages Router still works in Next 16 but is clearly deprioritized (no Cache Components support, no new caching APIs, RSC/React Compiler benefits App-Router-only).
- Audit each consumer: which are on Pages Router vs App Router vs hybrid? Decide whether findable-ui should:
- (a) stay Pages-compatible,
- (b) publish both Pages + App entrypoints, or
- (c) migrate to App Router in a major version.
next/navigation hooks already in use work in both routers — good.
2. MDX pipeline
next-mdx-remote/serialize is used in src/utils/mdx/staticGeneration/ (Pages Router getStaticProps pattern). Confirm next-mdx-remote v5 supports Next 16.
- Evaluate whether to move to the App Router
<MDXRemote /> RSC variant or @next/mdx.
- Decision affects API surface: consumers using these helpers would need to migrate if we change it.
3. Next 16 breaking changes to audit
- Node 20.9+ required (we're on 22.12 — fine; check all consumer CI/Docker).
- TypeScript 5.1+ minimum.
- Async
params / searchParams / cookies() / headers() / draftMode() — only matters if we add App Router code; current library code unaffected.
middleware.ts → proxy.ts — not used in library; check consumers.
- AMP removal — not used.
next lint removal — migrate ESLint invocation; adopt eslint-config-next v16 flat-config default.
next/image default changes:
- new
localPatterns requirement for local src with query strings
qualities default [75]
minimumCacheTTL 60s → 4h
maximumRedirects capped at 3
dangerouslyAllowLocalIP default off
- Audit all
<Image> usages in library and consumers.
images.domains deprecated → remotePatterns.
revalidateTag() signature change — not used in library; check consumers.
- Turbopack is default bundler — verify Storybook (
@storybook/nextjs-vite already Vite-based — likely fine) and any consumer webpack customizations.
- React Compiler stable — opt-in; evaluate later.
- Parallel routes
default.js required — consumer-side only.
- Sass modern API — check for
.scss usage.
scroll-behavior: smooth auto-apply removed — audit global styles.
4. Peer dependency coordination
- Bumping
next peer to ^16 is breaking → findable-ui major version bump.
next-auth ^4.24.13 — verify v4 works with Next 16, or plan move to next-auth v5 / Auth.js.
@next/eslint-plugin-next, eslint-config-next — bump to 16 and migrate to flat config if not already.
- React 19.2 features (View Transitions, Activity) — opportunities, not requirements.
5. Consumer impact survey
For each consumer (data-browser, ncpi-dataset-catalog, hca-atlas-tracker, anvil-portal, brc-analytics, hprc-data-explorer, etc.): record Next version, router in use, MDX usage, middleware usage, custom webpack config, image config, and CI Node version. This determines whether we can ship the bump as a single major or need a compat window.
6. Release & rollout
- Proposed: publish findable-ui vNEXT-major with
next ^16 peer; optionally keep a maintenance branch on v15 peer for one quarter if any consumer can't move immediately.
- Use
npx @next/codemod@canary upgrade latest on each consumer PR.
Acceptance criteria
Summary
Next.js 16 (released 2025-10-21) is now
lateston npm (16.2.4). findable-ui currently pinsnext ^15.5.13as a peer dep. This spike scopes what a v16 upgrade costs for this library and for each consuming app (data-browser, ncpi-dataset-catalog, hca-atlas-tracker, etc.) and proposes a phased upgrade plan.Current state (audit)
next ^15.5.13,react ^19.2.3, Node 22.12.0next/router,GetStaticProps*,GetStaticPaths*(insrc/utils/mdx/staticGeneration/)next-mdx-remote/serializev5 — runtime serializer consumed viagetStaticPropspattern"use client"/"use server", nonext/headers, nonext/cookiesnext/link,next/head,next/image,usePathname,useSearchParams,ReadonlyURLSearchParamsGoals
Deliverables
Areas to evaluate
1. Router strategy (biggest open question)
next/navigationhooks already in use work in both routers — good.2. MDX pipeline
next-mdx-remote/serializeis used insrc/utils/mdx/staticGeneration/(Pages RoutergetStaticPropspattern). Confirmnext-mdx-remotev5 supports Next 16.<MDXRemote />RSC variant or@next/mdx.3. Next 16 breaking changes to audit
params/searchParams/cookies()/headers()/draftMode()— only matters if we add App Router code; current library code unaffected.middleware.ts→proxy.ts— not used in library; check consumers.next lintremoval — migrate ESLint invocation; adopteslint-config-nextv16 flat-config default.next/imagedefault changes:localPatternsrequirement for local src with query stringsqualitiesdefault[75]minimumCacheTTL60s → 4hmaximumRedirectscapped at 3dangerouslyAllowLocalIPdefault off<Image>usages in library and consumers.images.domainsdeprecated →remotePatterns.revalidateTag()signature change — not used in library; check consumers.@storybook/nextjs-vitealready Vite-based — likely fine) and any consumer webpack customizations.default.jsrequired — consumer-side only..scssusage.scroll-behavior: smoothauto-apply removed — audit global styles.4. Peer dependency coordination
nextpeer to^16is breaking → findable-ui major version bump.next-auth ^4.24.13— verify v4 works with Next 16, or plan move tonext-authv5 / Auth.js.@next/eslint-plugin-next,eslint-config-next— bump to 16 and migrate to flat config if not already.5. Consumer impact survey
For each consumer (data-browser, ncpi-dataset-catalog, hca-atlas-tracker, anvil-portal, brc-analytics, hprc-data-explorer, etc.): record Next version, router in use, MDX usage, middleware usage, custom webpack config, image config, and CI Node version. This determines whether we can ship the bump as a single major or need a compat window.
6. Release & rollout
next ^16peer; optionally keep a maintenance branch on v15 peer for one quarter if any consumer can't move immediately.npx @next/codemod@canary upgrade lateston each consumer PR.Acceptance criteria
/docsor PR description