-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
fix(nextjs): Update params type with Promise as expected in Next.js 15 #12114
fix(nextjs): Update params type with Promise as expected in Next.js 15 #12114
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
@ggallon is attempting to deploy a commit to the authjs Team on Vercel. A member of the Team first needs to authorize it. |
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.
Thanks! I believe we should use our Awaitable
here from @auth/core/types
, to be compatible with Next.js 14.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #12114 +/- ##
==========================================
- Coverage 39.22% 39.21% -0.01%
==========================================
Files 191 191
Lines 29928 29929 +1
Branches 1291 1297 +6
==========================================
Hits 11738 11738
- Misses 18190 18191 +1 ☔ View full report in Codecov by Sentry. |
@balazsorban44, It's done |
Broken Link Checker
|
@balazsorban44 sorry, that's not the way.
|
@ggallon as the error mentions, |
packages/next-auth/src/lib/types.ts
Outdated
|
||
/** | ||
* AppRouteHandlerFnContext is the context that is passed to the handler as the | ||
* second argument. | ||
*/ | ||
export type AppRouteHandlerFnContext = { | ||
params?: Record<string, string | string[]> | ||
params?: Awaitable<Record<string, string | string[]>> |
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.
params?: Awaitable<Record<string, string | string[]>> | |
params: Awaitable<Record<string, string | string[]>> |
@balazsorban44 could you please bump the npm package version? |
☕️ Reasoning
Follow #12002, fix type error with auth() wapprer, update params type with Promise in handler.
Ref: Next.js Doc
🧢 Checklist
🎫 Affected issues
📌 Resources