Packages

@clerk/astro

4.1.27 · 18 Nov 2026MIT46.5k / weekRepositoryHomepagenpmAtom feed

Your version

2.3.0

26 Feb 2025Where it was published

2.17.18 is the newest release of 2.x.

In short

2 new1 fixed3 internal

Security

2 advisories affect 2.3.0; 2.17.11 fixes them

Release note

Minor Changes

  • Introduce protect-fallback slot to avoid naming conflicts with Astro's server islands fallback slot.

    When using Clerk's <Protect> component with server:defer, you can now use both slots:

    • fallback: Default loading content

    • protect-fallback: Shows when a user doesn't have the role or permission to access the protected content

    Regular usage without server islands:

    <Protect role="admin">
      <p slot="fallback">Not an admin</p>
      <p>You're an admin</p>
    </Protect>

    Example with server islands:

    <Protect server:defer role="admin">
      <p slot="fallback">Loading...</p>
      <p slot="protect-fallback">Not an admin</p>
      <p>You're an admin</p>
    </Protect>
  • Surface new pending session as a signed-in state

Patch Changes

  • The exports map inside package.json has been slightly adjusted to allow for require(esm) to work correctly. The "import" conditions have been changed to "default".

    You shouldn't see any change in behavior/functionality on your end.

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.