Repository navigation
feat(nextjs)!: upgrade document integrations for Next 16 - #283
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 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".
There was a problem hiding this comment.
💡 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".
There was a problem hiding this comment.
💡 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' |
There was a problem hiding this comment.
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 👍 / 👎.
Таска
latest, сохранить Yarn 4.18, убрать старый Jest/tooling и запустить штатные hooks без обходаnext-document-with-*на Next 16/React 19 как несовместимый выпуск 1.0.0; остальные два пакета выпускаются с patch-версиямиDocument.getInitialProps, убрать отсутствующий в Next 16Document.renderDocumentи перевести Helmet-интеграцию на React 19 совместимый провайдер с серверным сбором метатеговundefinedпо умолчанию, hooks выдают прежниеMissing <...Provider>Как проверять
Основной сценарий
Действие: запустить
node .yarn/releases/yarn.js install --immutableиnode .yarn/releases/yarn.js check --verifyОжидаемый результат: lockfile не меняется; форматирование, lint и typecheck исходников проходят без ошибок
Действие: запустить
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
Дополнительный сценарий
Действие: вызвать четыре Document HOC через
getInitialProps, для Helmet обернуть App вwithHelmetApp()и проверить итоговые head-элементыОжидаемый результат: GTM, иконки и Open Graph добавляют ожидаемые данные; Helmet передаёт title, meta и атрибуты html/body через App → Document без обращения к удалённому
renderDocumentДействие: установить локально собранный архив нового Helmet HOC, заменить старые Helmet-компоненты в SEO страницах на React 19 форк и собрать оба renderer; отдельно собрать email renderer после удаления неиспользуемой зависимости
Ожидаемый результат: все три renderer проходят штатную сборку; временный архив не попадает в этот PR или опубликованный manifest
Действие: выполнить четыре unit-теста рендеринга контекстов
Ожидаемый результат: без Provider появляется точная ошибка
Missing <...Provider>, с Provider hook возвращает переданное значениеПруфы
check --verify, сборки всех шести пакетов, version check и dry run; нативные commit hooks прошлиreact-helmetи его PnP-надстройки удалены из затронутого потребительского контураwithHelmetApp()подтвердил передачу title, meta и html/body атрибутов; новый Helmet fork объявляет peer React 19 и не тянетreact-side-effectcheck --verifyи сборка identity integrationskipLibCheckограничивает диагностику деклараций зависимостей Next 16; узкий Yarn patch исправляет относительные импорты.d.tsHelmet fork под NodeNext, strict typecheck исходников и отдельные сборки пакетов остаются включены