Skip to content
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

Version Packages (alpha-v5) #2065

Merged
merged 1 commit into from
Nov 17, 2023
Merged

Version Packages (alpha-v5) #2065

merged 1 commit into from
Nov 17, 2023

Conversation

clerk-cookie
Copy link
Collaborator

@clerk-cookie clerk-cookie commented Nov 7, 2023

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

⚠️⚠️⚠️⚠️⚠️⚠️

main is currently in pre mode so this branch has prereleases rather than normal releases. If you want to exit prereleases, run changeset pre exit on main.

⚠️⚠️⚠️⚠️⚠️⚠️

Releases

@clerk/backend@1.0.0-alpha-v5.1

Major Changes

  • Drop default exports from all packages. Migration guide: (#2150) by @dimkl

    • use import { Clerk } from '@clerk/backend';
    • use import { clerkInstance } from '@clerk/clerk-sdk-node';
    • use import { Clerk } from '@clerk/clerk-sdk-node';
    • use import { Clerk } from '@clerk/clerk-js';
    • use import { Clerk } from '@clerk/clerk-js/headless';
    • use import { IsomorphicClerk } from '@clerk/clerk-react'
  • Change the response payload of Backend API requests to return { data, errors } instead of return the data and throwing on error response. (#2126) by @dimkl

    Code example to keep the same behavior:

    import { users } from '@clerk/backend';
    import { ClerkAPIResponseError } from '@clerk/shared/error';
    
    const { data, errors, clerkTraceId, status, statusText } = await users.getUser('user_deadbeef');
    if (errors) {
      throw new ClerkAPIResponseError(statusText, { data: errors, status, clerkTraceId });
    }
  • Enforce passing request param to authenticateRequest method of @clerk/backend (#2122) by @dimkl

    instead of passing each header or cookie related option that is used internally to
    determine the request state.

    Migration guide:

    • use request param in clerkClient.authenticateRequest() instead of:
      • origin
      • host
      • forwardedHost
      • forwardedProto
      • referrer
      • userAgent
      • cookieToken
      • clientUat
      • headerToken
      • searchParams

    Example

    //
    // current
    //
    import { clerkClient } from '@clerk/backend'
    
    const requestState = await clerkClient.authenticateRequest({
        secretKey: 'sk_....'
        publishableKey: 'pk_....'
        origin: req.headers.get('origin'),
        host: req.headers.get('host'),
        forwardedHost: req.headers.get('x-forwarded-host'),
        forwardedProto: req.headers.get('x-forwarded-proto'),
        referrer: req.headers.get('referer'),
        userAgent: req.headers.get('user-agent'),
        clientUat: req.cookies.get('__client_uat'),
        cookieToken: req.cookies.get('__session'),
        headerToken: req.headers.get('authorization'),
        searchParams: req.searchParams
    });
    
    //
    // new
    //
    import { clerkClient,  } from '@clerk/backend'
    
    // use req (if it's a fetch#Request instance) or use `createIsomorphicRequest` from `@clerk/backend`
    // to re-construct fetch#Request instance
    const requestState = await clerkClient.authenticateRequest({
        secretKey: 'sk_....'
        publishableKey: 'pk_....'
        request: req
    });
  • Drop deprecated properties. Migration steps: (#1899) by @dimkl

    • use createClerkClient instead of __unstable_options
    • use publishableKey instead of frontendApi
    • use clockSkewInMs instead of clockSkewInSeconds
    • use apiKey instead of secretKey
    • drop httpOptions
    • use *.image instead of
      • ExternalAccount.picture
      • ExternalAccountJSON.avatar_url
      • Organization.logoUrl
      • OrganizationJSON.logo_url
      • User.profileImageUrl
      • UserJSON.profile_image_url
      • OrganizationMembershipPublicUserData.profileImageUrl
      • OrganizationMembershipPublicUserDataJSON.profile_image_url
    • drop pkgVersion
    • use Organization.getOrganizationInvitationList with status instead of getPendingOrganizationInvitationList
    • drop orgs claim (if required, can be manually added by using user.organizations in a jwt template)
    • use localInterstitial instead of remotePublicInterstitial / remotePublicInterstitialUrl

    Internal changes:

    • replaced error enum (and it's) SetClerkSecretKeyOrAPIKey with SetClerkSecretKey

Patch Changes

@clerk/chrome-extension@1.0.0-alpha-v5.1

Major Changes

  • Drop default exports from all packages. Migration guide: (#2150) by @dimkl

    • use import { Clerk } from '@clerk/backend';
    • use import { clerkInstance } from '@clerk/clerk-sdk-node';
    • use import { Clerk } from '@clerk/clerk-sdk-node';
    • use import { Clerk } from '@clerk/clerk-js';
    • use import { Clerk } from '@clerk/clerk-js/headless';
    • use import { IsomorphicClerk } from '@clerk/clerk-react'
  • Drop deprecations. Migration steps: (#2082) by @dimkl

    • use publishableKey instead of frontendApi
    • use Clerk.handleEmailLinkVerification() instead of Clerk.handleMagicLinkVerification()
    • use isEmailLinkError instead of isMagicLinkError
    • use EmailLinkErrorCode instead of MagicLinkErrorCode
    • use useEmailLink instead of useMagicLink
    • drop orgs jwt claim from session token
    • use ExternalAccount.imageUrl instead of ExternalAccount.avatarUrl
    • use Organization.imageUrl instead of Organization.logoUrl
    • use User.imageUrl instead of User.profileImageUrl
    • use OrganizationMembershipPublicUserData.imageUrl instead of OrganizationMembershipPublicUserData.profileImageUrl
    • use useOrganizationList instead of useOrganizations
    • use userProfileProps instead of userProfile in Appearance
    • use Clerk.setActive() instead of Clerk.setSession()
    • drop password param in User.update()
    • use afterSelectOrganizationUrl instead of afterSwitchOrganizationUrl in OrganizationSwitcher
    • drop Clerk.experimental_canUseCaptcha / Clerk.Clerk.experimental_captchaSiteKey / Clerk.experimental_captchaURL (were meant for internal use)
    • use User.getOrganizationMemberships() instead of Clerk.getOrganizationMemberships()
    • drop lastOrganizationInvitation / lastOrganizationMember from Clerk emitted events
    • drop Clerk.__unstable__invitationUpdate / Clerk.__unstable__membershipUpdate
    • drop support for string param in Organization.create()
    • use Organization.getInvitations() instead of Organization.getPendingInvitations()
    • use pageSize instead of limit in OrganizationMembership.retrieve()
    • use initialPage instead of offset in OrganizationMembership.retrieve()
    • drop lastOrganizationInvitation / lastOrganizationMember from ClerkProvider
    • use invitations instead of invitationList in useOrganization
    • use memberships instead of membershipList in useOrganization
    • use redirectUrl instead of redirect_url in User.createExternalAccount()
    • use signature instead of generatedSignature in Signup.attemptWeb3WalletVerification()
  • Drop deprecations. Migration steps: (#1993) by @dimkl

    • use setActive instead of setSession from useSessionList | useSignUp | useSignIn hooks
    • use publishableKey instead of frontendApi
    • use handleEmailLinkVerification instead of handleMagicLinkVerification from IsomorphicClerk
    • use isEmailLinkError instead of isMagicLinkError
    • use EmailLinkErrorCode instead of MagicLinkErrorCode
    • use useEmailLink instead of useMagicLink

Patch Changes

@clerk/clerk-js@5.0.0-alpha-v5.1

Major Changes

  • Drop default exports from all packages. Migration guide: (#2150) by @dimkl

    • use import { Clerk } from '@clerk/backend';
    • use import { clerkInstance } from '@clerk/clerk-sdk-node';
    • use import { Clerk } from '@clerk/clerk-sdk-node';
    • use import { Clerk } from '@clerk/clerk-js';
    • use import { Clerk } from '@clerk/clerk-js/headless';
    • use import { IsomorphicClerk } from '@clerk/clerk-react'
  • Drop deprecations. Migration steps: (#2082) by @dimkl

    • use publishableKey instead of frontendApi
    • use Clerk.handleEmailLinkVerification() instead of Clerk.handleMagicLinkVerification()
    • use isEmailLinkError instead of isMagicLinkError
    • use EmailLinkErrorCode instead of MagicLinkErrorCode
    • use useEmailLink instead of useMagicLink
    • drop orgs jwt claim from session token
    • use ExternalAccount.imageUrl instead of ExternalAccount.avatarUrl
    • use Organization.imageUrl instead of Organization.logoUrl
    • use User.imageUrl instead of User.profileImageUrl
    • use OrganizationMembershipPublicUserData.imageUrl instead of OrganizationMembershipPublicUserData.profileImageUrl
    • use useOrganizationList instead of useOrganizations
    • use userProfileProps instead of userProfile in Appearance
    • use Clerk.setActive() instead of Clerk.setSession()
    • drop password param in User.update()
    • use afterSelectOrganizationUrl instead of afterSwitchOrganizationUrl in OrganizationSwitcher
    • drop Clerk.experimental_canUseCaptcha / Clerk.Clerk.experimental_captchaSiteKey / Clerk.experimental_captchaURL (were meant for internal use)
    • use User.getOrganizationMemberships() instead of Clerk.getOrganizationMemberships()
    • drop lastOrganizationInvitation / lastOrganizationMember from Clerk emitted events
    • drop Clerk.__unstable__invitationUpdate / Clerk.__unstable__membershipUpdate
    • drop support for string param in Organization.create()
    • use Organization.getInvitations() instead of Organization.getPendingInvitations()
    • use pageSize instead of limit in OrganizationMembership.retrieve()
    • use initialPage instead of offset in OrganizationMembership.retrieve()
    • drop lastOrganizationInvitation / lastOrganizationMember from ClerkProvider
    • use invitations instead of invitationList in useOrganization
    • use memberships instead of membershipList in useOrganization
    • use redirectUrl instead of redirect_url in User.createExternalAccount()
    • use signature instead of generatedSignature in Signup.attemptWeb3WalletVerification()

Minor Changes

  • Introducing sign out from all open tabs at once. (#2094) by @octoper

  • Introducing default values for allowedRedirectOrigins. If no value is provided, default values similar to the example below will apply. (#2128) by @octoper

    Let's assume the host of the application is test.host, the origins will be

    • https://test.host/
    • https://yourawesomeapp.clerk.accounts.dev/
    • https://*.yourawesomeapp.clerk.accounts.dev/
  • Increase the duration until data become stale for organization hooks. (#2093) by @panteliselef

  • Handle user_locked error encountered in an oauth flow by redirecting to /sign-up or /sign-in (#2019) by @yourtallness

  • Add a private __navigateWithError util function to clerk for use in User Lockout scenarios (#2043) by @yourtallness

  • Move and export the following from @clerk/clerk-js and @clerk/nextjs to @clerk/shared: (#2149) by @dimkl

    - `DEV_BROWSER_SSO_JWT_PARAMETER`
    - `DEV_BROWSER_JWT_MARKER`
    - `DEV_BROWSER_SSO_JWT_KEY`
    - `setDevBrowserJWTInURL`
    - `getDevBrowserJWTFromURL`
    - `getDevBrowserJWTFromResponse`
    

Patch Changes

@clerk/clerk-expo@1.0.0-alpha-v5.1

Major Changes

  • Drop default exports from all packages. Migration guide: (#2150) by @dimkl

    • use import { Clerk } from '@clerk/backend';
    • use import { clerkInstance } from '@clerk/clerk-sdk-node';
    • use import { Clerk } from '@clerk/clerk-sdk-node';
    • use import { Clerk } from '@clerk/clerk-js';
    • use import { Clerk } from '@clerk/clerk-js/headless';
    • use import { IsomorphicClerk } from '@clerk/clerk-react'
  • Drop deprecations. Migration steps: (#2082) by @dimkl

    • use publishableKey instead of frontendApi
    • use Clerk.handleEmailLinkVerification() instead of Clerk.handleMagicLinkVerification()
    • use isEmailLinkError instead of isMagicLinkError
    • use EmailLinkErrorCode instead of MagicLinkErrorCode
    • use useEmailLink instead of useMagicLink
    • drop orgs jwt claim from session token
    • use ExternalAccount.imageUrl instead of ExternalAccount.avatarUrl
    • use Organization.imageUrl instead of Organization.logoUrl
    • use User.imageUrl instead of User.profileImageUrl
    • use OrganizationMembershipPublicUserData.imageUrl instead of OrganizationMembershipPublicUserData.profileImageUrl
    • use useOrganizationList instead of useOrganizations
    • use userProfileProps instead of userProfile in Appearance
    • use Clerk.setActive() instead of Clerk.setSession()
    • drop password param in User.update()
    • use afterSelectOrganizationUrl instead of afterSwitchOrganizationUrl in OrganizationSwitcher
    • drop Clerk.experimental_canUseCaptcha / Clerk.Clerk.experimental_captchaSiteKey / Clerk.experimental_captchaURL (were meant for internal use)
    • use User.getOrganizationMemberships() instead of Clerk.getOrganizationMemberships()
    • drop lastOrganizationInvitation / lastOrganizationMember from Clerk emitted events
    • drop Clerk.__unstable__invitationUpdate / Clerk.__unstable__membershipUpdate
    • drop support for string param in Organization.create()
    • use Organization.getInvitations() instead of Organization.getPendingInvitations()
    • use pageSize instead of limit in OrganizationMembership.retrieve()
    • use initialPage instead of offset in OrganizationMembership.retrieve()
    • drop lastOrganizationInvitation / lastOrganizationMember from ClerkProvider
    • use invitations instead of invitationList in useOrganization
    • use memberships instead of membershipList in useOrganization
    • use redirectUrl instead of redirect_url in User.createExternalAccount()
    • use signature instead of generatedSignature in Signup.attemptWeb3WalletVerification()

Patch Changes

gatsby-plugin-clerk@5.0.0-alpha-v5.1

Major Changes

  • Drop deprecations. Migration steps: (#2109) by @dimkl

    • drop orgs jwt claim from session token
    • change type of auth param of withServerAuth() callback to AuthObject from ServerSideAuth in gatsby-clerk-plugin
      • use auth.sessionClaims instead of auth.claims
      • use AuthObject properties from auth
    • use publishableKey instead of frontendApi
    • use ClerkProviderOptionsWrapper type instead of IsomorphicClerkOptions

Patch Changes

@clerk/localizations@2.0.0-alpha-v5.1

Major Changes

  • Drop deprecations. Migration steps: (#2151) by @dimkl

    • drop formFieldLabel__emailAddress_phoneNumber from localization keys
    • drop formFieldLabel__phoneNumber_username from localization keys
    • drop formFieldLabel__emailAddress_phoneNumber_username from localization keys
    • drop formFieldInputPlaceholder__emailAddress_phoneNumber from localization keys
    • drop formFieldInputPlaceholder__phoneNumber_username from localization keys
    • drop formFieldInputPlaceholder__emailAddress_phoneNumber_username from localization keys
    • use title__connectionFailed instead of title__conectionFailed from localization keys
    • use actionLabel__connectionFailed instead of actionLabel__conectionFailed from localization keys
    • use headerTitle__members instead of headerTitle__active from localization keys
    • use headerTitle__invitations instead of headerTitle__invited from localization keys
    • drop createOrganization.subtitle from localization keys
    • use deDE instead of deDe localization from @clerk/localizations

Patch Changes

@clerk/nextjs@5.0.0-alpha-v5.1

Major Changes

  • Drop deprecations. Migration steps: (#2082) by @dimkl

    • use publishableKey instead of frontendApi
    • use Clerk.handleEmailLinkVerification() instead of Clerk.handleMagicLinkVerification()
    • use isEmailLinkError instead of isMagicLinkError
    • use EmailLinkErrorCode instead of MagicLinkErrorCode
    • use useEmailLink instead of useMagicLink
    • drop orgs jwt claim from session token
    • use ExternalAccount.imageUrl instead of ExternalAccount.avatarUrl
    • use Organization.imageUrl instead of Organization.logoUrl
    • use User.imageUrl instead of User.profileImageUrl
    • use OrganizationMembershipPublicUserData.imageUrl instead of OrganizationMembershipPublicUserData.profileImageUrl
    • use useOrganizationList instead of useOrganizations
    • use userProfileProps instead of userProfile in Appearance
    • use Clerk.setActive() instead of Clerk.setSession()
    • drop password param in User.update()
    • use afterSelectOrganizationUrl instead of afterSwitchOrganizationUrl in OrganizationSwitcher
    • drop Clerk.experimental_canUseCaptcha / Clerk.Clerk.experimental_captchaSiteKey / Clerk.experimental_captchaURL (were meant for internal use)
    • use User.getOrganizationMemberships() instead of Clerk.getOrganizationMemberships()
    • drop lastOrganizationInvitation / lastOrganizationMember from Clerk emitted events
    • drop Clerk.__unstable__invitationUpdate / Clerk.__unstable__membershipUpdate
    • drop support for string param in Organization.create()
    • use Organization.getInvitations() instead of Organization.getPendingInvitations()
    • use pageSize instead of limit in OrganizationMembership.retrieve()
    • use initialPage instead of offset in OrganizationMembership.retrieve()
    • drop lastOrganizationInvitation / lastOrganizationMember from ClerkProvider
    • use invitations instead of invitationList in useOrganization
    • use memberships instead of membershipList in useOrganization
    • use redirectUrl instead of redirect_url in User.createExternalAccount()
    • use signature instead of generatedSignature in Signup.attemptWeb3WalletVerification()
  • Drop deprecations. Migration steps: (#2109) by @dimkl

    • drop orgs jwt claim from session token
    • change type of auth param of withServerAuth() callback to AuthObject from ServerSideAuth in gatsby-clerk-plugin
      • use auth.sessionClaims instead of auth.claims
      • use AuthObject properties from auth
    • use publishableKey instead of frontendApi
    • use ClerkProviderOptionsWrapper type instead of IsomorphicClerkOptions
  • Change the response payload of Backend API requests to return { data, errors } instead of return the data and throwing on error response. (#2126) by @dimkl

    Code example to keep the same behavior:

    import { users } from '@clerk/backend';
    import { ClerkAPIResponseError } from '@clerk/shared/error';
    
    const { data, errors, clerkTraceId, status, statusText } = await users.getUser('user_deadbeef');
    if (errors) {
      throw new ClerkAPIResponseError(statusText, { data: errors, status, clerkTraceId });
    }

Minor Changes

  • Move and export the following from @clerk/clerk-js and @clerk/nextjs to @clerk/shared: (#2149) by @dimkl

    - `DEV_BROWSER_SSO_JWT_PARAMETER`
    - `DEV_BROWSER_JWT_MARKER`
    - `DEV_BROWSER_SSO_JWT_KEY`
    - `setDevBrowserJWTInURL`
    - `getDevBrowserJWTFromURL`
    - `getDevBrowserJWTFromResponse`
    

Patch Changes

@clerk/clerk-react@5.0.0-alpha-v5.1

Major Changes

  • Drop default exports from all packages. Migration guide: (#2150) by @dimkl

    • use import { Clerk } from '@clerk/backend';
    • use import { clerkInstance } from '@clerk/clerk-sdk-node';
    • use import { Clerk } from '@clerk/clerk-sdk-node';
    • use import { Clerk } from '@clerk/clerk-js';
    • use import { Clerk } from '@clerk/clerk-js/headless';
    • use import { IsomorphicClerk } from '@clerk/clerk-react'
  • Drop deprecations. Migration steps: (#2102) by @dimkl

    • use EmailLinkError instead of MagicLinkError
    • use isEmailLinkError instead of isMagicLinkError
    • use EmailLinkErrorCode instead of MagicLinkErrorCode
    • use useEmailLink instead of useMagicLink
    • use buildRequestUrl from @clerk/backend instead of getRequestUrl from @clerk/shared
    • use OrganizationProvider instead of OrganizationContext
    • use userMemberships instead of organizationList from useOrganizationList
  • Drop deprecations. Migration steps: (#2082) by @dimkl

    • use publishableKey instead of frontendApi
    • use Clerk.handleEmailLinkVerification() instead of Clerk.handleMagicLinkVerification()
    • use isEmailLinkError instead of isMagicLinkError
    • use EmailLinkErrorCode instead of MagicLinkErrorCode
    • use useEmailLink instead of useMagicLink
    • drop orgs jwt claim from session token
    • use ExternalAccount.imageUrl instead of ExternalAccount.avatarUrl
    • use Organization.imageUrl instead of Organization.logoUrl
    • use User.imageUrl instead of User.profileImageUrl
    • use OrganizationMembershipPublicUserData.imageUrl instead of OrganizationMembershipPublicUserData.profileImageUrl
    • use useOrganizationList instead of useOrganizations
    • use userProfileProps instead of userProfile in Appearance
    • use Clerk.setActive() instead of Clerk.setSession()
    • drop password param in User.update()
    • use afterSelectOrganizationUrl instead of afterSwitchOrganizationUrl in OrganizationSwitcher
    • drop Clerk.experimental_canUseCaptcha / Clerk.Clerk.experimental_captchaSiteKey / Clerk.experimental_captchaURL (were meant for internal use)
    • use User.getOrganizationMemberships() instead of Clerk.getOrganizationMemberships()
    • drop lastOrganizationInvitation / lastOrganizationMember from Clerk emitted events
    • drop Clerk.__unstable__invitationUpdate / Clerk.__unstable__membershipUpdate
    • drop support for string param in Organization.create()
    • use Organization.getInvitations() instead of Organization.getPendingInvitations()
    • use pageSize instead of limit in OrganizationMembership.retrieve()
    • use initialPage instead of offset in OrganizationMembership.retrieve()
    • drop lastOrganizationInvitation / lastOrganizationMember from ClerkProvider
    • use invitations instead of invitationList in useOrganization
    • use memberships instead of membershipList in useOrganization
    • use redirectUrl instead of redirect_url in User.createExternalAccount()
    • use signature instead of generatedSignature in Signup.attemptWeb3WalletVerification()
  • Drop deprecations. Migration steps: (#2109) by @dimkl

    • drop orgs jwt claim from session token
    • change type of auth param of withServerAuth() callback to AuthObject from ServerSideAuth in gatsby-clerk-plugin
      • use auth.sessionClaims instead of auth.claims
      • use AuthObject properties from auth
    • use publishableKey instead of frontendApi
    • use ClerkProviderOptionsWrapper type instead of IsomorphicClerkOptions
  • Drop deprecations. Migration steps: (#2151) by @dimkl

    • drop formFieldLabel__emailAddress_phoneNumber from localization keys
    • drop formFieldLabel__phoneNumber_username from localization keys
    • drop formFieldLabel__emailAddress_phoneNumber_username from localization keys
    • drop formFieldInputPlaceholder__emailAddress_phoneNumber from localization keys
    • drop formFieldInputPlaceholder__phoneNumber_username from localization keys
    • drop formFieldInputPlaceholder__emailAddress_phoneNumber_username from localization keys
    • use title__connectionFailed instead of title__conectionFailed from localization keys
    • use actionLabel__connectionFailed instead of actionLabel__conectionFailed from localization keys
    • use headerTitle__members instead of headerTitle__active from localization keys
    • use headerTitle__invitations instead of headerTitle__invited from localization keys
    • drop createOrganization.subtitle from localization keys
    • use deDE instead of deDe localization from @clerk/localizations
  • Drop deprecations. Migration steps: (#1993) by @dimkl

    • use setActive instead of setSession from useSessionList | useSignUp | useSignIn hooks
    • use publishableKey instead of frontendApi
    • use handleEmailLinkVerification instead of handleMagicLinkVerification from IsomorphicClerk
    • use isEmailLinkError instead of isMagicLinkError
    • use EmailLinkErrorCode instead of MagicLinkErrorCode
    • use useEmailLink instead of useMagicLink

Patch Changes

@clerk/remix@4.0.0-alpha-v5.1

Major Changes

  • Drop deprecations. Migration steps: (#2109) by @dimkl

    • drop orgs jwt claim from session token
    • change type of auth param of withServerAuth() callback to AuthObject from ServerSideAuth in gatsby-clerk-plugin
      • use auth.sessionClaims instead of auth.claims
      • use AuthObject properties from auth
    • use publishableKey instead of frontendApi
    • use ClerkProviderOptionsWrapper type instead of IsomorphicClerkOptions

Patch Changes

@clerk/clerk-sdk-node@5.0.0-alpha-v5.1

Major Changes

  • Drop default exports from all packages. Migration guide: (#2150) by @dimkl

    • use import { Clerk } from '@clerk/backend';
    • use import { clerkInstance } from '@clerk/clerk-sdk-node';
    • use import { Clerk } from '@clerk/clerk-sdk-node';
    • use import { Clerk } from '@clerk/clerk-js';
    • use import { Clerk } from '@clerk/clerk-js/headless';
    • use import { IsomorphicClerk } from '@clerk/clerk-react'
  • Change the response payload of Backend API requests to return { data, errors } instead of return the data and throwing on error response. (#2126) by @dimkl

    Code example to keep the same behavior:

    import { users } from '@clerk/backend';
    import { ClerkAPIResponseError } from '@clerk/shared/error';
    
    const { data, errors, clerkTraceId, status, statusText } = await users.getUser('user_deadbeef');
    if (errors) {
      throw new ClerkAPIResponseError(statusText, { data: errors, status, clerkTraceId });
    }
  • Drop deprecations. Migration steps: (#2021) by @dimkl

    • use CLERK_SECRET_KEY instead of CLERK_API_KEY env variable
    • use secretKey instead of apiKey
    • use CLERK_PUBLISHABLE_KEY instead of CLERK_FRONTEND_API env variable
    • use publishableKey instead of frontendApi
    • drop Redwood hotfix (upgrade to latest version)
    • use createClerkClient with options to create a new clerkClient instead of using
      the following setters:
      • setClerkApiVersion
      • setClerkHttpOptions
      • setClerkServerApiUrl
      • setClerkApiKey
    • use @clerk/clerk-sdk-node instead of @clerk/clerk-sdk-node/{cjs|esm}/instance

    Extra:

    • bundle only index.ts and instance.ts

Patch Changes

@clerk/shared@2.0.0-alpha-v5.1

Major Changes

  • Drop deprecations. Migration steps: (#2102) by @dimkl

    • use EmailLinkError instead of MagicLinkError
    • use isEmailLinkError instead of isMagicLinkError
    • use EmailLinkErrorCode instead of MagicLinkErrorCode
    • use useEmailLink instead of useMagicLink
    • use buildRequestUrl from @clerk/backend instead of getRequestUrl from @clerk/shared
    • use OrganizationProvider instead of OrganizationContext
    • use userMemberships instead of organizationList from useOrganizationList
  • Drop deprecations. Migration steps: (#2082) by @dimkl

    • use publishableKey instead of frontendApi
    • use Clerk.handleEmailLinkVerification() instead of Clerk.handleMagicLinkVerification()
    • use isEmailLinkError instead of isMagicLinkError
    • use EmailLinkErrorCode instead of MagicLinkErrorCode
    • use useEmailLink instead of useMagicLink
    • drop orgs jwt claim from session token
    • use ExternalAccount.imageUrl instead of ExternalAccount.avatarUrl
    • use Organization.imageUrl instead of Organization.logoUrl
    • use User.imageUrl instead of User.profileImageUrl
    • use OrganizationMembershipPublicUserData.imageUrl instead of OrganizationMembershipPublicUserData.profileImageUrl
    • use useOrganizationList instead of useOrganizations
    • use userProfileProps instead of userProfile in Appearance
    • use Clerk.setActive() instead of Clerk.setSession()
    • drop password param in User.update()
    • use afterSelectOrganizationUrl instead of afterSwitchOrganizationUrl in OrganizationSwitcher
    • drop Clerk.experimental_canUseCaptcha / Clerk.Clerk.experimental_captchaSiteKey / Clerk.experimental_captchaURL (were meant for internal use)
    • use User.getOrganizationMemberships() instead of Clerk.getOrganizationMemberships()
    • drop lastOrganizationInvitation / lastOrganizationMember from Clerk emitted events
    • drop Clerk.__unstable__invitationUpdate / Clerk.__unstable__membershipUpdate
    • drop support for string param in Organization.create()
    • use Organization.getInvitations() instead of Organization.getPendingInvitations()
    • use pageSize instead of limit in OrganizationMembership.retrieve()
    • use initialPage instead of offset in OrganizationMembership.retrieve()
    • drop lastOrganizationInvitation / lastOrganizationMember from ClerkProvider
    • use invitations instead of invitationList in useOrganization
    • use memberships instead of membershipList in useOrganization
    • use redirectUrl instead of redirect_url in User.createExternalAccount()
    • use signature instead of generatedSignature in Signup.attemptWeb3WalletVerification()

Minor Changes

  • Increase the duration until data become stale for organization hooks. (#2093) by @panteliselef

  • Add a private __navigateWithError util function to clerk for use in User Lockout scenarios (#2043) by @yourtallness

  • Move and export the following from @clerk/clerk-js and @clerk/nextjs to @clerk/shared: (#2149) by @dimkl

    - `DEV_BROWSER_SSO_JWT_PARAMETER`
    - `DEV_BROWSER_JWT_MARKER`
    - `DEV_BROWSER_SSO_JWT_KEY`
    - `setDevBrowserJWTInURL`
    - `getDevBrowserJWTFromURL`
    - `getDevBrowserJWTFromResponse`
    

Patch Changes

  • Fix incorrect pagination counters in data tables inside <OrganizationProfile/>. (#2056) by @panteliselef

  • Use the errorThrower shared utility when throwing errors (#1999) by @anagstef

@clerk/types@4.0.0-alpha-v5.1

Major Changes

  • Drop deprecations. Migration steps: (#2082) by @dimkl

    • use publishableKey instead of frontendApi
    • use Clerk.handleEmailLinkVerification() instead of Clerk.handleMagicLinkVerification()
    • use isEmailLinkError instead of isMagicLinkError
    • use EmailLinkErrorCode instead of MagicLinkErrorCode
    • use useEmailLink instead of useMagicLink
    • drop orgs jwt claim from session token
    • use ExternalAccount.imageUrl instead of ExternalAccount.avatarUrl
    • use Organization.imageUrl instead of Organization.logoUrl
    • use User.imageUrl instead of User.profileImageUrl
    • use OrganizationMembershipPublicUserData.imageUrl instead of OrganizationMembershipPublicUserData.profileImageUrl
    • use useOrganizationList instead of useOrganizations
    • use userProfileProps instead of userProfile in Appearance
    • use Clerk.setActive() instead of Clerk.setSession()
    • drop password param in User.update()
    • use afterSelectOrganizationUrl instead of afterSwitchOrganizationUrl in OrganizationSwitcher
    • drop Clerk.experimental_canUseCaptcha / Clerk.Clerk.experimental_captchaSiteKey / Clerk.experimental_captchaURL (were meant for internal use)
    • use User.getOrganizationMemberships() instead of Clerk.getOrganizationMemberships()
    • drop lastOrganizationInvitation / lastOrganizationMember from Clerk emitted events
    • drop Clerk.__unstable__invitationUpdate / Clerk.__unstable__membershipUpdate
    • drop support for string param in Organization.create()
    • use Organization.getInvitations() instead of Organization.getPendingInvitations()
    • use pageSize instead of limit in OrganizationMembership.retrieve()
    • use initialPage instead of offset in OrganizationMembership.retrieve()
    • drop lastOrganizationInvitation / lastOrganizationMember from ClerkProvider
    • use invitations instead of invitationList in useOrganization
    • use memberships instead of membershipList in useOrganization
    • use redirectUrl instead of redirect_url in User.createExternalAccount()
    • use signature instead of generatedSignature in Signup.attemptWeb3WalletVerification()
  • Drop deprecations. Migration steps: (#2109) by @dimkl

    • drop orgs jwt claim from session token
    • change type of auth param of withServerAuth() callback to AuthObject from ServerSideAuth in gatsby-clerk-plugin
      • use auth.sessionClaims instead of auth.claims
      • use AuthObject properties from auth
    • use publishableKey instead of frontendApi
    • use ClerkProviderOptionsWrapper type instead of IsomorphicClerkOptions
  • Drop deprecations. Migration steps: (#2151) by @dimkl

    • drop formFieldLabel__emailAddress_phoneNumber from localization keys
    • drop formFieldLabel__phoneNumber_username from localization keys
    • drop formFieldLabel__emailAddress_phoneNumber_username from localization keys
    • drop formFieldInputPlaceholder__emailAddress_phoneNumber from localization keys
    • drop formFieldInputPlaceholder__phoneNumber_username from localization keys
    • drop formFieldInputPlaceholder__emailAddress_phoneNumber_username from localization keys
    • use title__connectionFailed instead of title__conectionFailed from localization keys
    • use actionLabel__connectionFailed instead of actionLabel__conectionFailed from localization keys
    • use headerTitle__members instead of headerTitle__active from localization keys
    • use headerTitle__invitations instead of headerTitle__invited from localization keys
    • drop createOrganization.subtitle from localization keys
    • use deDE instead of deDe localization from @clerk/localizations

Patch Changes

@clerk/fastify@1.0.0-alpha-v5.1

Patch Changes

@github-actions github-actions bot force-pushed the changeset-release/main branch 16 times, most recently from b2bf3f6 to 7159037 Compare November 17, 2023 10:39
@dimkl dimkl added this pull request to the merge queue Nov 17, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 17, 2023
@dimkl dimkl added this pull request to the merge queue Nov 17, 2023
Merged via the queue into main with commit 5ff4ab5 Nov 17, 2023
7 checks passed
@dimkl dimkl deleted the changeset-release/main branch November 17, 2023 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants