-
Notifications
You must be signed in to change notification settings - Fork 229
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
chore(clerk-js): Drop deprecations #2082
Conversation
🦋 Changeset detectedLatest commit: c195500 The changes in this PR will be included in the next version bump. This PR includes changesets to release 12 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 |
@panteliselef The only deprecations still in the
How should we proceed with those? |
1e4821b
to
879bf78
Compare
@dimkl you are correct, these are marked as deprecated as removing them completely and introducing new ones would result an a PR with a lot of changes what would make the reviewal process almost impossible. I hope i will tackle this by end of this week, but also want to mention that this does not really affect external APIs, and anything that you listed as deprecated is for internal use only |
95213c4
to
85aec82
Compare
85aec82
to
c735882
Compare
packages/types/src/jwt.ts
Outdated
@@ -11,7 +11,7 @@ export interface JWTHeader { | |||
alg: string | Algorithm; | |||
typ?: string; | |||
cty?: string; | |||
crit?: Array<string | Exclude<keyof JWTHeader, 'crit'>>; | |||
crit?: Array<string | Exclude<JWTHeader, 'crit'>>; |
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.
Does this mean previously this was broken ?
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.
@panteliselef based on the RFC: https://www.rfc-editor.org/rfc/rfc7515.html#section-4.1.11
The crit
header parameter
- should NOT be an empty array
- should not include
crit
(not sure about this but it's already defined)
The above change does not fix it, so i will update it to crit: NonEmptyArray<Exclude<keyof JWTHeader, 'crit'>>;
to resolve this. I did some tests and it passes.
PS: type NonEmptyArray<T> = [T, ...T[]];
packages/clerk-js/src/ui/components/UserProfile/__tests__/ProfilePage.test.tsx
Show resolved
Hide resolved
packages/clerk-js/src/ui/components/UserButton/useMultisessionActions.tsx
Outdated
Show resolved
Hide resolved
@@ -8,8 +8,8 @@ describe('Organization', () => { | |||
name: 'test_name', | |||
public_metadata: { public: 'metadata' }, | |||
slug: 'test_slug', | |||
logo_url: 'https://url-for-logo.png', | |||
image_url: 'https://clerk.com', | |||
image_url: |
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.
Nit: Formatting
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.
This change is made by the npm run format
script based on our rules.
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.
Seems weird 🤔
c735882
to
fda0693
Compare
@LekoArts , @panteliselef i have addressed your comments. PTAL (also review & resolve the comments) |
8231284
to
0ebecdf
Compare
- `ExternalAccount.avatarUrl` - `ExternalAccountJSON.avatar_url` - `Organization.logoUrl` - `OrganizationJSON.logo_url` - `User.profileImageUrl` - `UserJSON.profile_image_url` - `OrganizationMembershipPublicUserData.profileImageUrl` - `OrganizationMembershipPublicUserDataJSON.profile_image_url`
…t` params deprecations
…rom matchMedia return
0ebecdf
to
defbbd0
Compare
defbbd0
to
c195500
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.
Did not run/test this locally but looking over the changes in GitHub this LGTM
Description
This PR contains also changes in
react
,expo
,chrome-extension
,types
,shared
,nextjs
packages due to types being changed or to code being exported or re-used by other packages.Drop deprecations. Migration steps:
publishableKey
instead offrontendApi
Clerk.handleEmailLinkVerification()
instead ofClerk.handleMagicLinkVerification()
EmailLinkError
instead ofMagicLinkError
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()
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