@clerk/upgrade 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app.js +20 -12
- package/dist/cli.js +17 -11
- package/dist/scan.js +59 -18
- package/dist/util/expandable-list.js +5 -4
- package/dist/util/generate-changelog.js +1 -1
- package/dist/util/generate-export-change.js +0 -3
- package/dist/util/guess-framework.js +47 -11
- package/dist/util/load-change.js +1 -1
- package/dist/versions/v5/backend/api-url-value-changed.md +1 -0
- package/dist/versions/v5/backend/clerk-import.md +2 -2
- package/dist/versions/v5/backend/createclerkclient-frontendapi.md +1 -1
- package/dist/versions/v5/backend/pkgversion.md +3 -3
- package/dist/versions/v5/common/afterswitchorganizationurl.md +3 -6
- package/dist/versions/v5/common/getorganizationinvitationlist-return-type-change.md +14 -0
- package/dist/versions/v5/common/getorganizationlist-return-type-change.md +14 -0
- package/dist/versions/v5/common/getorganizationmembershiplist-return-type-change.md +14 -0
- package/dist/versions/v5/common/getroles-pagination.md +15 -0
- package/dist/versions/v5/common/handlemagiclinkverification.md +1 -1
- package/dist/versions/v5/common/min-react-version.md +6 -0
- package/dist/versions/v5/common/navigate-to-routerpush-routerreplace.md +8 -6
- package/dist/versions/v5/common/organization-getdomains-arguments-change.md +1 -6
- package/dist/versions/v5/common/organization-getinvitations-arguments-changed.md +15 -0
- package/dist/versions/v5/common/organization-getmembershiprequests-arguments-changed.md +1 -6
- package/dist/versions/v5/common/organization-getmemberships-arguments-changed.md +15 -0
- package/dist/versions/v5/common/organization-getroles-arguments-changed.md +1 -6
- package/dist/versions/v5/common/setsession.md +1 -0
- package/dist/versions/v5/common/usemagiclink.md +1 -1
- package/dist/versions/v5/common/user-getorganizationinvitations-arguments-chanaged.md +15 -0
- package/dist/versions/v5/common/user-getorganizationmemberships-arguments-chanaged.md +15 -0
- package/dist/versions/v5/common/user-getorganizationsuggestions-arguments-chanaged.md +15 -0
- package/dist/versions/v5/common/userprofile-prop.md +6 -1
- package/dist/versions/v5/expo/clerkprovider-frontendapi.md +4 -7
- package/dist/versions/v5/fastify/api-url-value-change.md +3 -1
- package/dist/versions/v5/fastify/clerk-import-change.md +12 -0
- package/dist/versions/v5/fastify/clerkplugin-frontendapi.md +3 -6
- package/dist/versions/v5/fastify/createclerkclient-apikey.md +4 -7
- package/dist/versions/v5/fastify/createclerkclient-frontendapi.md +4 -7
- package/dist/versions/v5/gatsby/api-url-value-change.md +3 -1
- package/dist/versions/v5/gatsby/clerk-import-change.md +12 -0
- package/dist/versions/v5/gatsby/createclerkclient-apikey.md +4 -7
- package/dist/versions/v5/gatsby/createclerkclient-frontendapi.md +4 -7
- package/dist/versions/v5/index.js +8 -8
- package/dist/versions/v5/js/organization-create-string.md +3 -6
- package/dist/versions/v5/js/organization-getdomains-arguments-change.md +1 -6
- package/dist/versions/v5/js/organization-getinvitations-arguments-changed.md +1 -6
- package/dist/versions/v5/js/organization-getmembershiprequests-arguments-changed.md +1 -6
- package/dist/versions/v5/js/organization-getmemberships-arguments-changed.md +1 -6
- package/dist/versions/v5/js/organization-getpendinginvitations.md +3 -6
- package/dist/versions/v5/js/organization-getroles-arguments-changed.md +1 -6
- package/dist/versions/v5/js/redirecttohome.md +1 -1
- package/dist/versions/v5/js/router-navigate-push-replace.md +18 -0
- package/dist/versions/v5/js/signup-attemptweb3walletverification-generatedsignature.md +2 -1
- package/dist/versions/v5/js/user-createexternalaccount-redirecturl.md +1 -1
- package/dist/versions/v5/js/user-getorganizationinvitations-arguments-chanaged.md +1 -6
- package/dist/versions/v5/js/user-getorganizationmemberships-arguments-chanaged.md +1 -6
- package/dist/versions/v5/js/user-getorganizationsuggestions-arguments-chanaged.md +1 -6
- package/dist/versions/v5/js/user-update-password.md +1 -1
- package/dist/versions/v5/next/api-url-value-change.md +1 -0
- package/dist/versions/v5/next/auth-import-change.md +1 -1
- package/dist/versions/v5/next/authmiddleware-frontendapi.md +7 -2
- package/dist/versions/v5/next/constants-import-change.md +1 -1
- package/dist/versions/v5/next/createclerkclient-apikey.md +3 -6
- package/dist/versions/v5/next/createclerkclient-frontendapi.md +3 -6
- package/dist/versions/v5/next/getauth-apikey.md +5 -2
- package/dist/versions/v5/next/import-nextjs-api.md +0 -2
- package/dist/versions/v5/next/min-nextjs-version.md +9 -0
- package/dist/versions/v5/next/redirect-import-change.md +1 -1
- package/dist/versions/v5/next/redirecttosignin-import-path.md +12 -0
- package/dist/versions/v5/next/redirecttosignin-removed.md +6 -0
- package/dist/versions/v5/next/redirecttosignup-import-path.md +12 -0
- package/dist/versions/v5/next/redirecttosignup-removed.md +6 -0
- package/dist/versions/v5/next/with-clerk-middleware-removed.md +2 -2
- package/dist/versions/v5/node/api-url-value-change.md +4 -2
- package/dist/versions/v5/node/cjs-esm-instance.md +6 -9
- package/dist/versions/v5/node/clerk-import-change.md +12 -0
- package/dist/versions/v5/node/clerkexpressrequireauth-apikey.md +4 -7
- package/dist/versions/v5/node/clerkexpressrequireauth-frontendapi.md +4 -7
- package/dist/versions/v5/node/clerkexpresswithauth-apikey.md +4 -7
- package/dist/versions/v5/node/clerkexpresswithauth-frontendapi.md +4 -7
- package/dist/versions/v5/node/createclerkclient-apikey.md +4 -7
- package/dist/versions/v5/node/createclerkclient-frontendapi.md +4 -7
- package/dist/versions/v5/node/createclerkexpressrequireauth-apikey.md +4 -7
- package/dist/versions/v5/node/createclerkexpressrequireauth-frontendapi.md +4 -7
- package/dist/versions/v5/node/createclerkexpresswithauth-apikey.md +4 -7
- package/dist/versions/v5/node/createclerkexpresswithauth-frontendapi.md +4 -7
- package/dist/versions/v5/node/legacyauthobject-removed.md +6 -6
- package/dist/versions/v5/node/setclerkapikey.md +4 -6
- package/dist/versions/v5/node/setclerkapiversion.md +4 -6
- package/dist/versions/v5/node/setclerkhttpoptions.md +4 -6
- package/dist/versions/v5/node/setclerkserverapiurl.md +7 -9
- package/dist/versions/v5/react/api-url-value-change.md +3 -1
- package/dist/versions/v5/remix/clerk-import-change.md +12 -0
- package/dist/versions/v5/remix/clerkerrorboundary-removed.md +1 -0
- package/package.json +50 -61
- package/dist/test.js +0 -100
- package/dist/util/test.js +0 -100
- package/dist/versions/v5/backend/return-signature-change.md +0 -14
- package/dist/versions/v5/common/aftersigninouturl-behavior-change.md +0 -7
- package/dist/versions/v5/common/aftersigninurl-behavior-change +0 -7
- package/dist/versions/v5/common/aftersigninurl-behavior-change.md +0 -7
- package/dist/versions/v5/common/clerkprovider-frontendapi.md +0 -7
- package/dist/versions/v5/common/external-account-avatarurl.md +0 -7
- package/dist/versions/v5/common/multi-session-ui-changes.md +0 -0
- package/dist/versions/v5/common/organization-getroles-return-type.md +0 -0
- package/dist/versions/v5/common/organizationprofile-general.md +0 -0
- package/dist/versions/v5/common/userbuttonpopoveractionbuttontext.md +0 -7
- package/dist/versions/v5/common/withuser-removed.md +0 -16
- package/dist/versions/v5/js/aftersigninout-behavior-change.md +0 -7
- package/dist/versions/v5/js/aftersigninouturl-behavior-change.md +0 -7
- package/dist/versions/v5/js/aftersigninurl-behavior-change.md +0 -0
- package/dist/versions/v5/js/afterswitchorganizationurl.md +0 -15
- package/dist/versions/v5/js/appearance-organizationpreview-organizationswitcher.md +0 -8
- package/dist/versions/v5/js/useorganization-invitationlist.md +0 -25
- package/dist/versions/v5/js/useorganization-membershiplist.md +0 -24
- package/dist/versions/v5/js/useorganizations.md +0 -26
- package/dist/versions/v5/js/user-getorganizationmemberships-arguments-chanaged +0 -0
- package/dist/versions/v5/js/userprofile-prop.md +0 -7
- package/dist/versions/v5/next/verify +0 -0
- package/dist/versions/v5/next/withclerk-removed.md +0 -15
- package/dist/versions/v5/next/withsession-removed.md +0 -15
- package/dist/versions/v5/next/withuser-removed.md +0 -0
- package/dist/versions/v5/node/package-rename.md +0 -6
- package/dist/versions/v5/react/afterswitchorganizationurl.md +0 -15
- package/dist/versions/v5/react/appearance-organizationpreview-organizationswitcher.md +0 -8
- package/dist/versions/v5/react/signoutcallback-to- +0 -0
- package/dist/versions/v5/react/signoutcallback-to-redirecturl.md +0 -22
- package/dist/versions/v5/react/useorganization-invitationlist.md +0 -25
- package/dist/versions/v5/react/useorganization-membershiplist.md +0 -24
- package/dist/versions/v5/react/useorganizations.md +0 -26
- package/dist/versions/v5/react/userprofile-prop.md +0 -7
- package/dist/versions/v5/remix/clerkprovider-frontendapi.md +0 -0
- package/dist/versions/v5/shared/buildrequesturl.md +0 -12
- /package/dist/versions/v5/backend/{signjwt-import-path-move → clerkoptions-type.md} +0 -0
- /package/dist/versions/v5/backend/{decodeJwt-import-path-move.md → decodejwt-import-path-move.md} +0 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Upgrade nextjs to v13 or higher'
|
|
3
|
+
matcher: "dependencies\":\\s*{[\\s\\S]*?\"next\":\\s*\"(?:^|~|>|=|\\s)*(?:10|11|12)\\..*?"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
If you're using `@clerk/nextjs`, you will need to update your Next.js project to `13.0.4` or later. Check out Next's upgrade guides for help:
|
|
7
|
+
|
|
8
|
+
- [Upgrading from 12 to 13](https://nextjs.org/docs/pages/building-your-application/upgrading/version-13)
|
|
9
|
+
- [Upgrading from 13 to 14](https://nextjs.org/docs/app/building-your-application/upgrading/version-14)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: '`redirect` import moved under `/server`'
|
|
3
|
-
matcher: "import\\s+{[\\s\\S]*?redirect[\\s\\S]*?from\\s+['\"]@clerk\\/(nextjs)[\\s\\S]*?['\"]"
|
|
3
|
+
matcher: "import\\s+{[\\s\\S]*?[,\\s]redirect[,\\s][\\s\\S]*?from\\s+['\"]@clerk\\/(nextjs)[\\s\\S]*?['\"]"
|
|
4
4
|
matcherFlags: 'm'
|
|
5
5
|
replaceWithString: 'nextjs/server'
|
|
6
6
|
---
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: '`redirectToSignIn` import moved under `/server/'
|
|
3
|
+
matcher: "import\\s+{[\\s\\S]*?[,\\s]redirectToSignIn[,\\s][\\s\\S]*?from\\s+['\"]@clerk\\/(nextjs)[\\s\\S]*?['\"]"
|
|
4
|
+
replaceWithString: 'nextjs/server'
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
The `redirectToSignIn` import path has changed from `@clerk/nextjs` to `@clerk/nextjs/server`, as this is a helper that should be only used on the server side. You must update your import path in order for it to work correctly. Example below of the fix that needs to be made:
|
|
8
|
+
|
|
9
|
+
```diff
|
|
10
|
+
- import { redirectToSignIn } from "@clerk/nextjs"
|
|
11
|
+
+ import { redirectToSignIn } from "@clerk/nextjs/server"
|
|
12
|
+
```
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: '`redirectToSignUp` import path changed'
|
|
3
|
+
matcher: "import\\s+{[\\s\\S]*?[,\\s]redirectToSignUp[,\\s][\\s\\S]*?from\\s+['\"]@clerk\\/(nextjs)[\\s\\S]*?['\"]"
|
|
4
|
+
replaceWithString: 'nextjs/server'
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
The `redirectToSignUp` import path has changed from `@clerk/nextjs` to `@clerk/nextjs/server`, as this is a helper that should be only used on the server side. You must update your import path in order for it to work correctly. Example below of the fix that needs to be made:
|
|
8
|
+
|
|
9
|
+
```diff
|
|
10
|
+
- import { redirectToSignUp } from "@clerk/nextjs"
|
|
11
|
+
+ import { redirectToSignUp } from "@clerk/nextjs/server"
|
|
12
|
+
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: 'withClerkMiddleware removed'
|
|
3
|
-
matcher:
|
|
2
|
+
title: '`withClerkMiddleware` removed'
|
|
3
|
+
matcher: "withClerkMiddleware\\("
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
`withClerkMiddleware` has been deprecated and is now removed in v5. We recommend moving to `clerkMiddleware` instead. Here’s an example of how the code would look before and after:
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: '`API_URL` value has changed'
|
|
3
|
-
matcher: "API_URL
|
|
3
|
+
matcher: "import\\s+{[\\s\\S]*?[,\\s]API_URL[,\\s][\\s\\S]*?from\\s+['\"]@clerk\\/clerk-sdk-node[\\s\\S]*?['\"]"
|
|
4
|
+
matcherFlags: 'm'
|
|
5
|
+
warning: true
|
|
4
6
|
---
|
|
5
7
|
|
|
6
|
-
|
|
8
|
+
The value of this export has changed from `https://api.clerk.dev` to `https://api.clerk.com`. If you were relying on the text content of this value not changing, you may need to make adjustments.
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: '`cjs/instance` and `esm/instance` imports no longer needed'
|
|
3
|
-
matcher: "@clerk\\/clerk-sdk-node\\/(?:cjs|esm)\\/instance"
|
|
4
|
-
replaceWithString: '
|
|
3
|
+
matcher: "@clerk\\/clerk-sdk-node(\\/(?:cjs|esm)\\/instance)"
|
|
4
|
+
replaceWithString: ''
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
If you are using either of these import paths, they are no longer necessary and you can import directly from the top level `@clerk/express` path.
|
|
8
8
|
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
import { ... } from "@clerk/clerk-sdk-node/
|
|
12
|
-
import { ... } from "@clerk/clerk-sdk-node
|
|
13
|
-
|
|
14
|
-
// after
|
|
15
|
-
import { ... } from "@clerk/clerk-sdk-node";
|
|
9
|
+
```diff
|
|
10
|
+
- import { ... } from "@clerk/clerk-sdk-node/esm/instance";
|
|
11
|
+
- import { ... } from "@clerk/clerk-sdk-node/cjs/instance";
|
|
12
|
+
+ import { ... } from "@clerk/clerk-sdk-node";
|
|
16
13
|
```
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: '`Clerk` -> `{ createClerkClient }`'
|
|
3
|
+
matcher: "import\\s+{[\\s\\S]*?[,\\s]Clerk[,\\s][\\s\\S]*?from\\s+['\"]@clerk\\/clerk-sdk-node[\\s\\S]*?['\"]"
|
|
4
|
+
matcherFlags: 'm'
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
The `Clerk` default import has changed to `createClerkClient` and been moved to a named import rather than default. You must update your import path in order for it to work correctly. Example below of the fix that needs to be made:
|
|
8
|
+
|
|
9
|
+
```diff
|
|
10
|
+
- import Clerk from "@clerk/clerk-sdk-node"
|
|
11
|
+
+ import { createClerkClient } from "@clerk/clerk-sdk-node"
|
|
12
|
+
```
|
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: '`apiKey` -> `secretKey` as param to ClerkExpressRequireAuth'
|
|
3
|
-
matcher: "ClerkExpressRequireAuth\\(
|
|
3
|
+
matcher: "ClerkExpressRequireAuth\\([\\s\\S]*?apiKey:[\\s\\S]*?\\)"
|
|
4
4
|
matcherFlags: 'm'
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
The `apiKey` argument passed to `ClerkExpressRequireAuth` must be changed to `secretKey`.
|
|
8
8
|
|
|
9
|
-
```
|
|
9
|
+
```diff
|
|
10
10
|
import { ClerkExpressRequireAuth } from '@clerk/clerk-sdk-node';
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
ClerkExpressRequireAuth({
|
|
14
|
-
|
|
15
|
-
// after
|
|
16
|
-
ClerkExpressRequireAuth({ secretKey: '...' });
|
|
12
|
+
- ClerkExpressRequireAuth({ apiKey: '...' });
|
|
13
|
+
+ ClerkExpressRequireAuth({ secretKey: '...' });
|
|
17
14
|
```
|
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: '`frontendApi` -> `publishableKey` as param to ClerkExpressRequireAuth'
|
|
3
|
-
matcher: "ClerkExpressRequireAuth\\(
|
|
3
|
+
matcher: "ClerkExpressRequireAuth\\([\\s\\S]*?frontendApi:[\\s\\S]*?\\)"
|
|
4
4
|
matcherFlags: 'm'
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
The `frontendApi` argument passed to `ClerkExpressRequireAuth` must be changed to `publishableKey`. Note that the values of the two keys are different, so both keys and values need to be changed. You can find your application's publishable key in the Clerk dashboard.
|
|
8
8
|
|
|
9
|
-
```
|
|
9
|
+
```diff
|
|
10
10
|
import { ClerkExpressRequireAuth } from '@clerk/clerk-sdk-node';
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
ClerkExpressRequireAuth({
|
|
14
|
-
|
|
15
|
-
// after
|
|
16
|
-
ClerkExpressRequireAuth({ publishableKey: '...' });
|
|
12
|
+
- ClerkExpressRequireAuth({ frontendApi: '...' });
|
|
13
|
+
+ ClerkExpressRequireAuth({ publishableKey: '...' });
|
|
17
14
|
```
|
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: '`apiKey` -> `secretKey` as param to ClerkExpressWithAuth'
|
|
3
|
-
matcher: "ClerkExpressWithAuth\\(
|
|
3
|
+
matcher: "ClerkExpressWithAuth\\([\\s\\S]*?apiKey:[\\s\\S]*?\\)"
|
|
4
4
|
matcherFlags: 'm'
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
The `apiKey` argument passed to `ClerkExpressWithAuth` must be changed to `secretKey`.
|
|
8
8
|
|
|
9
|
-
```
|
|
9
|
+
```diff
|
|
10
10
|
import { ClerkExpressWithAuth } from '@clerk/clerk-sdk-node';
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
ClerkExpressWithAuth({
|
|
14
|
-
|
|
15
|
-
// after
|
|
16
|
-
ClerkExpressWithAuth({ secretKey: '...' });
|
|
12
|
+
- ClerkExpressWithAuth({ apiKey: '...' });
|
|
13
|
+
+ ClerkExpressWithAuth({ secretKey: '...' });
|
|
17
14
|
```
|
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: '`frontendApi` -> `publishableKey` as param to ClerkExpressWithAuth'
|
|
3
|
-
matcher: "ClerkExpressWithAuth\\(
|
|
3
|
+
matcher: "ClerkExpressWithAuth\\([\\s\\S]*?frontendApi:[\\s\\S]*?\\)"
|
|
4
4
|
matcherFlags: 'm'
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
The `frontendApi` argument passed to `ClerkExpressWithAuth` must be changed to `publishableKey`. Note that the values of the two keys are different, so both keys and values need to be changed. You can find your application's publishable key in the Clerk dashboard.
|
|
8
8
|
|
|
9
|
-
```
|
|
9
|
+
```diff
|
|
10
10
|
import { ClerkExpressWithAuth } from '@clerk/clerk-sdk-node';
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
ClerkExpressWithAuth({
|
|
14
|
-
|
|
15
|
-
// after
|
|
16
|
-
ClerkExpressWithAuth({ publishableKey: '...' });
|
|
12
|
+
- ClerkExpressWithAuth({ frontendApi: '...' });
|
|
13
|
+
+ ClerkExpressWithAuth({ publishableKey: '...' });
|
|
17
14
|
```
|
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: '`apiKey` -> `secretKey` as param to createClerkClient'
|
|
3
|
-
matcher: "createClerkClient\\(
|
|
3
|
+
matcher: "createClerkClient\\([\\s\\S]*?apiKey:[\\s\\S]*?\\)"
|
|
4
4
|
matcherFlags: 'm'
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
The `apiKey` argument passed to `createClerkClient` must be changed to `secretKey`.
|
|
8
8
|
|
|
9
|
-
```
|
|
9
|
+
```diff
|
|
10
10
|
import { createClerkClient } from '@clerk/clerk-sdk-node';
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
createClerkClient({
|
|
14
|
-
|
|
15
|
-
// after
|
|
16
|
-
createClerkClient({ secretKey: '...' });
|
|
12
|
+
- createClerkClient({ apiKey: '...' });
|
|
13
|
+
+ createClerkClient({ secretKey: '...' });
|
|
17
14
|
```
|
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: '`frontendApi` -> `publishableKey` as param to createClerkClient'
|
|
3
|
-
matcher: "createClerkClient\\(
|
|
3
|
+
matcher: "createClerkClient\\([\\s\\S]*?frontendApi:[\\s\\S]*?\\)"
|
|
4
4
|
matcherFlags: 'm'
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
The `frontendApi` argument passed to `createClerkClient` must be changed to `publishableKey`. Note that the values of the two keys are different, so both keys and values need to be changed. You can find your application's publishable key in the Clerk dashboard.
|
|
8
8
|
|
|
9
|
-
```
|
|
9
|
+
```diff
|
|
10
10
|
import { createClerkClient } from '@clerk/clerk-sdk-node';
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
createClerkClient({
|
|
14
|
-
|
|
15
|
-
// after
|
|
16
|
-
createClerkClient({ publishableKey: '...' });
|
|
12
|
+
- createClerkClient({ frontendApi: '...' });
|
|
13
|
+
+ createClerkClient({ publishableKey: '...' });
|
|
17
14
|
```
|
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: '`apiKey` -> `secretKey` as param to createClerkExpressRequireAuth'
|
|
3
|
-
matcher: "createClerkExpressRequireAuth\\(
|
|
3
|
+
matcher: "createClerkExpressRequireAuth\\([\\s\\S]*?apiKey:[\\s\\S]*?\\)"
|
|
4
4
|
matcherFlags: 'm'
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
The `apiKey` argument passed to `createClerkExpressRequireAuth` must be changed to `secretKey`.
|
|
8
8
|
|
|
9
|
-
```
|
|
9
|
+
```diff
|
|
10
10
|
import { createClerkExpressRequireAuth } from '@clerk/clerk-sdk-node';
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
createClerkExpressRequireAuth({
|
|
14
|
-
|
|
15
|
-
// after
|
|
16
|
-
createClerkExpressRequireAuth({ secretKey: '...' });
|
|
12
|
+
- createClerkExpressRequireAuth({ apiKey: '...' });
|
|
13
|
+
+ createClerkExpressRequireAuth({ secretKey: '...' });
|
|
17
14
|
```
|
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: '`frontendApi` -> `publishableKey` as param to createClerkExpressRequireAuth'
|
|
3
|
-
matcher: "createClerkExpressRequireAuth\\(
|
|
3
|
+
matcher: "createClerkExpressRequireAuth\\([\\s\\S]*?frontendApi:[\\s\\S]*?\\)"
|
|
4
4
|
matcherFlags: 'm'
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
The `frontendApi` argument passed to `createClerkExpressRequireAuth` must be changed to `publishableKey`. Note that the values of the two keys are different, so both keys and values need to be changed. You can find your application's publishable key in the Clerk dashboard.
|
|
8
8
|
|
|
9
|
-
```
|
|
9
|
+
```diff
|
|
10
10
|
import { createClerkExpressRequireAuth } from '@clerk/clerk-sdk-node';
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
createClerkExpressRequireAuth({
|
|
14
|
-
|
|
15
|
-
// after
|
|
16
|
-
createClerkExpressRequireAuth({ publishableKey: '...' });
|
|
12
|
+
- createClerkExpressRequireAuth({ frontendApi: '...' });
|
|
13
|
+
+ createClerkExpressRequireAuth({ publishableKey: '...' });
|
|
17
14
|
```
|
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: '`apiKey` -> `secretKey` as param to createClerkExpressWithAuth'
|
|
3
|
-
matcher: "createClerkExpressWithAuth\\(
|
|
3
|
+
matcher: "createClerkExpressWithAuth\\([\\s\\S]*?apiKey:[\\s\\S]*?\\)"
|
|
4
4
|
matcherFlags: 'm'
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
The `apiKey` argument passed to `createClerkExpressWithAuth` must be changed to `secretKey`.
|
|
8
8
|
|
|
9
|
-
```
|
|
9
|
+
```diff
|
|
10
10
|
import { createClerkExpressWithAuth } from '@clerk/clerk-sdk-node';
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
createClerkExpressWithAuth({
|
|
14
|
-
|
|
15
|
-
// after
|
|
16
|
-
createClerkExpressWithAuth({ secretKey: '...' });
|
|
12
|
+
- createClerkExpressWithAuth({ apiKey: '...' });
|
|
13
|
+
+ createClerkExpressWithAuth({ secretKey: '...' });
|
|
17
14
|
```
|
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: '`frontendApi` -> `publishableKey` as param to createClerkExpressWithAuth'
|
|
3
|
-
matcher: "createClerkExpressWithAuth\\(
|
|
3
|
+
matcher: "createClerkExpressWithAuth\\([\\s\\S]*?frontendApi:[\\s\\S]*?\\)"
|
|
4
4
|
matcherFlags: 'm'
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
The `frontendApi` argument passed to `createClerkExpressWithAuth` must be changed to `publishableKey`. Note that the values of the two keys are different, so both keys and values need to be changed. You can find your application's publishable key in the Clerk dashboard.
|
|
8
8
|
|
|
9
|
-
```
|
|
9
|
+
```diff
|
|
10
10
|
import { createClerkExpressWithAuth } from '@clerk/clerk-sdk-node';
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
createClerkExpressWithAuth({
|
|
14
|
-
|
|
15
|
-
// after
|
|
16
|
-
createClerkExpressWithAuth({ publishableKey: '...' });
|
|
12
|
+
- createClerkExpressWithAuth({ frontendApi: '...' });
|
|
13
|
+
+ createClerkExpressWithAuth({ publishableKey: '...' });
|
|
17
14
|
```
|
|
@@ -15,12 +15,12 @@ We changed the values that our middleware adds to the `request` object after r
|
|
|
15
15
|
debug: AuthObjectDebug | null;
|
|
16
16
|
- claims: JwtPayload | null;
|
|
17
17
|
- sessionClaims: JwtPayload | null;
|
|
18
|
-
+
|
|
19
|
-
+
|
|
20
|
-
+
|
|
21
|
-
+
|
|
22
|
-
+
|
|
23
|
-
|
|
18
|
+
+ orgId: string | undefined | null;
|
|
19
|
+
+ orgRole: OrganizationCustomRoleKey | undefined | null;
|
|
20
|
+
+ orgSlug: string | undefined | null;
|
|
21
|
+
+ orgPermissions: OrganizationCustomPermissionKey[] | undefined | null;
|
|
22
|
+
+ has: CheckAuthorizationWithCustomPermissions | null;
|
|
23
|
+
}
|
|
24
24
|
```
|
|
25
25
|
|
|
26
26
|
If you were using the `claims` key on the request after running middleware, you will need to instead use `sessionClaims`. Additionally, if you were using the `LooseAuthProp` or `StrictAuthProp` exported types anywhere, note that these have been adjusted to fit the shape of the new middleware response typing.
|
|
@@ -5,13 +5,11 @@ matcher: "setClerkApiKey\\("
|
|
|
5
5
|
|
|
6
6
|
Setters that change options on the singleton `clerkClient` instance have been removed. Instead, pass the option directly to `createClerkClient` - see [the documentation](https://clerk.com/docs/references/nodejs/overview#customizing-resources) for more detail. Note that the name `apiKey` should now be `secretKey` as well.
|
|
7
7
|
|
|
8
|
-
```
|
|
8
|
+
```diff
|
|
9
9
|
import { createClerkClient, setClerkApiKey } from '@clerk/clerk-sdk-node';
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
setClerkApiKey('...');
|
|
11
|
+
- const clerkClient = createClerkClient({ apiKey: '...' });
|
|
12
|
+
- setClerkApiKey('...');
|
|
14
13
|
|
|
15
|
-
|
|
16
|
-
const clerkClient = createClerkClient({ secretKey: '...' });
|
|
14
|
+
+ const clerkClient = createClerkClient({ secretKey: '...' });
|
|
17
15
|
```
|
|
@@ -5,13 +5,11 @@ matcher: "setClerkApiVersion\\("
|
|
|
5
5
|
|
|
6
6
|
Setters that change options on the singleton `clerkClient` instance have been removed. Instead, pass the option directly to `createClerkClient` - see [the documentation](https://clerk.com/docs/references/nodejs/overview#customizing-resources) for more detail.
|
|
7
7
|
|
|
8
|
-
```
|
|
8
|
+
```diff
|
|
9
9
|
import { clerkClient, setClerkApiKey } from '@clerk/clerk-sdk-node';
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
setClerkApiVersion('...');
|
|
11
|
+
- const clerkClient = createClerkClient({ apiKey: '...' });
|
|
12
|
+
- setClerkApiVersion('...');
|
|
14
13
|
|
|
15
|
-
|
|
16
|
-
const clerkClient = createClerkClient({ secretKey: '...', apiVersion: '...' });
|
|
14
|
+
+ const clerkClient = createClerkClient({ secretKey: '...', apiVersion: '...' });
|
|
17
15
|
```
|
|
@@ -5,13 +5,11 @@ matcher: "setClerkHttpOptions\\("
|
|
|
5
5
|
|
|
6
6
|
Setters that change options on the singleton `clerkClient` instance have been removed. Instead, pass the option directly to `createClerkClient` - see [the documentation](https://clerk.com/docs/references/nodejs/overview#customizing-resources) for more detail.
|
|
7
7
|
|
|
8
|
-
```
|
|
8
|
+
```diff
|
|
9
9
|
import { clerkClient, setClerkApiKey } from '@clerk/clerk-sdk-node';
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
setClerkHttpOptions('...');
|
|
11
|
+
- const clerkClient = createClerkClient({ apiKey: '...' });
|
|
12
|
+
- setClerkHttpOptions('...');
|
|
14
13
|
|
|
15
|
-
|
|
16
|
-
const clerkClient = createClerkClient({ secretKey: '...', httpOptions: '...' });
|
|
14
|
+
+ const clerkClient = createClerkClient({ secretKey: '...', httpOptions: '...' });
|
|
17
15
|
```
|
|
@@ -5,16 +5,14 @@ matcher: "setClerkServerApiUrl\\("
|
|
|
5
5
|
|
|
6
6
|
Setters that change options on the singleton `clerkClient` instance have been removed. Instead, pass the option directly to `createClerkClient` - see [the documentation](https://clerk.com/docs/references/nodejs/overview#customizing-resources) for more detail.
|
|
7
7
|
|
|
8
|
-
```
|
|
8
|
+
```diff
|
|
9
9
|
import { clerkClient, setClerkApiKey } from '@clerk/clerk-sdk-node';
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
setClerkServerApiUrl('...');
|
|
11
|
+
- const clerkClient = createClerkClient({ apiKey: '...' });
|
|
12
|
+
- setClerkServerApiUrl('...');
|
|
14
13
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
});
|
|
14
|
+
+ const clerkClient = createClerkClient({
|
|
15
|
+
+ secretKey: '...',
|
|
16
|
+
+ serverApiURL: '...',
|
|
17
|
+
+ });
|
|
20
18
|
```
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: '`API_URL` value has changed'
|
|
3
|
-
matcher: "API_URL
|
|
3
|
+
matcher: "import\\s+{[\\s\\S]*?[,\\s]API_URL[,\\s][\\s\\S]*?from\\s+['\"]@clerk\\/clerk-react[\\s\\S]*?['\"]"
|
|
4
|
+
matcherFlags: 'm'
|
|
5
|
+
warning: true
|
|
4
6
|
---
|
|
5
7
|
|
|
6
8
|
- The value of this export has changed from `https://api.clerk.dev` to `https://api.clerk.com`. If you were relying on the text content of this value not changing, you may need to make adjustments.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: '`Clerk` -> `{ createClerkClient }`'
|
|
3
|
+
matcher: "import\\s+{[\\s\\S]*?[,\\s]Clerk[,\\s][\\s\\S]*?from\\s+['\"]@clerk\\/remix[\\s\\S]*?['\"]"
|
|
4
|
+
matcherFlags: 'm'
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
The `Clerk` default import has changed to `createClerkClient` and been moved to a named import rather than default. You must update your import path in order for it to work correctly. Example below of the fix that needs to be made:
|
|
8
|
+
|
|
9
|
+
```diff
|
|
10
|
+
- import Clerk from "@clerk/remix"
|
|
11
|
+
+ import { createClerkClient } from "@clerk/remix"
|
|
12
|
+
```
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: '`ClerkErrorBoundary` removed'
|
|
3
3
|
matcher: "import\\s+{[\\s\\S]*?ClerkErrorBoundary[\\s\\S]*?from\\s+['\"]@clerk\\/remix[\\s\\S]*?['\"]"
|
|
4
|
+
matcherFlags: 'm'
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
`ClerkErrorBoundary` is no longer needed for correct error handling in remix, so we have removed this function from the remix SDK, and it can be removed from your code as well. Example below:
|
package/package.json
CHANGED
|
@@ -1,63 +1,52 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
"eslint-plugin-react-hooks": "^4.6.0",
|
|
53
|
-
"import-jsx": "^5.0.0",
|
|
54
|
-
"ink-testing-library": "^3.0.0",
|
|
55
|
-
"prettier": "^2.8.7"
|
|
56
|
-
},
|
|
57
|
-
"engines": {
|
|
58
|
-
"node": ">=16"
|
|
59
|
-
},
|
|
60
|
-
"publishConfig": {
|
|
61
|
-
"access": "public"
|
|
62
|
-
}
|
|
2
|
+
"name": "@clerk/upgrade",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/cli.js",
|
|
7
|
+
"bin": "dist/cli.js",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist"
|
|
10
|
+
],
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build": "npm run clean && NODE_ENV=production babel --out-dir=dist source --copy-files",
|
|
13
|
+
"clean": "del-cli dist/*",
|
|
14
|
+
"dev": "babel --out-dir=dist --watch source --copy-files"
|
|
15
|
+
},
|
|
16
|
+
"babel": {
|
|
17
|
+
"presets": [
|
|
18
|
+
"@babel/preset-react"
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@inkjs/ui": "^1.0.0",
|
|
23
|
+
"@jescalan/ink-markdown": "^2.0.0",
|
|
24
|
+
"globby": "^14.0.0",
|
|
25
|
+
"gray-matter": "^4.0.3",
|
|
26
|
+
"index-to-position": "^0.1.2",
|
|
27
|
+
"ink": "^4.4.1",
|
|
28
|
+
"ink-big-text": "^2.0.0",
|
|
29
|
+
"ink-gradient": "^3.0.0",
|
|
30
|
+
"ink-link": "^3.0.0",
|
|
31
|
+
"marked": "^11.1.1",
|
|
32
|
+
"md5": "^2.3.0",
|
|
33
|
+
"meow": "^11.0.0",
|
|
34
|
+
"react": "^18.2.0",
|
|
35
|
+
"read-pkg": "^9.0.1",
|
|
36
|
+
"semver-regex": "^4.0.5",
|
|
37
|
+
"temp-dir": "^3.0.0"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@babel/cli": "^7.21.0",
|
|
41
|
+
"@babel/preset-react": "^7.18.6",
|
|
42
|
+
"chalk": "^5.2.0",
|
|
43
|
+
"del-cli": "^5.1.0",
|
|
44
|
+
"eslint-config-custom": "*"
|
|
45
|
+
},
|
|
46
|
+
"engines": {
|
|
47
|
+
"node": ">=18.17.0"
|
|
48
|
+
},
|
|
49
|
+
"publishConfig": {
|
|
50
|
+
"access": "public"
|
|
51
|
+
}
|
|
63
52
|
}
|