Skip to content

chore: Upgrade to Next.js 16.1.1#770

Merged
thostetler merged 5 commits intoadsabs:masterfrom
thostetler:upgrade-to-next-16
Jan 16, 2026
Merged

chore: Upgrade to Next.js 16.1.1#770
thostetler merged 5 commits intoadsabs:masterfrom
thostetler:upgrade-to-next-16

Conversation

@thostetler
Copy link
Member

Upgrades the project from Next.js 15 to Next.js 16.1.1, with associated
dependency and configuration updates.

Changes made:

  • Upgrade TypeScript from 4.9.5 to 5.9.3
  • Upgrade eslint-config-next from 15.0.1 to 16.1.1
  • Remove deprecated runtime config (serverRuntimeConfig, publicRuntimeConfig)
  • Migrate to direct environment variable access for API hosts
  • Remove deprecated next.config options (esmExternals, newNextLinkBehavior, devIndicators)
  • Fix incorrect AuthorList import in citation_helper page
  • Use webpack bundler for builds (Turbopack has package compatibility issues)
  • Keep React at 18.3.1 for compatibility with react-shepherd, @nivo, @tanstack/react-query
  • Migrate lint-staged and lint script from next lint to eslint

Notes:

  • Turbopack is now the default bundler in Next.js 16, but some packages
    (react-shepherd) are not compatible. Using webpack via --webpack flag.
  • React 19 is supported by Next.js 16, but kept at 18.3.1 due to package
    compatibility (react-shepherd, @nivo, @tanstack/react-query require React 18).
  • The middleware.ts file shows a deprecation warning suggesting rename to
    proxy.ts - this can be addressed in a follow-up PR.
  • There's an ESLint flat config issue with lint-staged that needs investigation.

Testing:

  • Build passes with all 60 routes
  • 793 unit tests pass

@codecov
Copy link

codecov bot commented Jan 15, 2026

Codecov Report

❌ Patch coverage is 66.66667% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 60.9%. Comparing base (8deae84) to head (03c306f).

Files with missing lines Patch % Lines
src/api/config.ts 60.0% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           master    #770     +/-   ##
========================================
- Coverage    60.9%   60.9%   -0.0%     
========================================
  Files         301     301             
  Lines       35076   35040     -36     
  Branches     1506    1500      -6     
========================================
- Hits        21344   21319     -25     
+ Misses      13698   13687     -11     
  Partials       34      34             
Files with missing lines Coverage Δ
src/components/Metatags/Metatags.tsx 95.4% <100.0%> (+2.5%) ⬆️
src/types.ts 100.0% <ø> (ø)
src/api/config.ts 74.0% <60.0%> (+4.0%) ⬆️

... and 3 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.

- Upgrade TypeScript from 4.9.5 to 5.9.3
- Upgrade eslint-config-next from 15.0.1 to 16.1.1
- Remove deprecated runtime config (serverRuntimeConfig, publicRuntimeConfig)
- Migrate to direct environment variable access for API hosts
- Remove deprecated next.config options (esmExternals, newNextLinkBehavior, devIndicators)
- Fix incorrect AuthorList import in citation_helper page
- Use webpack bundler for builds (Turbopack has package compatibility issues)
- Keep React at 18.3.1 for compatibility with react-shepherd, @nivo, @tanstack/react-query
- Migrate lint-staged and lint script from next lint to eslint (next lint deprecated)
- Updated eslint.config.mjs to use native flat config imports from
  eslint-config-next instead of FlatCompat wrapper which caused
  circular reference errors with eslint-config-next@16
- Fixed mvp.spec.ts to handle parallel test execution by finding
  the specific bootstrap-failure call instead of assuming calls[0]
- Disabled React Compiler rules (set-state-in-effect, preserve-manual-
  memoization, immutability, refs, use-memo, incompatible-library) since
  the project is not using React Compiler
- Set react-hooks/exhaustive-deps to warn to match previous behavior
- Removed unused 'vi' import from Metatags.test.tsx
@thostetler thostetler requested a review from shinyichen January 15, 2026 20:43
@thostetler thostetler marked this pull request as ready for review January 15, 2026 20:43
- Use page.route() instead of setExtraHTTPHeaders() to ensure test
  scenario headers persist through redirects
- Use waitUntil: 'commit' to avoid timeouts waiting for full page load
- Use url instead of domain when adding cookies (fixes single-label
  hostname issues in Docker where domain is "nectar")
- Increase test timeout to 60s in CI environment
- Fix mvp.spec.ts to handle parallel test execution by filtering
  for specific bootstrap-failure call
@thostetler thostetler merged commit b6389d6 into adsabs:master Jan 16, 2026
5 checks passed
@thostetler thostetler deleted the upgrade-to-next-16 branch January 16, 2026 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants