Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .changeset/twenty-snakes-smile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: '`afterSwitchOrganizationUrl` removed from `OrganizationSwitcher`'
matcher: 'afterSwitchOrganizationUrl'
category: 'deprecation-removal'
---

The `afterSwitchOrganizationUrl` prop has been removed from `OrganizationSwitcher`. Use `afterSelectOrganizationUrl` instead:

```diff
<OrganizationSwitcher
- afterSwitchOrganizationUrl="/org-dashboard"
+ afterSelectOrganizationUrl="/org-dashboard"
/>
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
title: '`appearance.layout` renamed to `appearance.options`'
matcher: 'appearance[\\s\\S]*?\\.layout'
matcherFlags: 'm'
category: 'breaking'
---

The `appearance.layout` property has been renamed to `appearance.options`. Update all instances in your codebase:

```diff
<ClerkProvider
appearance={{
- layout: {
+ options: {
socialButtonsPlacement: 'bottom',
socialButtonsVariant: 'iconButton',
}
}}
>
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: 'Unstable billing props removed'
matcher:
- '__unstable_manageBillingUrl'
- '__unstable_manageBillingLabel'
- '__unstable_manageBillingMembersLimit'
category: 'deprecation-removal'
---

The following unstable properties have been removed. If you were relying on these, please reach out to support.

- `__unstable_manageBillingUrl`
- `__unstable_manageBillingLabel`
- `__unstable_manageBillingMembersLimit`
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
title: '`useCheckout` and `Clerk.checkout()` return value changed'
matcher:
- 'useCheckout'
- 'Clerk\\.checkout'
- '\.checkout\('
category: 'breaking'
---

The return values of `useCheckout` hook and `Clerk.checkout()` have been updated.

### React Hook

```diff
- const { id, plan, status, start, confirm, paymentSource } = useCheckout({ planId: "xxx", planPeriod: "annual" });
+ const { checkout, errors, fetchStatus } = useCheckout({ planId: "xxx", planPeriod: "annual" });
+ // Access properties via checkout object
+ checkout.plan
+ checkout.status
+ checkout.start()
+ checkout.confirm()
```

### Vanilla JS

```diff
- const { getState, subscribe, confirm, start, clear, finalize } = Clerk.checkout({ planId: "xxx", planPeriod: "annual" });
- getState().isStarting
- getState().checkout
+ const { checkout, errors, fetchStatus } = Clerk.checkout({ planId: "xxx", planPeriod: "annual" });
+ checkout.plan
+ checkout.status
+ checkout.start()
+ checkout.confirm()
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
title: '`@clerk/types` deprecated in favor of `@clerk/shared/types`'
matcher: "from\\s+['\"]@clerk/types['\"]"
category: 'deprecation'
warning: true
---

The `@clerk/types` package is deprecated. All type definitions have been consolidated into `@clerk/shared/types`.

Update your imports:

```diff
- import type { ClerkResource, UserResource } from '@clerk/types';
+ import type { ClerkResource, UserResource } from '@clerk/shared/types';
```

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`.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: '`Client.activeSessions` removed'
matcher: '\\.activeSessions'
category: 'deprecation-removal'
---

The `activeSessions` property has been removed from the `Client` object. Use `sessions` instead:

```diff
- const sessions = client.activeSessions;
+ const sessions = client.sessions;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
title: '`colorRing` and `colorModalBackdrop` now render at full opacity'
matcher:
- 'colorRing'
- 'colorModalBackdrop'
category: 'breaking'
warning: true
---

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.

If you were relying on the previous behavior, you may need to adjust your color values to include the desired opacity:

```diff
appearance={{
variables: {
- colorRing: '#6366f1',
+ colorRing: 'rgba(99, 102, 241, 0.15)',
}
}}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
title: 'Legacy redirect props removed'
matcher:
- 'afterSignInUrl'
- 'afterSignUpUrl'
- 'afterSignOutUrl'
- 'redirectUrl'
category: 'deprecation-removal'
---

The legacy redirect props `afterSignInUrl`, `afterSignUpUrl`, and `redirectUrl` have been removed from components. Use the newer redirect options:

```diff
<SignIn
- afterSignInUrl="/dashboard"
- afterSignUpUrl="/onboarding"
+ fallbackRedirectUrl="/dashboard"
+ signUpFallbackRedirectUrl="/onboarding"
/>
```

For forced redirects that ignore the `redirect_url` query parameter:

```diff
<SignIn
+ forceRedirectUrl="/dashboard"
+ signUpForceRedirectUrl="/onboarding"
/>
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
title: 'Experimental method prefix standardized to `__experimental_`'
matcher:
- 'experimental__'
- 'experimental_'
category: 'breaking'
---

All experimental methods now use the `__experimental_` prefix consistently. Update any references:

```diff
- experimental__someMethod
+ __experimental_someMethod

- experimental_someMethod
+ __experimental_someMethod
```
24 changes: 24 additions & 0 deletions packages/upgrade/src/versions/core-3/changes/expo-min-version.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
title: 'Minimum Expo version increased to 53'
packages: ['expo']
matcher: "expo\":\\s*\"(?:^|~|>|=|\\s)*(?:50|51|52)\\..*?"
matcherFlags: 'm'
category: 'version'
---

Support for Expo 50, 51, and 52 has been dropped. Update your project to Expo 53 or later:

```diff
{
"dependencies": {
- "expo": "~52.0.0",
+ "expo": "~53.0.0",
}
}
```

Run the Expo upgrade command:

```bash
npx expo install expo@latest
```
15 changes: 15 additions & 0 deletions packages/upgrade/src/versions/core-3/changes/hide-slug-removed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: '`hideSlug` prop removed'
matcher: 'hideSlug'
category: 'deprecation-removal'
---

The `hideSlug` prop has been removed. Organization slugs are now managed through the Clerk Dashboard under Organization Settings.

```diff
<OrganizationProfile
- hideSlug={true}
/>
```

To hide organization slugs, update your settings in the Clerk Dashboard β†’ Organization Settings β†’ Slug.
17 changes: 17 additions & 0 deletions packages/upgrade/src/versions/core-3/changes/min-node-version.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
title: 'Upgrade Node.js to v20.9.0 or higher'
category: 'version'
matcher: "engines\":\\s*{[\\s\\S]*?\"node\":\\s*\"(?:^|~|>|=|\\s)*(?:14|16|18)\\..*?"
matcherFlags: 'm'
---

All Clerk packages now require Node.js 20.9.0 or later. Update your Node.js version and ensure your `package.json` engines field reflects this requirement.

```diff
{
"engines": {
- "node": ">=18.0.0"
+ "node": ">=20.9.0"
}
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
title: 'Encryption key required when passing `secretKey` at runtime'
packages: ['nextjs']
matcher: 'clerkMiddleware\([\\s\\S]*?secretKey'
matcherFlags: 'm'
category: 'breaking'
---

When passing `secretKey` as a runtime option to `clerkMiddleware()`, you must now also provide a `CLERK_ENCRYPTION_KEY` environment variable.

Add the encryption key to your environment:

```env
CLERK_ENCRYPTION_KEY=your-encryption-key
```

More information: https://clerk.com/docs/reference/nextjs/clerk-middleware#dynamic-keys
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟑 Minor

Wrap the bare URL in markdown link syntax.

The bare URL on line 17 violates the MD034 (no-bare-urls) markdownlint rule. Wrap the URL in markdown link syntax or angle brackets for proper formatting.

Apply this diff to fix the bare URL:

-More information: https://clerk.com/docs/reference/nextjs/clerk-middleware#dynamic-keys
+More information: [Clerk middleware documentation](https://clerk.com/docs/reference/nextjs/clerk-middleware#dynamic-keys)

Alternatively, wrap it in angle brackets:

-More information: https://clerk.com/docs/reference/nextjs/clerk-middleware#dynamic-keys
+More information: <https://clerk.com/docs/reference/nextjs/clerk-middleware#dynamic-keys>
πŸ“ Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
More information: https://clerk.com/docs/reference/nextjs/clerk-middleware#dynamic-keys
More information: [Clerk middleware documentation](https://clerk.com/docs/reference/nextjs/clerk-middleware#dynamic-keys)
Suggested change
More information: https://clerk.com/docs/reference/nextjs/clerk-middleware#dynamic-keys
More information: <https://clerk.com/docs/reference/nextjs/clerk-middleware#dynamic-keys>
🧰 Tools
πŸͺ› markdownlint-cli2 (0.18.1)

17-17: Bare URL used

(MD034, no-bare-urls)

πŸ€– Prompt for AI Agents
In
packages/upgrade/src/versions/core-3/changes/nextjs-encryption-key-required.md
around line 17, the bare URL
"https://clerk.com/docs/reference/nextjs/clerk-middleware#dynamic-keys" violates
MD034; wrap it using markdown link syntax like [More
information](https://clerk.com/docs/reference/nextjs/clerk-middleware#dynamic-keys)
or enclose it in angle brackets
<https://clerk.com/docs/reference/nextjs/clerk-middleware#dynamic-keys> to fix
the lint error and update the file accordingly.

Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
title: '`getAuth()` helper removed'
packages: ['nuxt']
matcher: 'getAuth\\('
category: 'deprecation-removal'
---

The deprecated `getAuth()` helper has been removed. Use `event.context.auth()` in your server routes instead:

```diff
- import { getAuth } from '@clerk/nuxt/server';

export default defineEventHandler((event) => {
- const { userId } = getAuth(event);
+ const { userId } = event.context.auth();

return {
userId,
};
});
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
title: 'Routing strategy now defaults to `path`'
packages: ['nuxt']
matcher:
- '<SignIn'
- '<SignUp'
- '<UserProfile'
- '<OrganizationProfile'
- '<CreateOrganization'
- '<OrganizationList'
category: 'behavior-change'
warning: true
---

The following components now default to `path` routing strategy instead of `hash`:

- `<SignIn />`
- `<SignUp />`
- `<UserProfile />`
- `<OrganizationProfile />`
- `<CreateOrganization />`
- `<OrganizationList />`

If you were relying on the previous `hash` routing behavior, explicitly set the routing prop:

```vue
<SignIn routing="hash" />
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: '`samlAccount` renamed to `enterpriseAccount`'
matcher: 'samlAccount'
category: 'deprecation-removal'
---

The `samlAccount` property has been renamed to `enterpriseAccount`. Update your code:

```diff
- user.samlAccounts
+ user.enterpriseAccounts

- verification.samlAccount
+ verification.enterpriseAccount
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: '`saml` strategy renamed to `enterprise_sso`'
matcher: 'saml'
category: 'deprecation-removal'
---

The `saml` authentication strategy has been renamed to `enterprise_sso`. Update any references in your code:

```diff
- strategy: 'saml'
+ strategy: 'enterprise_sso'
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
title: '`setActive({ beforeEmit })` changed to `setActive({ navigate })`'
matcher: 'beforeEmit'
category: 'deprecation-removal'
---

The `beforeEmit` callback in `setActive()` has been replaced with `navigate`. The callback signature has also changed:

```diff
await setActive({
session: sessionId,
- beforeEmit: () => {
- // Called before session is set
- }
+ navigate: ({ session }) => {
+ // Called with the session object
+ return '/dashboard';
+ }
});
```

The `navigate` callback receives an object with the `session` property and should return the URL to navigate to.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
title: '`showOptionalFields` now defaults to `false`'
matcher: 'showOptionalFields'
category: 'behavior-change'
warning: true
---

The default value of `appearance.layout.showOptionalFields` (now `appearance.options.showOptionalFields`) has changed from `true` to `false`. Optional fields are now hidden by default during sign up.

To restore the previous behavior, explicitly set the option:

```jsx
<ClerkProvider
appearance={{
options: {
showOptionalFields: true,
}
}}
>
```
Loading
Loading