Skip to content

fix(repo): bump next to 15.5.18#3182

Merged
baktun14 merged 5 commits into
mainfrom
fix/deps-bump-nextjs-15-security
May 19, 2026
Merged

fix(repo): bump next to 15.5.18#3182
baktun14 merged 5 commits into
mainfrom
fix/deps-bump-nextjs-15-security

Conversation

@baktun14
Copy link
Copy Markdown
Contributor

@baktun14 baktun14 commented May 15, 2026

Why

Bump Next.js from 14.2.35 to 15.5.18 across all three Next.js apps (deploy-web, stats-web, provider-console) in a single change so they share one lockfile update.

What

Dependencies

  • next 14.2.35 → 15.5.18 in deploy-web / stats-web / provider-console
  • react / react-dom 18.2.0 → 18.3.1 (minimum required by Next 15)
  • eslint-config-next 14.x → 15.5.18 across all workspaces (api, indexer, tx-signer, dev-config, react-query-proxy too) to deduplicate the bundled @next/next ESLint plugin
  • @mui/material-nextjs stays on 5.x; a one-line cast in _document.tsx bridges its bundled Next 14 DocumentContext to Next 15's structurally-equivalent type
  • Root package.json now declares next as a direct dep + \"overrides\": { \"next\": \"$next\" } to force every transitive consumer (auth0/nextjs-auth0, mui/material-nextjs, next-pwa, next-themes, geist, next-seo, etc.) onto the single 15.5.18 install — without this the dual-version install blew up SSR with Cannot find module 'next/dist/server/route-modules/pages/vendored/contexts/html-context'
  • vite ^8.0.0 added as a direct devDep of deploy-web so @vitejs/plugin-react@6 can resolve its peer

stats-web (App Router) async-request migration

  • cookies() / headers() / route params / route searchParams now return promises. Updated app/layout.tsx, lib/serverFetch.ts, and 10 page files to await them. Test mocks updated; vi.advanceTimersByTimeAsync used for the abort timer test now that the chain has an extra microtask.

deploy-web (Pages Router) build fixes

  • images.domainsimages.remotePatterns
  • Dropped experimental.instrumentationHook (instrumentation.ts is auto-detected in 15)
  • Fixed monaco-editor import paths that had stray vs//base double-slashes (Next 15's webpack resolver rejects them)
  • Moved src/pages/api/proxy/[...path].spec.tssrc/lib/nextjs/api-routes-specs/proxy-path.spec.ts because Next 15's API-route type validator was treating the spec file as a handler and demanding a default export
  • Disabled react-hooks/rules-of-hooks for Playwright fixtures — the rule misreads Playwright's destructured use callback as the React 19 use hook

provider-console (Pages Router)

  • Same images.domainsimages.remotePatterns migration

Lint and coverage config

  • packages/dev-config/.eslintrc.base.js now ignores **/next-env.d.ts and **/env-config.schema.js (generated artifacts that fail the triple-slash-reference and parser-options rules)
  • packages/ui declares postcss and autoprefixer as devDeps (referenced by its postcss.config.js)
  • .codecov.yml ignores Next.js framework files (_document.tsx, _app.tsx, _error.tsx, next-env.d.ts), Monaco editor wiring, and spec files so the patch coverage isn't dragged down by infrastructure changes

Test plan

  • `npm run lint --workspaces` — clean across the monorepo
  • `npm run validate:types -w ./packages` — clean
  • `cd apps/stats-web && npm run test:unit && npm run build` — 21/21 tests, build OK
  • `cd apps/deploy-web && TZ=UTC npm test && DEPLOYMENT_ENV=staging npm run build` — 1541/1541 tests, build OK
  • `cd apps/provider-console && npm run test:unit && DEPLOYMENT_ENV=staging npm run build` — 15/15 tests, build OK
  • Manual smoke: load each app's golden path locally after deploy (especially stats-web — validate that theme cookie toggling still works after the async `cookies()` rewrite)

