-
-
Notifications
You must be signed in to change notification settings - Fork 367
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
Update clerk (major) #3704
base: main
Are you sure you want to change the base?
Update clerk (major) #3704
Conversation
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
844143e
to
b8068a6
Compare
b8068a6
to
8efd0a4
Compare
527f76f
to
e908dd5
Compare
e908dd5
to
d1ecbfb
Compare
d1ecbfb
to
da4eca3
Compare
da4eca3
to
8c81a75
Compare
8c81a75
to
a81363b
Compare
a81363b
to
8a1b76a
Compare
8a1b76a
to
6725f0f
Compare
6725f0f
to
64993c9
Compare
5969ed7
to
4cc7d15
Compare
4cc7d15
to
93843e5
Compare
93843e5
to
8944b8e
Compare
8944b8e
to
1083082
Compare
1083082
to
f90e53b
Compare
f90e53b
to
3b8d9a8
Compare
3b8d9a8
to
81b9875
Compare
81b9875
to
29f989c
Compare
29f989c
to
9f62433
Compare
9f62433
to
911ab4b
Compare
911ab4b
to
7238cb9
Compare
7238cb9
to
1d5edd1
Compare
1d5edd1
to
6a8aeee
Compare
6a8aeee
to
1f9d709
Compare
This PR contains the following updates:
4.32.2
->5.2.4
4.31.3
->5.1.5
3.65.2
->4.6.0
Release Notes
clerk/javascript (@clerk/clerk-react)
v5.2.4
Compare Source
Patch Changes
4ec3f63e2
]:v5.2.3
Compare Source
Patch Changes
Update
SignUpButton
andSignInButton
to respectforceRedirect
andfallbackRedirect
props. Previously, these were getting ignored and successful completions of the flows would fallback to the default redirect URL. (#3508) by @BRKalowUpdated dependencies [
86a27f693
,02bed2e00
,73e5d61e2
,b8e46328d
]:v5.2.2
Compare Source
Patch Changes
4beb00672
]:v5.2.1
Compare Source
Patch Changes
With the next major release, NextJS@15 will depend on
react
andreact-dom
v19, which is still in beta. We are updating our peer dependencies accordingly in order to acceptreact
andreact-dom
@19.0.0-beta
(#3428) by @nikosdouvlisUpdated dependencies [
ff31f7255
,0e48fc210
]:v5.2.0
Compare Source
Minor Changes
React component
<GoogleOneTap/>
Customize the UX of the prompt
Use the component from with Vanilla JS
Clerk.openGoogleOneTap(props: GoogleOneTapProps)
Clerk.closeGoogleOneTap()
Low level APIs for custom flows
await Clerk.authenticateWithGoogleOneTap({ token: 'xxxx'})
await Clerk.handleGoogleOneTapCallback()
We recommend using this two methods together in order and let Clerk to perform the correct redirections.
In case you want to handle the redirection and session management yourself you can do so like this
Patch Changes
d6a9b3f5d
,456b06849
]:v5.1.0
Compare Source
Minor Changes
__experimental_openGoogleOneTap
. (#3379) by @panteliselefPatch Changes
3d790d5ea
]:v5.0.7
Compare Source
Patch Changes
eae0a32d5
]:v5.0.6
Compare Source
Patch Changes
ec84d51e7
]:v5.0.5
Compare Source
Patch Changes
Respect the
signInForceRedirectUrl
,signInFallbackRedirectUrl
,signUpForceRedirectUrl
andsignUpFallbackRedirectUrl
props passed toSignInButton
,SignUpButton
and the low-levelwindow.Clerk.buildSignInUrl
&window.Clerk.buildSignUpUrl
methods. These props allow you to control the redirect behavior of theSignIn
andSignUp
components. For more information, refer to the Custom Redirects guide. (#3361) by @nikosdouvlisUpdated dependencies [
94197710a
,b27ca8366
]:v5.0.4
Compare Source
Patch Changes
Rename local
eslint-config-custom
package to@clerk/eslint-config-custom
to avoid conflicts with previously published package. Removeseslint-config-custom
from@clerk/clerk-react
's dependencies, as it should only be a development dependency. (#3307) by @BRKalowThe following are all internal changes and not relevant to any end-user: (#3341) by @LauraBeatris
Add telemetry events for
useSignIn
,useSignUp
,useOrganizations
anduseOrganizationList
Updated dependencies [
1662aaae9
,f70c885f7
,f5804a225
]:v5.0.3
Compare Source
Patch Changes
v5.0.2
Compare Source
Patch Changes
Remove deprecated
__clerk_frontend_api
fromWindow
interface (#3288) by @LauraBeatrisUpdated dependencies [
a78bc447c
,c7d626292
,19cd42434
]:v5.0.1
Compare Source
Patch Changes
956d8792f
]:v5.0.0
Compare Source
Major Changes
2a67f72
: Replace thesignOutCallback
prop on the<SignOutButton />
withredirectUrl
. This aligns the API surface with other UI components provided by@clerk/clerk-react
.If you previously used the
signOutCallback
prop to navigate to another page, you can migrate as shown below.Before:
After:
c2a0905
: Change the minimal Node.js version required by Clerk to18.17.0
.deac67c
: Drop default exports from all packages. Migration guide:import { Clerk } from '@​clerk/backend';
import { clerkInstance } from '@​clerk/clerk-sdk-node';
import { Clerk } from '@​clerk/clerk-sdk-node';
import { Clerk } from '@​clerk/clerk-js';
import { Clerk } from '@​clerk/clerk-js/headless';
import { IsomorphicClerk } from '@​clerk/clerk-react'
83e9d08
: Drop deprecations. Migration steps:EmailLinkError
instead ofMagicLinkError
isEmailLinkError
instead ofisMagicLinkError
EmailLinkErrorCode
instead ofMagicLinkErrorCode
useEmailLink
instead ofuseMagicLink
buildRequestUrl
from@clerk/backend
instead ofgetRequestUrl
from@clerk/shared
OrganizationProvider
instead ofOrganizationContext
userMemberships
instead oforganizationList
fromuseOrganizationList
7f833da
: Drop deprecations. Migration steps:publishableKey
instead offrontendApi
Clerk.handleEmailLinkVerification()
instead ofClerk.handleMagicLinkVerification()
isEmailLinkError
instead ofisMagicLinkError
EmailLinkErrorCode
instead ofMagicLinkErrorCode
useEmailLink
instead ofuseMagicLink
orgs
jwt claim from session tokenExternalAccount.imageUrl
instead ofExternalAccount.avatarUrl
Organization.imageUrl
instead ofOrganization.logoUrl
User.imageUrl
instead ofUser.profileImageUrl
OrganizationMembershipPublicUserData.imageUrl
instead ofOrganizationMembershipPublicUserData.profileImageUrl
useOrganizationList
instead ofuseOrganizations
userProfileProps
instead ofuserProfile
inAppearance
Clerk.setActive()
instead ofClerk.setSession()
password
param inUser.update()
afterSelectOrganizationUrl
instead ofafterSwitchOrganizationUrl
inOrganizationSwitcher
Clerk.experimental_canUseCaptcha
/Clerk.Clerk.experimental_captchaSiteKey
/Clerk.experimental_captchaURL
(were meant for internal use)User.getOrganizationMemberships()
instead ofClerk.getOrganizationMemberships()
lastOrganizationInvitation
/lastOrganizationMember
from Clerk emitted eventsClerk.__unstable__invitationUpdate
/Clerk.__unstable__membershipUpdate
Organization.create()
Organization.getInvitations()
instead ofOrganization.getPendingInvitations()
pageSize
instead oflimit
inOrganizationMembership.retrieve()
initialPage
instead ofoffset
inOrganizationMembership.retrieve()
lastOrganizationInvitation
/lastOrganizationMember
from ClerkProviderinvitations
instead ofinvitationList
inuseOrganization
memberships
instead ofmembershipList
inuseOrganization
redirectUrl
instead ofredirect_url
inUser.createExternalAccount()
signature
instead ofgeneratedSignature
inSignup.attemptWeb3WalletVerification()
cfea3d9
: Path-based routing is now the default routing strategy if thepath
prop is filled. Additionally, if thepath
androuting
props are not filled, an error will be thrown.7bffc47
: DropClerk.isReady(). Use
Clerk.loadedinstead.
2a22aad
: Drop deprecations. Migration steps:orgs
jwt claim from session tokenauth
param ofwithServerAuth()
callback toAuthObject
fromServerSideAuth
ingatsby-clerk-plugin
auth.sessionClaims
instead ofauth.claims
AuthObject
properties fromauth
publishableKey
instead offrontendApi
ClerkProviderOptionsWrapper
type instead ofIsomorphicClerkOptions
8aea39c
: - Introduce@clerk/clerk-react/errors
and@clerk/clerk-react/internal
subpath exports to expose some internal utilities. Eg5f58a22
: Remove hashing and third-party cookie functionality related to development instance session syncing in favor of URL-based session syncing with query parameters.5f58a22
: -buildUrlWithAuth
no longer accepts anoptions
argument.52ff8fe
: Upgrade React version to >=18 and add react-dom as peer dependencyto fix issues with vite & rollup building.
ab4eb56
: DropredirectToHome
redirect method in favour ofredirectToAfterSignUp
orredirectToAfterSignIn
.When the
<SignIn/>
and<SignUp/>
components are rendered while a user is already logged in, they will now redirect to the configuredafterSignIn
andafterSignUp
URLs, respectively. Previously, the redirect URL was set to the home URL configured in the dashboard.97407d8
: Dropping support for Node 14 and 16 as they both reached EOL status. The minimal Node.js version required by Clerk is18.18.0
now.f5fb63c
: ConsolidateafterSignOutOneUrl
&afterSignOutAllUrl
toafterSignOutUrl
and drop usage of Dashboard settings in ClerkJS components. The Dashboard settings should only apply to the Account Portal application.4771709
: Drop deprecations. Migration steps:formFieldLabel__emailAddress_phoneNumber
from localization keysformFieldLabel__phoneNumber_username
from localization keysformFieldLabel__emailAddress_phoneNumber_username
from localization keysformFieldInputPlaceholder__emailAddress_phoneNumber
from localization keysformFieldInputPlaceholder__phoneNumber_username
from localization keysformFieldInputPlaceholder__emailAddress_phoneNumber_username
from localization keystitle__connectionFailed
instead oftitle__conectionFailed
from localization keysactionLabel__connectionFailed
instead ofactionLabel__conectionFailed
from localization keysheaderTitle__members
instead ofheaderTitle__active
from localization keysheaderTitle__invitations
instead ofheaderTitle__invited
from localization keyscreateOrganization.subtitle
from localization keysdeDE
instead ofdeDe
localization from@clerk/localizations
3c42090
: Drop deprecations. Migration steps:setActive
instead ofsetSession
fromuseSessionList | useSignUp | useSignIn
hookspublishableKey
instead offrontendApi
handleEmailLinkVerification
instead ofhandleMagicLinkVerification
fromIsomorphicClerk
isEmailLinkError
instead ofisMagicLinkError
EmailLinkErrorCode
instead ofMagicLinkErrorCode
useEmailLink
instead ofuseMagicLink
844847e
: Align return types for redirectTo* methods in ClerkJS [SDK-1037]Breaking Changes:
redirectToUserProfile
now returnsPromise<unknown>
instead ofvoid
redirectToOrganizationProfile
now returnsPromise<unknown>
instead ofvoid
redirectToCreateOrganization
now returnsPromise<unknown>
instead ofvoid
redirectToHome
now returnsPromise<unknown>
instead ofvoid
Minor Changes
7f6a64f
: - By default, all the components with routing will have therouting
prop assigned as'path'
by default when thepath
prop is filled.<UserButton />
component will set the default value of theuserProfileMode
prop to'navigation'
if theuserProfileUrl
prop is provided.<OrganizationSwitcher />
component will have theorganizationProfileMode
andcreateOrganizationMode
props assigned with'navigation'
by default if theorganizationProfileUrl
andcreateOrganizationUrl
props are filled accordingly.ff08fe2
: Introduce experimental support for Google One Tap<__experimental_GoogleOneTap/>
clerk.__experimental_mountGoogleOneTap(node,props)
c9e0f68
: Fix@clerk/clerk-react
bundle output to resolve issues with vite / rollup ESM module imports.We have also used the
bundle
output to export a single index.ts and dropped the unnecessarypublished files / folders (eg
__tests__
).fe2607b
: Remove MembershipRole. The typeMembershipRole
would always include the old role keysadmin
,basic_member
,guest_member
.If developers still depend on them after the introduction of custom roles, the can provide them as their custom types for authorization.
c7e6d00
: Experimental support for<Gate/>
with role checks.4bb5705
: Breaking Changes:isLegacyFrontendApiKey
from@clerk/shared
@clerk/clerk-js
Portal
isProductionFromSecretKey
instead ofisProductionFromApiKey
isDevelopmentFromSecretKey
instead ofisDevelopmentFromApiKey
Changes:
HeadlessBrowserClerkConstrutor
/HeadlessBrowserClerkConstructor
(typo)isomorphicAtob
/isomorhpicBtoa
to replacebase-64
in@clerk/expo
@clerk/backend
clerk clientnode-fetch
dependency from@clerk/backend
@clerk/backend
2e4a430
: Update@clerk/clerk-js
and@clerk/clerk-react
to support the following examples:f98e480
: Speed up loading of clerk-js by using a<script/>
tag when html is generated.This is supported during SSR, SSG in
46040a2
: Introduce Protect for authorization.Changes in public APIs:
experimental
tags and prefixessome
from thehas
utility and Protect. Protect now accepts acondition
prop where a function is expected with thehas
being exposed as the param.<SignedIn>
, if no authorization props are passed.has
will throw an error if neitherpermission
orrole
is passed.auth().protect()
for Nextjs App Router. Allow per page protection in app router. This utility will automatically throw a 404 error if user is not authorized or authenticated.not-found
component set by the developer18c0d01
: Pass environment intosdkMetadata
in order to detect if production clerk-js is used by other sdks in dev mode. When it is log dev warning from clerk-js.d6a7ea6
: Update the TypeScript types of<ClerkProvider />
. If you use therouterPush
prop you're now required to also provide therouterReplace
prop (or other way around). You can also not provide them at all since both props are optional.db2d829
: Apply the following changes to components with routing props:routing="path"
andpath
prop is required to be set via env or contextrouting="hash"
orrouting="virtual"
is set the implicit (via env or context)path
option is ignoredrouting="hash"
orrouting="virtual"
thenpath
prop is not allowed to be setExamples of components with routing props:
<CreateOrganization />
<OrganizationProfile />
<SignIn />
<SignUp />
<UserProfile />
Patch Changes
6ac9e71
: Properly fire onLoad event when clerk-js is already loaded.2de442b
: Rename beta-v5 to betaee57f21
: ExportEmailLinkErrorCode
from/errors
module2e77cd7
: Set correct information on required Node.js and React versions in READMEae3a668
: Ignore.test.ts
files for the build output. Should result in smaller bundle size.6e54b1b
: Sync IsomorphicClerk with the clerk singleton and the LoadedClerk interface. IsomorphicClerk now extends from LoadedClerk.8cc45d2
: Allow dynamic values components props, even if these values change after the components are rendered. For example, aSignIn
component with aredirectUrl
prop passed in will always respect the latest value ofredirectUrl
.797e327
: Replace internal logic of determining package tag & major version with semver in order to have a more robust solutionc86f73b
: Introducing stricter types for custom pages for UserProfile and OrganizationProfile.1affbb2
: Replace semver with custom regex in versionSelector75ea300
: AdduseAssertWrappedByClerkProvider
to internal code. If you use hooks likeuseAuth
outside of the<ClerkProvider />
context an error will be thrown. For example:e9841dd
: Fixes error thrown for missing path & routing props when path was passed from context.This change affects components
<SignIn />
,<SignUp />
from@clerk/nextjs
and@clerk/remix
.59f9a72
: Fixes error when path is passed from context and a routing strategy other thanpath
is passed as a prop.This change affects components
<SignIn />
,<SignUp />
from@clerk/nextjs
and@clerk/remix
.e0e79b4
: Use the errorThrower shared utility when throwing errorsfb794ce
: Support older iOS 13.3 and 13.4 mobile devices40ac4b6
: Introduces telemetry collection from Clerk's SDKs. Collected telemetry will be used to gain insights into product usage and help drive roadmap priority. For more information, see https://clerk.com/docs/telemetry.Updated dependencies [
743c4d2
]Updated dependencies [
4b8bedc
]Updated dependencies [
1db1f40
]Updated dependencies [
c2a0905
]Updated dependencies [
0d0b1d8
]Updated dependencies [
1834a3e
]Updated dependencies [
896cb61
]Updated dependencies [
64d3763
]Updated dependencies [
8350109
]Updated dependencies [
1dc28ab
]Updated dependencies [
83e9d08
]Updated dependencies [
d37d44a
]Updated dependencies [
fe356ee
]Updated dependencies [
791c498
]Updated dependencies [
ea49336
]Updated dependencies [
7f6a64f
]Updated dependencies [
afec179
]Updated dependencies [
0699fa4
]Updated dependencies [
a68eb30
]Updated dependencies [
2de442b
]Updated dependencies [
0293f29
]Updated dependencies [
5f58a22
]Updated dependencies [
9180c8b
]Updated dependencies [
db18787
]Updated dependencies [
7f833da
]Updated dependencies [
ef2325d
]Updated dependencies [
fc3ffd8
]Updated dependencies [
840636a
]Updated dependencies [
bab2e7e
]Updated dependencies [
71663c5
]Updated dependencies [
492b8a7
]Updated dependencies [
2352149
]Updated dependencies [
e5c989a
]Updated dependencies [
ff08fe2
]Updated dependencies [
7ecd6f6
]Updated dependencies [
12f3c5c
]Updated dependencies [
244de5e
]Updated dependencies [
c776f86
]Updated dependencies [
d9f265f
]Updated dependencies [
7bffc47
]Updated dependencies [
9737ef5
]Updated dependencies [
fafa76f
]Updated dependencies [
1f650f3
]Updated dependencies [
97407d8
]Updated dependencies [
2a22aad
]Updated dependencies [
69ce3e1
]Updated dependencies [
78fc5ee
]Updated dependencies [
a9fe242
]Updated dependencies [
5f58a22
]Updated dependencies [
6a33709
]Updated dependencies [
52ff8fe
]Updated dependencies [
f77e8cd
]Updated dependencies [
8b466a9
]Updated dependencies [
fe2607b
]Updated dependencies [
c7e6d00
]Updated dependencies [
8cc45d2
]Updated dependencies [
6632432
]Updated dependencies [
c6a5e0f
]Updated dependencies [
4edb776
]Updated dependencies [
ab4eb56
]Updated dependencies [
a9fe242
]Updated dependencies [
5c239d9
]Updated dependencies [
97407d8
]Updated dependencies [
12962bc
]Updated dependencies [
4bb5705
]Updated dependencies [
d4ff346
]Updated dependencies [
7644b74
]Updated dependencies [
2ec9f6b
]Updated dependencies [
2e4a430
]Updated dependencies [
5aab9f0
]Updated dependencies [
46040a2
]Updated dependencies [
f00fd2d
]Updated dependencies [
8daf845
]Updated dependencies [
75ea300
]Updated dependencies [
9a1fe37
]Updated dependencies [
7f751c4
]Updated dependencies [
f5d55bb
]Updated dependencies [
18c0d01
]Updated dependencies [
0d1052a
]Updated dependencies [
d30ea1f
]Updated dependencies [
7886ba8
]Updated dependencies [
1fd2eff
]Updated dependencies [
9a1fe37
]Updated dependencies [
5471c7e
]Updated dependencies [
f540e98
]Updated dependencies [
4771709
]Updated dependencies [
38d8b3e
]Updated dependencies [
be99136
]Updated dependencies [
8350f73
]Updated dependencies [
d6a7ea6
]Updated dependencies [
e0e79b4
]Updated dependencies [
41ae1d2
]Updated dependencies [
fb794ce
]Updated dependencies [
48ca40a
]Updated dependencies [
94519aa
]Updated dependencies [
ebf9be7
]Updated dependencies [
008ac42
]Updated dependencies [
40ac4b6
]Updated dependencies [
6f755ad
]Updated dependencies [
429d030
]Updated dependencies [
844847e
]Updated dependencies [
6eab660
]clerk/javascript (@clerk/nextjs)
v5.1.5
Compare Source
Patch Changes
Enhance page detection by utilizing the patched fetch from nextjs. (#3529) by @panteliselef
Replace router.refresh() with cookies().delete() (#3518) by @nikosdouvlis
Updated dependencies [
4ec3f63e2
]:v5.1.4
Compare Source
Patch Changes
Update dependency path-to-regexp to v6.2.2 (#3490) by @renovate
Set
@clerk/types
as a dependency for packages that had it as a dev dependency. (#3450) by @desiprisgUpdated the check ran against the error caught by
buildRequestLike()
to re-throw Static Bailout errors thrown by React in the context of PPR (Partial Pre-Rendering), as these errors shouldn't be caught. This change was required as we have been checking the error message itself, but stopped working after the message was changed in a Next.js update a few months ago. (#3499) by @ceIiaBug fix: Correctly update history state when on internal navigations. (#3480) by @panteliselef
Updated dependencies [
86a27f693
,35a0015f5
,02bed2e00
,73e5d61e2
,b8e46328d
]:v5.1.3
Compare Source
Patch Changes
v5.1.2
Compare Source
Patch Changes
v5.1.1
Compare Source
Patch Changes
With the next major release, NextJS@15 will depend on
react
andreact-dom
v19, which is still in beta. We are updating our peer dependencies accordingly in order to acceptreact
andreact-dom
@19.0.0-beta
(#3428) by @nikosdouvlisUtilize an awaitable replace function internally to avoid race conditions when using
router.replace
. (#3416) by @desiprisgUpdated dependencies [
ff31f7255
,0e48fc210
]:v5.1.0
Compare Source
Minor Changes
React component
<GoogleOneTap/>
Customize the UX of the prompt
Use the component from with Vanilla JS
Clerk.openGoogleOneTap(props: GoogleOneTapProps)
Clerk.closeGoogleOneTap()
Low level APIs for custom flows
await Clerk.authenticateWithGoogleOneTap({ token: 'xxxx'})
await Clerk.handleGoogleOneTapCallback()
We recommend using this two methods together in order and let Clerk to perform the correct redirections.
In case you want to handle the redirection and session management yourself you can do so like this
Patch Changes
d6a9b3f5d
,456b06849
,6888594cc
]:v5.0.12
Compare Source
Patch Changes
3d790d5ea
]:v5.0.11
Compare Source
Patch Changes
v5.0.10
Compare Source
Patch Changes
4d3dc00fb
,ec84d51e7
]:v5.0.9
Compare Source
Patch Changes
b27ca8366
,bcbb2c9ef
]:v5.0.8
Compare Source
Patch Changes
b92402258
]:v5.0.7
Compare Source
Patch Changes
Fix a bug where response headers from
@clerk/backend
would not be applied to the response when a redirect was triggered from a custom middleware handler. (#3344) by @BRKalowPass
devBrowserToken
tocreateRedirect()
to ensure methods fromauth()
that trigger redirects correctly pass the dev browser token for URL-based session syncing. (#3334) by @BRKalowUpdated dependencies [
39265d909
,4f4375e88
,1662aaae9
,f70c885f7
,4ae79af36
,f5804a225
]:v5.0.6
Compare Source
Patch Changes
Notify users when catch-all route and all of its children routes are being protected by the middleware (#3311) by @nikosdouvlis
Update docs links to point to the correct pages (#3312) by @EmmanouelaPothitou
v5.0.5
Compare Source
Patch Changes
e93b5777b
]:[
v5.0.4
](https://togithub.com/clerk/javascript/blob/HEAD/packages/nextjs/CHANGELOG.mConfiguration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
This PR has been generated by Mend Renovate. View repository job log here.