Skip to content

Commit 8c8873d

Browse files
authored
feat(upgrade): Add change files for Core 3 (#7386)
1 parent 4c88768 commit 8c8873d

24 files changed

+452
-0
lines changed

.changeset/twenty-snakes-smile.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
title: '`afterSwitchOrganizationUrl` removed from `OrganizationSwitcher`'
3+
matcher: 'afterSwitchOrganizationUrl'
4+
category: 'deprecation-removal'
5+
---
6+
7+
The `afterSwitchOrganizationUrl` prop has been removed from `OrganizationSwitcher`. Use `afterSelectOrganizationUrl` instead:
8+
9+
```diff
10+
<OrganizationSwitcher
11+
- afterSwitchOrganizationUrl="/org-dashboard"
12+
+ afterSelectOrganizationUrl="/org-dashboard"
13+
/>
14+
```
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
title: '`appearance.layout` renamed to `appearance.options`'
3+
matcher: 'appearance[\\s\\S]*?\\.layout'
4+
matcherFlags: 'm'
5+
category: 'breaking'
6+
---
7+
8+
The `appearance.layout` property has been renamed to `appearance.options`. Update all instances in your codebase:
9+
10+
```diff
11+
<ClerkProvider
12+
appearance={{
13+
- layout: {
14+
+ options: {
15+
socialButtonsPlacement: 'bottom',
16+
socialButtonsVariant: 'iconButton',
17+
}
18+
}}
19+
>
20+
```
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
title: 'Unstable billing props removed'
3+
matcher:
4+
- '__unstable_manageBillingUrl'
5+
- '__unstable_manageBillingLabel'
6+
- '__unstable_manageBillingMembersLimit'
7+
category: 'deprecation-removal'
8+
---
9+
10+
The following unstable properties have been removed. If you were relying on these, please reach out to support.
11+
12+
- `__unstable_manageBillingUrl`
13+
- `__unstable_manageBillingLabel`
14+
- `__unstable_manageBillingMembersLimit`
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
title: '`useCheckout` and `Clerk.checkout()` return value changed'
3+
matcher:
4+
- 'useCheckout'
5+
- 'Clerk\\.checkout'
6+
- '\.checkout\('
7+
category: 'breaking'
8+
---
9+
10+
The return values of `useCheckout` hook and `Clerk.checkout()` have been updated.
11+
12+
### React Hook
13+
14+
```diff
15+
- const { id, plan, status, start, confirm, paymentSource } = useCheckout({ planId: "xxx", planPeriod: "annual" });
16+
+ const { checkout, errors, fetchStatus } = useCheckout({ planId: "xxx", planPeriod: "annual" });
17+
+ // Access properties via checkout object
18+
+ checkout.plan
19+
+ checkout.status
20+
+ checkout.start()
21+
+ checkout.confirm()
22+
```
23+
24+
### Vanilla JS
25+
26+
```diff
27+
- const { getState, subscribe, confirm, start, clear, finalize } = Clerk.checkout({ planId: "xxx", planPeriod: "annual" });
28+
- getState().isStarting
29+
- getState().checkout
30+
+ const { checkout, errors, fetchStatus } = Clerk.checkout({ planId: "xxx", planPeriod: "annual" });
31+
+ checkout.plan
32+
+ checkout.status
33+
+ checkout.start()
34+
+ checkout.confirm()
35+
```
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
title: '`@clerk/types` deprecated in favor of `@clerk/shared/types`'
3+
matcher: "from\\s+['\"]@clerk/types['\"]"
4+
category: 'deprecation'
5+
warning: true
6+
---
7+
8+
The `@clerk/types` package is deprecated. All type definitions have been consolidated into `@clerk/shared/types`.
9+
10+
Update your imports:
11+
12+
```diff
13+
- import type { ClerkResource, UserResource } from '@clerk/types';
14+
+ import type { ClerkResource, UserResource } from '@clerk/shared/types';
15+
```
16+
17+
The `@clerk/types` package will continue to re-export types from `@clerk/shared/types` for backward compatibility, but new types will only be added to `@clerk/shared/types`.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
title: '`Client.activeSessions` removed'
3+
matcher: '\\.activeSessions'
4+
category: 'deprecation-removal'
5+
---
6+
7+
The `activeSessions` property has been removed from the `Client` object. Use `sessions` instead:
8+
9+
```diff
10+
- const sessions = client.activeSessions;
11+
+ const sessions = client.sessions;
12+
```
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
title: '`colorRing` and `colorModalBackdrop` now render at full opacity'
3+
matcher:
4+
- 'colorRing'
5+
- 'colorModalBackdrop'
6+
category: 'breaking'
7+
warning: true
8+
---
9+
10+
The `colorRing` and `colorModalBackdrop` CSS variables now render at full opacity when modified via the appearance prop or CSS variables. Previously, provided colors were rendered at 15% opacity.
11+
12+
If you were relying on the previous behavior, you may need to adjust your color values to include the desired opacity:
13+
14+
```diff
15+
appearance={{
16+
variables: {
17+
- colorRing: '#6366f1',
18+
+ colorRing: 'rgba(99, 102, 241, 0.15)',
19+
}
20+
}}
21+
```
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
title: 'Legacy redirect props removed'
3+
matcher:
4+
- 'afterSignInUrl'
5+
- 'afterSignUpUrl'
6+
- 'afterSignOutUrl'
7+
- 'redirectUrl'
8+
category: 'deprecation-removal'
9+
---
10+
11+
The legacy redirect props `afterSignInUrl`, `afterSignUpUrl`, and `redirectUrl` have been removed from components. Use the newer redirect options:
12+
13+
```diff
14+
<SignIn
15+
- afterSignInUrl="/dashboard"
16+
- afterSignUpUrl="/onboarding"
17+
+ fallbackRedirectUrl="/dashboard"
18+
+ signUpFallbackRedirectUrl="/onboarding"
19+
/>
20+
```
21+
22+
For forced redirects that ignore the `redirect_url` query parameter:
23+
24+
```diff
25+
<SignIn
26+
+ forceRedirectUrl="/dashboard"
27+
+ signUpForceRedirectUrl="/onboarding"
28+
/>
29+
```
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
title: 'Experimental method prefix standardized to `__experimental_`'
3+
matcher:
4+
- 'experimental__'
5+
- 'experimental_'
6+
category: 'breaking'
7+
---
8+
9+
All experimental methods now use the `__experimental_` prefix consistently. Update any references:
10+
11+
```diff
12+
- experimental__someMethod
13+
+ __experimental_someMethod
14+
15+
- experimental_someMethod
16+
+ __experimental_someMethod
17+
```

0 commit comments

Comments
 (0)