chore(nextjs): Add deprecation warning for app-beta subpath export - #1829
Conversation
🦋 Changeset detectedLatest commit: 78eb66f The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
7fb289e to
ebfd84a
Compare
63f77bd to
25e6acd
Compare
ebfd84a to
77ff3da
Compare
9acaa62 to
319d166
Compare
77ff3da to
f521c21
Compare
|
@dimkl What were the issues you ran into with adding the deprecation warning to |
|
@brkalow , @LekoArts adding a deprecation in the
|
We could not add a single deprecation warning in the app-beta/index.ts because it did not work.
7beee2a to
78eb66f
Compare
|
Ok, makes sense 👍 I'd need to dive deeper into how you could run a side-effect when a module is imported. With a quick search I couldn't find previous art on this. |
|
This PR has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |



Description
The implementation in
app-betawas an attempt to support the NextJSapp-routerearly on. Since theapp-routerrelease is stable we will deprecate the@clerk/nextjs/app-betasubpath export and suggest using the stable@clerk/nextjsexports instead.In this PR the following hacks were applied to add JSDocs and console warnings deprecations:
app-beta/index.tsbecause it did not work sodeprecatedwas added in each file@clerk/clerk-reactwith module to show deprecation warning (see: packages/nextjs/src/app-beta/client/clerk-react.ts)@clerk/clerk-reactto add JSDoc deprecations only for the exports from theapp-betaSince the whole folder
app-betawill be removed in the next major version, there is no need to worry about those hacks.Checklist
npm testruns as expected.npm run buildruns as expected.Type of change
Packages affected
@clerk/clerk-js@clerk/clerk-react@clerk/nextjs@clerk/remix@clerk/types@clerk/themes@clerk/localizations@clerk/clerk-expo@clerk/backend@clerk/clerk-sdk-node@clerk/shared@clerk/fastify@clerk/chrome-extensiongatsby-plugin-clerkbuild/tooling/chore