-
Notifications
You must be signed in to change notification settings - Fork 320
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into stefanos/fraud-377-expose-more-options-for-t…
…urnstile-appearance
- Loading branch information
Showing
52 changed files
with
848 additions
and
561 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
"@clerk/astro": minor | ||
--- | ||
|
||
Introduce `protect-fallback` slot to avoid naming conflicts with Astro's server islands [`fallback` slot](https://docs.astro.build/en/guides/server-islands/#server-island-fallback-content). | ||
|
||
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: | ||
|
||
```astro | ||
<Protect role="admin"> | ||
<p slot="fallback">Not an admin</p> | ||
<p>You're an admin</p> | ||
</Protect> | ||
``` | ||
|
||
Example with server islands: | ||
|
||
```astro | ||
<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> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@clerk/nuxt": patch | ||
--- | ||
|
||
Fixes an issue where duplicated imports caused warnings in the console. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
'@clerk/shared': major | ||
--- | ||
This new version introduces the following breaking changes: | ||
- Introduced a new `retry` utility function to replace the deprecated `callWithRetry`. | ||
- Removed the `callWithRetry` function and its associated tests. | ||
- Renamed `runWithExponentialBackOff` to `retry` for consistency. | ||
|
||
Migration steps: | ||
- Replace any usage of `callWithRetry` with the new `retry` function. | ||
- Update import statements from: | ||
```typescript | ||
import { callWithRetry } from '@clerk/shared/callWithRetry'; | ||
``` | ||
to: | ||
```typescript | ||
import { retry } from '@clerk/shared/retry'; | ||
``` | ||
- Replace any usage of `runWithExponentialBackOff` with `retry`. | ||
- Update import statements from: | ||
```typescript | ||
import { runWithExponentialBackOff } from '@clerk/shared/utils'; | ||
``` | ||
to: | ||
```typescript | ||
import { retry } from '@clerk/shared/retry'; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@clerk/clerk-js': patch | ||
--- | ||
|
||
Improve compatibility with Safari 12 by removing modern JavaScript syntax. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@clerk/clerk-react': patch | ||
--- | ||
|
||
Refactors `IsomorphicClerk` types to reduce unnecessary duplication between it and `Clerk`. Also relies more on the source types from `Clerk` to ensure `IsomorphicClerk` types match. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@clerk/clerk-js': minor | ||
--- | ||
|
||
Track usage of modal UI Components as part of telemetry. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
--- |
20 changes: 20 additions & 0 deletions
20
integration/templates/astro-node/src/pages/server-islands.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
import { Protect } from "@clerk/astro/components"; | ||
import Layout from "../layouts/Layout.astro"; | ||
--- | ||
|
||
<Layout title="Page is only accessible by members"> | ||
<div class="w-full flex justify-center flex-col"> | ||
<Protect server:defer role="admin"> | ||
<p slot="fallback">Loading</p> | ||
<Fragment slot="protect-fallback"> | ||
<h1 class="text-2xl text-center">Not an admin</h1> | ||
<a | ||
class="text-sm text-center text-gray-100 transition hover:text-gray-400" | ||
href="/only-members">Go to Members Page</a | ||
> | ||
</Fragment> | ||
<h1 class="text-2xl text-center">I'm an admin</h1> | ||
</Protect> | ||
</div> | ||
</Layout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.