-
-
Notifications
You must be signed in to change notification settings - Fork 801
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: support next.js 15 #4387
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 9219ec7 The changes in this PR will be included in the next version bump. This PR includes changesets to release 8 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
…tz-js/blitz into siddharth/upgrade-to-next-15
!preview next-js-15 |
Snapshot Release next-js-15 |
@@ -289,8 +289,10 @@ const makeProxyToPublicData = <T extends SessionContextClass>(ctxClass: T): T => | |||
export async function getBlitzContext(): Promise<Ctx> { | |||
try { | |||
const {headers, cookies} = require("next/headers") | |||
const reqHeader = Object.fromEntries(headers()) | |||
const csrfToken = cookies().get(COOKIE_CSRF_TOKEN()) | |||
const cookieStore = await cookies() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would wrap this in Promise.resolve
to maintain backward compatibility with Next.js 14 and earlier versions.
const reqHeader = Object.fromEntries(headers()) | ||
const csrfToken = cookies().get(COOKIE_CSRF_TOKEN()) | ||
const cookieStore = await cookies() | ||
const headersStore = await headers() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And here offcourse
Closes: #4385 #4385
What are the changes and their implications?
Bug Checklist
pnpm changeset
in the root directory)Feature Checklist
pnpm changeset
in the root directory)main
branch)