Skip to content

feat(nextjs)!: upgrade document integrations for Next 16 - #283

Merged
TorinAsakura merged 12 commits into
masterfrom
build/nextjs-workspace-release
Oct 13, 2026
Merged

TorinAsakura merged 12 commits into
masterfrom
build/nextjs-workspace-release

Conversation

@TorinAsakura

@TorinAsakura TorinAsakura commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

Таска

  • Refs atls/infrastructure#1584
  • Close https://github.com/atls/infrastructure/issues/1662
  • Подготовить публичные NextJS workspaces к общему publisher: обновить Raijin до 2.1.0 через буквальный latest, сохранить Yarn 4.18, убрать старый Jest/tooling и запустить штатные hooks без обхода
  • Перевести четыре пакета next-document-with-* на Next 16/React 19 как несовместимый выпуск 1.0.0; остальные два пакета выпускаются с patch-версиями
  • Сохранить Pages Router Document.getInitialProps, убрать отсутствующий в Next 16 Document.renderDocument и перевести Helmet-интеграцию на React 19 совместимый провайдер с серверным сбором метатегов
  • Сохранить отказ identity hooks при отсутствии их Provider: контексты получают undefined по умолчанию, hooks выдают прежние Missing <...Provider>

Как проверять

Основной сценарий

  1. Контекст: чистый checkout на Node 24
    Действие: запустить node .yarn/releases/yarn.js install --immutable и node .yarn/releases/yarn.js check --verify
    Ожидаемый результат: lockfile не меняется; форматирование, lint и typecheck исходников проходят без ошибок
  2. Контекст: шесть публичных workspaces перед публикацией
    Действие: запустить node .yarn/releases/yarn.js workspaces foreach -A -t --no-private run build, version check и version apply --all --dry-run
    Ожидаемый результат: все шесть пакетов собираются; четыре Document-пакета получают 1.0.0, identity integration — 1.0.4, sitemap generator — 0.0.5

Дополнительный сценарий

  1. Контекст: Pages Router на Next 16/React 19
    Действие: вызвать четыре Document HOC через getInitialProps, для Helmet обернуть App в withHelmetApp() и проверить итоговые head-элементы
    Ожидаемый результат: GTM, иконки и Open Graph добавляют ожидаемые данные; Helmet передаёт title, meta и атрибуты html/body через App → Document без обращения к удалённому renderDocument
  2. Контекст: Serenity site и identity renderer на Next 16.2/React 19.2
    Действие: установить локально собранный архив нового Helmet HOC, заменить старые Helmet-компоненты в SEO страницах на React 19 форк и собрать оба renderer; отдельно собрать email renderer после удаления неиспользуемой зависимости
    Ожидаемый результат: все три renderer проходят штатную сборку; временный архив не попадает в этот PR или опубликованный manifest
  3. Контекст: каждый identity hook с Provider и без него
    Действие: выполнить четыре unit-теста рендеринга контекстов
    Ожидаемый результат: без Provider появляется точная ошибка Missing <...Provider>, с Provider hook возвращает переданное значение

Пруфы

  • Локально прошли immutable install, полный check --verify, сборки всех шести пакетов, version check и dry run; нативные commit hooks прошли
  • Собранный архив Helmet HOC проверен в изолированном checkout Serenity: site, identity и email renderer собраны штатными командами, старый react-helmet и его PnP-надстройки удалены из затронутого потребительского контура
  • Серверный пробный рендер с withHelmetApp() подтвердил передачу title, meta и html/body атрибутов; новый Helmet fork объявляет peer React 19 и не тянет react-side-effect
  • Пробный запуск sitemap CLI записал XML для двух страниц и отклонил некорректный URL
  • После восстановления provider guards прошли четыре новых unit-теста, полный check --verify и сборка identity integration
  • skipLibCheck ограничивает диагностику деклараций зависимостей Next 16; узкий Yarn patch исправляет относительные импорты .d.ts Helmet fork под NodeNext, strict typecheck исходников и отдельные сборки пакетов остаются включены

@TorinAsakura TorinAsakura changed the title build(nextjs): prepare workspaces for automatic releases feat(nextjs)!: upgrade document integrations for Next 16 Oct 12, 2026
@TorinAsakura
TorinAsakura marked this pull request as ready for review October 12, 2026 23:24
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T00:51:19.554118Z 27ca7a6 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a197a0f8ac

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c8cec525cd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread package.json Resolved
@TorinAsakura
TorinAsakura merged commit 6089623 into master Oct 13, 2026
2 checks passed
@TorinAsakura
TorinAsakura deleted the build/nextjs-workspace-release branch October 13, 2026 00:48

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 27ca7a6378

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


import { isUiNodeInputAttributes } from '@ory/integrations/ui'
import { EventEmitter } from 'events'
import { EventEmitter } from 'node:events'

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Keep the event emitter browser-compatible

When any exported Pages Router flow or client-bound App Router flow is bundled, ValuesStore becomes part of the browser module graph, but node:events explicitly selects the Node.js built-in. Next 16 requires client bundles not to reference native Node modules, so this replacement of the browser-resolvable events import causes downstream applications to fail compilation instead of rendering the identity flows; retain a browser-compatible emitter and declare it as a runtime dependency. See the Next.js 16 upgrade guidance.

Useful? React with 👍 / 👎.

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.

1 participant