Files
Dustin ByrneandGitHub 81a6912b3a feat(next): Add first class support for Next.js (#3122)
* feat(next): Introduce a first class Next.js integration

* feat(next): Next.js app router example

* feat(next): Provide default client configuration

* feat(next): Composable middleware; allow first-class proxy

* refactor(next): Use `resolveApiKey`

* feat(next): Example uses proxied PostHog at /ingest

* fix(next): Skip initial client flag load when flags are bootstrapped via SSR

* feat(next): Deduplicate flag evaluation with React.cache

* refactor(next): Use `readPostHogCookie`

* feat(next): Sync $sesid and $device_id from cookies in server clients

* feat(next): Scope server-side client via `enterContext()`

* fix(next): Eagerly init the client-side PostHog client

This avoids a race condition where the client may be used before it's
initialized

* feat(next): Next SSR is aware of client opt-out consent

When configured, the server will respect the clients opt-out consent
configuration.

* chore(next): Update the app router example

* fix(next): Wrap PostHogPageView in Suspense

* docs(next): Add README and USAGE

* refactor(next): Drop explicit force-dynamic in example

* feat(next): Use a composable pages API

* feat(next): Integrate `waitUntil` automatically in Vercel; expose serverOptions

* chore(next): Clean up tsconfig

* fix(next): finalizing clean up

* chore(next): add changeset

* fix(next): packaging and bug fixes

Getting the example back in running order

* chore(next): move the app-router example

* chore(next): fix the vercel build

* fix: greptile comments

* fix: ClientPostHogProvider warns on missing api key

* test: validate pageview on router ready

* trigger ci

* fix: greptile

* chore: prettier
2026-03-05 16:06:22 -05:00

2 lines
35 B
TypeScript

import '@testing-library/jest-dom'