Packages

@clerk/backend

3.29.0 · 14 Nov 2026MIT8.4M / weekRepositoryHomepagenpmAtom feed

Your version

3.7.0

11 Jun 2026Where it was published

3.31.4 is the newest release of 3.x.

In short

2 new1 fixed1 internal

Release note

Minor Changes

  • Add clerkClient.organizations.replaceOrganizationMetadata(organizationId, params) for replacing an organization's metadata fields in full.

    Use replaceOrganizationMetadata when the provided metadata should become the complete value for that metadata field:

    await clerkClient.organizations.replaceOrganizationMetadata(organizationId, {
      publicMetadata: { plan: 'pro' },
    });

    Use clerkClient.organizations.updateOrganizationMetadata(organizationId, params) when you want to partially update metadata with deep-merge semantics:

    await clerkClient.organizations.updateOrganizationMetadata(organizationId, {
      publicMetadata: { onboardingComplete: true },
    });

    The publicMetadata and privateMetadata parameters on clerkClient.organizations.updateOrganization() are now deprecated. They continue to work, but new code should use updateOrganizationMetadata() for partial updates or replaceOrganizationMetadata() for full replacement.

  • Add clerkClient.users.replaceUserMetadata(userId, params) for replacing a user's metadata fields in full.

    Use replaceUserMetadata when the provided metadata should become the complete value for that metadata field:

    await clerkClient.users.replaceUserMetadata(userId, {
      publicMetadata: { plan: 'pro' },
    });

    Use clerkClient.users.updateUserMetadata(userId, params) when you want to partially update metadata with deep-merge semantics:

    await clerkClient.users.updateUserMetadata(userId, {
      publicMetadata: { onboardingComplete: true },
    });

    The publicMetadata, privateMetadata, and unsafeMetadata parameters on clerkClient.users.updateUser() are now deprecated. They continue to work, but new code should use updateUserMetadata() for partial updates or replaceUserMetadata() for full replacement.

Patch Changes

  • Migrate the build pipeline to tsdown and TypeScript 6.0. This is an internal tooling change with no intended changes to the public API or runtime behavior.

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.