feat(nextjs): Various DX improvements#2347
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
| * Generic exports | ||
| */ | ||
| export { verifyToken, createClerkClient } from '@clerk/backend'; | ||
| export type { WebhookEvent, WebhookEventType } from '@clerk/backend'; |
There was a problem hiding this comment.
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.
What about the API types?
There was a problem hiding this comment.
Adding a TODO, I will update the types in a 2nd PR right after
There was a problem hiding this comment.
🤔 I think this change is already applied in main by #2357
There was a problem hiding this comment.
🤔 There may be some conflicts with backend DX improvements PRs since these cleanups are also applied.
There was a problem hiding this comment.
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
authMiddlewarein favor ofclerkMiddleware. For more information, see https://clerk.com/docs/upgrade-guides/v5-introductionMove the server-side APIs from
@clerk/nextjsto the@clerk/nextjs/servermodule:WebhookEventType,WebhookEvent,verifyToken,redirectToSignIn,auth,buildClerkProps,clerkClient,currentUser,getAuth,redirectToSignUpandauthMiddleware. For more information, see https://clerk.com/docs/upgrade-guides/v5-introductionDrop unused AuthStatus search param constant
SDK-787
Checklist
npm testruns as expected.npm run buildruns as expected.Type of change
Packages affected
@clerk/backend@clerk/chrome-extension@clerk/clerk-js@clerk/clerk-expo@clerk/fastifygatsby-plugin-clerk@clerk/localizations@clerk/nextjs@clerk/clerk-react@clerk/remix@clerk/clerk-sdk-node@clerk/shared@clerk/themes@clerk/typesbuild/tooling/chore