Summary by CodeRabbit

  • New Features

    • Upgraded Next.js to v15.5.18 and React to v18.3.1 across apps; route params/searchParams now handled asynchronously for dynamic pages.
  • Bug Fixes

    • Fixed Monaco Editor CSS import so icons load.
    • Image sourcing tightened to HTTPS remote patterns for GitHub assets.
    • Server-side fetch now correctly awaits forwarded IP headers.
  • Chores

    • Updated ESLint/TypeScript configs, added eslint overrides for test fixtures, removed deprecated experimental settings, and expanded coverage ignores.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 15, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f459e611-2f39-4578-ad1d-1eb1c9a6dc84

📥 Commits

Reviewing files that changed from the base of the PR and between f33cbc5 and 3c43d43.

📒 Files selected for processing (2)
  • apps/deploy-web/src/lib/nextjs/api-routes-specs/auth-email-code-start.spec.ts
  • apps/deploy-web/src/lib/nextjs/api-routes-specs/auth-email-code-verify.spec.ts
✅ Files skipped from review due to trivial changes (2)
  • apps/deploy-web/src/lib/nextjs/api-routes-specs/auth-email-code-verify.spec.ts
  • apps/deploy-web/src/lib/nextjs/api-routes-specs/auth-email-code-start.spec.ts

📝 Walkthrough

Walkthrough

Bumps Next/React/types and eslint-config-next across packages, converts many Next page props to Promise-wrapped params/searchParams and updates metadata/page functions, makes serverFetch/header handling async and adjusts tests, and applies config/lint/coverage and small wiring fixes.

Changes

Dependency & config updates

Layer / File(s) Summary
Next/React/type and eslint-config bumps
apps/deploy-web/package.json, apps/provider-console/package.json, apps/stats-web/package.json, packages/ui/package.json, package.json, packages/*/package.json
Upgrade next to ^15.5.18, bump react/react-dom to ^18.3.1, update @types/react/@types/react-dom to ^18.3.0, and upgrade eslint-config-next across affected packages; add top-level package overrides for Next/React/types.
ESLint ignore / overrides and Codecov
packages/dev-config/.eslintrc.base.js, apps/deploy-web/.eslintrc.js, apps/deploy-web/next-env.d.ts, .codecov.yml
Add ESLint ignore patterns, add deploy-web ESLint overrides disabling react-hooks/rules-of-hooks for tests/ui/**, add Next routes reference in next-env.d.ts, and add Codecov ignore entries.

Next config image allowlist & experimental removal

Layer / File(s) Summary
Images remotePatterns and experimental hook removal
apps/deploy-web/next.config.js, apps/provider-console/next.config.js, apps/stats-web/next.config.js
Replace images.domains with images.remotePatterns (protocol https + GitHub hostnames) where applicable; remove experimental.instrumentationHook settings.

Stats-web runtime and serverFetch

Layer / File(s) Summary
Route props -> Promise for many pages
apps/stats-web/src/app/**/[...]/page.tsx (addresses, deployments, blocks, graph, provider-graph, transactions, validators, bme-graph, etc.)
Change props typing so params and searchParams are Promise<...>; update generateMetadata and page components to await resolved params/searchParams and parse resolved values.
Layout theme async & serverFetch changes + tests
apps/stats-web/src/app/layout.tsx, apps/stats-web/src/lib/serverFetch.ts, apps/stats-web/src/lib/serverFetch.spec.ts
Make getTheme/RootLayout async to await cookies(); convert getIpForwardingHeaders() to Promise<Headers> and await it in serverFetch; update tests to async headers mock and async timer helpers.

Small fixes and test wiring

Layer / File(s) Summary
Document cast, Monaco import, proxy & auth specs
apps/deploy-web/src/pages/_document.tsx, apps/deploy-web/src/components/shared/Editor/monaco-editor.ts, apps/deploy-web/src/lib/nextjs/api-routes-specs/proxy-path.spec.ts, apps/deploy-web/src/lib/nextjs/api-routes-specs/auth-email-code-*.spec.ts
Cast DocumentContext when calling documentGetInitialProps, fix erroneous double-slash Monaco CSS import paths, update proxy spec import wiring and remove a comment, and switch auth route tests to absolute @src handler imports.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Suggested labels

size: L

Suggested reviewers

  • ygrishajev
  • stalniy
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/deps-bump-nextjs-15-security

