releases.shpreview

unsafeMetadata in user.update() deprecated

@clerk/shared@4.17.1

2 enhancements1 fixThis release2 enhancementsImprovements to existing features1 fixBug fixesAI-tallied from the release notes

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. (#8177) by @dstaley

  • Deprecate passing unsafeMetadata to user.update(). (#8587) by @brunol95

    Use user.updateMetadata() when you want to partially update unsafe metadata with deep-merge semantics:

    await user.updateMetadata({
      unsafeMetadata: { onboardingComplete: true },
    });

    user.update({ unsafeMetadata }) continues to work for now and preserves its existing full-replacement behavior:

    await user.update({
      unsafeMetadata: { theme: 'dark' },
    });

    New code should prefer user.updateMetadata({ unsafeMetadata }) for metadata-only updates.

  • Restore resolvable TypeScript declarations. Type declarations are now emitted per-module at stable public paths instead of being bundled into content-hashed internal chunk files. This fixes type resolution failures (or silent any degradation) in packages whose declarations reference @clerk/shared types, such as @clerk/vue, @clerk/react, @clerk/ui, and @clerk/testing, which previously pointed at unresolvable @clerk/shared/_chunks/* specifiers. (#8811) by @jacekradko

Fetched June 11, 2026