Skip to content

@clerk/[email protected]

Pre-release
Pre-release
Compare
Choose a tag to compare
@clerk-cookie clerk-cookie released this 19 Dec 01:01
· 1866 commits to main since this release
72b66e1

Major Changes

  • Drop all pre-instantiated Backend API resources (allowlistIdentifiers, clients, emailAddresses, emails, invitations, organizations, phoneNumbers, redirectUrls, sessions, signInTokens, users, domains). Use the clerkClient import instead. (#2362) by @dimkl

    // Before
    import { users } from '@clerk/clerk-sdk-node';
    // After
    import { clerkClient } from '@clerk/clerk-sdk-node';
    clerkClient.users;
  • Changes in exports of @clerk/backend: (#2363) by @dimkl

    • Expose the following helpers and enums from @clerk/backend/internal:
      import {
        AuthStatus,
        buildRequestUrl,
        constants,
        createAuthenticateRequest,
        createIsomorphicRequest,
        debugRequestState,
        makeAuthObjectSerializable,
        prunePrivateMetadata,
        redirect,
        sanitizeAuthObject,
        signedInAuthObject,
        signedOutAuthObject,
      } from '@clerk/backend/internal';
    • Drop the above exports from the top-level api:
      // Before
      import { AuthStatus, ... } from '@clerk/backend';
      // After
      import { AuthStatus, ... } from '@clerk/backend/internal';
      Dropping those exports results in also dropping the exports from gatsby-plugin-clerk, @clerk/clerk-sdk-node, @clerk/backend, @clerk/fastify, @clerk/nextjs, @clerk/remix packages.
  • Changes in exports of @clerk/backend: (#2365) by @dimkl

    • Drop the following internal exports from the top-level api:
      // Before
      import {
        AllowlistIdentifier,
        Client,
        DeletedObject,
        Email,
        EmailAddress,
        ExternalAccount,
        IdentificationLink,
        Invitation,
        OauthAccessToken,
        ObjectType,
        Organization,
        OrganizationInvitation,
        OrganizationMembership,
        OrganizationMembershipPublicUserData,
        PhoneNumber,
        RedirectUrl,
        SMSMessage,
        Session,
        SignInToken,
        Token,
        User,
        Verification,
      } from '@clerk/backend';
      // After : no alternative since there is no need to use those classes
      Dropping those exports results in also dropping the exports from gatsby-plugin-clerk, @clerk/clerk-sdk-node, @clerk/backend, @clerk/fastify, @clerk/nextjs, @clerk/remix packages.
    • Keep those 3 resource related type exports
      import type { Organization, Session, User, WebhookEvent, WebhookEventType } from '@clerk/backend';
  • Changes in exports of @clerk/backend: (#2364) by @dimkl

    • Expose the following helpers and enums from @clerk/backend/jwt:
      import { decodeJwt, hasValidSignature, signJwt, verifyJwt } from '@clerk/backend/jwt';
    • Drop the above exports from the top-level api:
      // Before
      import { decodeJwt, ... } from '@clerk/backend';
      // After
      import { decodeJwt, ... } from '@clerk/backend/jwt';
      Dropping those exports results in also dropping the exports from gatsby-plugin-clerk, @clerk/clerk-sdk-node, @clerk/backend, @clerk/fastify, @clerk/nextjs, @clerk/remix packages.
  • Changes in @clerk/backend exports: (#2362) by @dimkl

    • Drop Internal deserialize helper
    • Introduce /errors subpath export, eg:
      import {
        TokenVerificationError,
        TokenVerificationErrorAction,
        TokenVerificationErrorCode,
        TokenVerificationErrorReason,
      } from '@clerk/backend/errors';
    • Drop errors from top-level export
      // Before
      import { TokenVerificationError, TokenVerificationErrorReason } from '@clerk/backend';
      // After
      import { TokenVerificationError, TokenVerificationErrorReason } from '@clerk/backend/errors';

Minor Changes

  • Fix error thrown for undefined Clerk in case of using default clerkClient from @clerk/clerk-sdk-node without secretKey caused by replaced import. (#2368) by @dimkl

Patch Changes