Comment @coderabbitai help to get the list of available commands and usage tips.

Comment thread package-lock.json
@socket-security
Copy link
Copy Markdown

socket-security Bot commented May 15, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​next/​bundle-analyzer@​14.2.6 ⏵ 15.5.1810010090 +199 +1100

View full report

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@package.json`:
- Line 67: The repository’s package.json was updated (e.g., dependency "next":
"^15.5.18" and related changes around the same block) but the lockfile was not
regenerated, causing npm ci / EUSAGE failures; run a clean install to update the
lockfile (npm install or npm ci after removing node_modules and
package-lock.json or run npm install --package-lock-only), verify the lockfile
changes include the updated "next" version and any other edits around the same
dependency group, and commit the regenerated lockfile (package-lock.json or
npm-shrinkwrap.json) alongside the package.json change so CI and container
builds are reproducible.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: bd88a0a3-7d5a-4209-9d6e-dff2a9e4446d

📥 Commits

Reviewing files that changed from the base of the PR and between a3b1b76 and b0cacc1.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (32)
  • apps/api/package.json
  • apps/deploy-web/.eslintrc.js
  • apps/deploy-web/next-env.d.ts
  • apps/deploy-web/next.config.js
  • apps/deploy-web/package.json
  • apps/deploy-web/src/components/shared/Editor/monaco-editor.ts
  • apps/deploy-web/src/lib/nextjs/api-routes-specs/proxy-path.spec.ts
  • apps/deploy-web/src/pages/_document.tsx
  • apps/indexer/package.json
  • apps/provider-console/next.config.js
  • apps/provider-console/package.json
  • apps/stats-web/next.config.js
  • apps/stats-web/package.json
  • apps/stats-web/src/app/addresses/[address]/deployments/[dseq]/page.tsx
  • apps/stats-web/src/app/addresses/[address]/deployments/page.tsx
  • apps/stats-web/src/app/addresses/[address]/page.tsx
  • apps/stats-web/src/app/addresses/[address]/transactions/page.tsx
  • apps/stats-web/src/app/blocks/[height]/page.tsx
  • apps/stats-web/src/app/bme-graph/[snapshot]/page.tsx
  • apps/stats-web/src/app/graph/[snapshot]/page.tsx
  • apps/stats-web/src/app/layout.tsx
  • apps/stats-web/src/app/provider-graph/[snapshot]/page.tsx
  • apps/stats-web/src/app/transactions/[hash]/page.tsx
  • apps/stats-web/src/app/validators/[address]/page.tsx
  • apps/stats-web/src/lib/serverFetch.spec.ts
  • apps/stats-web/src/lib/serverFetch.ts
  • apps/tx-signer/package.json
  • package.json
  • packages/dev-config/.eslintrc.base.js
  • packages/dev-config/package.json
  • packages/react-query-proxy/package.json
  • packages/ui/package.json
💤 Files with no reviewable changes (1)
  • apps/stats-web/next.config.js

Comment thread package.json
@codecov
Copy link
Copy Markdown

codecov Bot commented May 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.04%. Comparing base (0ae0146) to head (3c43d43).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3182      +/-   ##
==========================================
+ Coverage   63.98%   64.04%   +0.05%     
==========================================
  Files        1100     1097       -3     
  Lines       26711    26687      -24     
  Branches     6475     6473       -2     
==========================================
  Hits        17092    17092              
+ Misses       8417     8394      -23     
+ Partials     1202     1201       -1     
Flag Coverage Δ
api 84.25% <ø> (ø)
deploy-web 47.44% <ø> (+0.07%) ⬆️
log-collector 85.85% <ø> (ø)
notifications 91.06% <ø> (ø)
provider-console 81.48% <ø> (ø)
provider-inventory 81.85% <ø> (ø)
provider-proxy 86.08% <ø> (ø)
tx-signer 78.14% <ø> (ø)
see 5 files with indirect coverage changes
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@baktun14 baktun14 changed the title fix(repo): bump next to 15.5.18 for may 2026 security release fix(repo): bump next to 15.5.18 May 15, 2026
Bump Next.js from 14.2.35 to 15.5.18 across deploy-web, stats-web, and
provider-console; React/react-dom to ^18.3.1 (Next 15 minimum); align
eslint-config-next to ^15.5.18 in every workspace to deduplicate the
bundled @next/next plugin; add a single root next override so all
transitive consumers (auth0/nextjs-auth0, mui/material-nextjs, next-pwa,
next-themes, geist, next-seo, etc.) resolve to 15.5.18.

stats-web (App Router) migrates the now-async request APIs: cookies(),
headers(), route params, and route searchParams are all awaited in
layout.tsx, serverFetch.ts, and ten page files. Test mocks and the
abort-timer test updated to match.

deploy-web (Pages Router) migrates images.domains to
images.remotePatterns, drops experimental.instrumentationHook (now
auto-detected), casts DocumentContext in _document.tsx to bridge the
MUI 5 bundled Next 14 type, fixes a pair of monaco-editor `vs//base`
double-slash imports that Next 15's stricter resolver rejects, and
moves one in-pages spec out of src/pages so Next 15's API-route type
validator doesn't treat it as a handler. Playwright fixtures get a
local override for react-hooks/rules-of-hooks since the rule misreads
Playwright's destructured `use` callback as the React 19 `use` hook.

provider-console gets the same images.domains -> remotePatterns migration.

vite ^8.0.0 is declared as a direct devDep of deploy-web so
@vitejs/plugin-react@6 can resolve its peer; postcss and autoprefixer
are declared in packages/ui (used by its postcss.config.js). The
shared eslint base now ignores next-env.d.ts and env-config.schema.js
generated files. .codecov.yml ignores Next.js framework files
(_document/_app/_error/next-env), Monaco wiring, and spec files so the
deploy-web patch coverage isn't dragged to 0% by infrastructure-only
diffs.
@baktun14 baktun14 force-pushed the fix/deps-bump-nextjs-15-security branch from 701ff5c to 2b6f762 Compare May 15, 2026 04:46
@stalniy
Copy link
Copy Markdown
Contributor

stalniy commented May 15, 2026

lockfile regenerated under Node 24.14.1 / npm 11.11.0 (the project's volta-pinned versions) so both darwin and linux platform-specific optional dep entries are recorded

what does it mean lockfile regenerated under Node 24.14.1 / npm 11.11.0?

baktun14 added 2 commits May 18, 2026 20:24
Add react, react-dom, and @types/react(-dom) to root overrides so a single
copy survives across the workspace. Without this, future incremental
npm installs can leave the root node_modules/react pinned at 18.2.0 (still
satisfies @interchain-ui/react's ^18.2.0 peer) while workspace-local copies
bump to 18.3.1, producing two React instances and breaking hooks at test
time. The lockfile diff is the dedup ripple from npm re-resolving against
the new overrides.
Recompute package-lock.json via npm install --package-lock-only under the
new root overrides so the lockfile is npm-ci-clean and includes all cross-
platform optional dep entries (@img/sharp-*, @esbuild/*, @next/swc-*).
@baktun14
Copy link
Copy Markdown
Contributor Author

lockfile regenerated under Node 24.14.1 / npm 11.11.0 (the project's volta-pinned versions) so both darwin and linux platform-specific optional dep entries are recorded

what does it mean lockfile regenerated under Node 24.14.1 / npm 11.11.0?

I restored from main and made sure it's incrementally updated.

baktun14 added 2 commits May 18, 2026 20:35
Same workaround as for proxy-path: Next 15's API-route type validator
treats any *.spec.ts under src/pages/api/ as a route module and demands
a default export shaped like ApiRouteConfig, breaking next build. Move
the two email-code auth specs to src/lib/nextjs/api-routes-specs/ and
switch their handler imports to the absolute @src/pages/api/... path.
@baktun14
Copy link
Copy Markdown
Contributor Author

There's potentially more issues with Next version and SSR, but these will be resolved when we refactor the app to be fully CSR.

@baktun14 baktun14 added this pull request to the merge queue May 19, 2026
Merged via the queue into main with commit 98ac4e5 May 19, 2026
58 of 59 checks passed
@baktun14 baktun14 deleted the fix/deps-bump-nextjs-15-security branch May 19, 2026 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants