-
Notifications
You must be signed in to change notification settings - Fork 346
feat(nextjs): Various DX improvements #2347
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
Conversation
🦋 Changeset detectedLatest commit: 84c1a31 The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 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 |
7044169
to
3e599f7
Compare
255d94e
to
d46c618
Compare
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.
🚀 🚀 🚀 🚀 🚀 🚀 🚀
* Generic exports | ||
*/ | ||
export { verifyToken, createClerkClient } from '@clerk/backend'; | ||
export type { WebhookEvent, WebhookEventType } from '@clerk/backend'; |
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.
After this PR only the following exported types will be available from the @clerk/backend
: Organization, Session, User, WebhookEvent, WebhookEventType
We should export all those.
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.
What about the API types?
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.
Adding a TODO, I will update the types in a 2nd PR right after
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 think this change is already applied in main by #2357
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.
🤔 There may be some conflicts with backend DX improvements PRs since these cleanups are also applied.
.changeset/grumpy-drinks-turn.md
Outdated
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.
Can we reserve the https://clerk.com/docs/upgrade-guides/v5-introduction
(without being searchable) and add a TODO or BETA text as a placeholder for those that may search the CHANGELOG and try to access the link?
Drop support for NextJS v12: v12 was released on 26 Oct 2021 (~2 years ago). Security support ended on 21 Nov 2022 (~11 months ago) Drop support for NextJS <13.0.4: Many header-related bugs and breaking changes were introduced with the 12.1.0, 12.2.0, 13.0.1, 13.0.2, 13.0.3 releases. Vercel fixed all known related-bugs with version 13.0.4. In order to support every release in the range of 12 to 13.0.4 we had to resort to various workaround/compatibility layers (example https://github.com/clerk/javascript/blob/92727eec39566278263ffa118a085493f964eb94/packages/nextjs/src/server/utils.ts#L76). If we drop support for v12 and the other problematic versions, we can also remove all the extra logic from the @clerk/nextjs package Drop support for NextJS < 14.0.3 for the issues described here: #1436
chore(repo): Add changesets chore(repo): Update changesets
e7067d5
to
84c1a31
Compare
Description
Drop support for NextJS v12: v12 was released on 26 Oct 2021. Support for security updates stopped on 21 Nov 2022.
Drop support for NextJS <13.0.4: Various header-related bugs were introduced with the 12.1.0, 12.2.0, 13.0.1, 13.0.2, 13.0.3 NextJS releases which are now fixed since next@^13.0.4. We will be dropping support for these problematic versions in order to greatly reduce complexity in our codebase.
Drop support for NextJS < 14.0.3 because of the issues described here: #1436.
Deprecate
authMiddleware
in favor ofclerkMiddleware
. For more information, see https://clerk.com/docs/upgrade-guides/v5-introductionMove the server-side APIs from
@clerk/nextjs
to the@clerk/nextjs/server
module:WebhookEventType
,WebhookEvent
,verifyToken
,redirectToSignIn
,auth
,buildClerkProps
,clerkClient
,currentUser
,getAuth
,redirectToSignUp
andauthMiddleware
. For more information, see https://clerk.com/docs/upgrade-guides/v5-introductionDrop unused AuthStatus search param constant
SDK-787
Checklist
npm test
runs as expected.npm run build
runs as expected.Type of change
Packages affected
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/clerk-expo
@clerk/fastify
gatsby-plugin-clerk
@clerk/localizations
@clerk/nextjs
@clerk/clerk-react
@clerk/remix
@clerk/clerk-sdk-node
@clerk/shared
@clerk/themes
@clerk/types
build/tooling/chore