- 
                Notifications
    You must be signed in to change notification settings 
- Fork 403
chore(clerk-js): Drop deprecations #2082
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: 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
          
        
      | 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
        
      | 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,nextjspackages due to types being changed or to code being exported or re-used by other packages.Drop deprecations. Migration steps:
publishableKeyinstead offrontendApiClerk.handleEmailLinkVerification()instead ofClerk.handleMagicLinkVerification()EmailLinkErrorinstead ofMagicLinkErrorisEmailLinkErrorinstead ofisMagicLinkErrorEmailLinkErrorCodeinstead ofMagicLinkErrorCodeuseEmailLinkinstead ofuseMagicLinkorgsjwt claim from session tokenExternalAccount.imageUrlinstead ofExternalAccount.avatarUrlOrganization.imageUrlinstead ofOrganization.logoUrlUser.imageUrlinstead ofUser.profileImageUrlOrganizationMembershipPublicUserData.imageUrlinstead ofOrganizationMembershipPublicUserData.profileImageUrluseOrganizationListinstead ofuseOrganizationsuserProfilePropsinstead ofuserProfileinAppearanceClerk.setActive()instead ofClerk.setSession()passwordparam inUser.update()afterSelectOrganizationUrlinstead ofafterSwitchOrganizationUrlinOrganizationSwitcherClerk.experimental_canUseCaptcha/Clerk.Clerk.experimental_captchaSiteKey/Clerk.experimental_captchaURL(were meant for internal use)User.getOrganizationMemberships()instead ofClerk.getOrganizationMemberships()lastOrganizationInvitation/lastOrganizationMemberfrom Clerk emitted eventsClerk.__unstable__invitationUpdate/Clerk.__unstable__membershipUpdateOrganization.create()Organization.getInvitations()instead ofOrganization.getPendingInvitations()pageSizeinstead oflimitinOrganizationMembership.retrieve()initialPageinstead ofoffsetinOrganizationMembership.retrieve()lastOrganizationInvitation/lastOrganizationMemberfrom ClerkProviderinvitationsinstead ofinvitationListinuseOrganizationmembershipsinstead ofmembershipListinuseOrganizationredirectUrlinstead ofredirect_urlinUser.createExternalAccount()signatureinstead ofgeneratedSignatureinSignup.attemptWeb3WalletVerification()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