@clerk/upgrade 0.0.1

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.
Files changed (120) hide show
  1. package/README.md +25 -0
  2. package/dist/app.js +136 -0
  3. package/dist/cli.js +50 -0
  4. package/dist/constants/sdks.js +46 -0
  5. package/dist/constants/versions.js +7 -0
  6. package/dist/scan.js +103 -0
  7. package/dist/test.js +100 -0
  8. package/dist/util/expandable-list.js +143 -0
  9. package/dist/util/generate-changelog.js +28 -0
  10. package/dist/util/get-clerk-version.js +7 -0
  11. package/dist/util/guess-framework.js +22 -0
  12. package/dist/util/load-change.js +31 -0
  13. package/dist/util/step-sequencer.js +31 -0
  14. package/dist/util/test.js +100 -0
  15. package/dist/versions/v5/backend/clerk-import.md +15 -0
  16. package/dist/versions/v5/backend/clockskewinseconds.md +7 -0
  17. package/dist/versions/v5/backend/createclerkclient-apikey.md +21 -0
  18. package/dist/versions/v5/backend/createclerkclient-frontendapi.md +21 -0
  19. package/dist/versions/v5/backend/externalaccount-picture.md +0 -0
  20. package/dist/versions/v5/backend/externalaccountjson-avatarurl.md +0 -0
  21. package/dist/versions/v5/backend/getpendingorganizationinvitationlist.md +12 -0
  22. package/dist/versions/v5/backend/organization-logourl.md +0 -0
  23. package/dist/versions/v5/backend/organizationjson-logourl.md +0 -0
  24. package/dist/versions/v5/backend/organizationmembershippublicuserdata-profileimageurl.md +0 -0
  25. package/dist/versions/v5/backend/organizationmembershippublicuserdatajson-profileimageurl.md +0 -0
  26. package/dist/versions/v5/backend/pkgversion.md +0 -0
  27. package/dist/versions/v5/backend/user-profileimageurl.md +0 -0
  28. package/dist/versions/v5/backend/userjson-profileimageurl.md +0 -0
  29. package/dist/versions/v5/chromeExtension/clerkprovider-tokencache.md +26 -0
  30. package/dist/versions/v5/common/api-key-to-secret-key.md +6 -0
  31. package/dist/versions/v5/common/clerkprovider-frontendapi.md +7 -0
  32. package/dist/versions/v5/common/frontend-api-to-publishable-key.md +6 -0
  33. package/dist/versions/v5/common/handlemagiclinkverification.md +7 -0
  34. package/dist/versions/v5/common/ismagiclinkerror.md +7 -0
  35. package/dist/versions/v5/common/magiclinkerror.md +7 -0
  36. package/dist/versions/v5/common/magiclinkerrorcode.md +7 -0
  37. package/dist/versions/v5/common/navigate-to-routerpush-routerreplace.md +16 -0
  38. package/dist/versions/v5/common/setsession.md +32 -0
  39. package/dist/versions/v5/common/usemagiclink.md +7 -0
  40. package/dist/versions/v5/expo/apikey-to-publishable-key.md +6 -0
  41. package/dist/versions/v5/expo/clerkprovider-frontendapi.md +17 -0
  42. package/dist/versions/v5/fastify/api-url-value-change.md +6 -0
  43. package/dist/versions/v5/fastify/clerkplugin-frontendapi.md +17 -0
  44. package/dist/versions/v5/fastify/createclerkclient-apikey.md +17 -0
  45. package/dist/versions/v5/fastify/createclerkclient-frontendapi.md +17 -0
  46. package/dist/versions/v5/gatsby/api-url-value-change.md +6 -0
  47. package/dist/versions/v5/gatsby/apikey-to-publishable-key.md +6 -0
  48. package/dist/versions/v5/gatsby/createclerkclient-apikey.md +17 -0
  49. package/dist/versions/v5/gatsby/createclerkclient-frontendapi.md +17 -0
  50. package/dist/versions/v5/gatsby/withserverauth-return-type.md +43 -0
  51. package/dist/versions/v5/index.js +63 -0
  52. package/dist/versions/v5/js/afterswitchorganizationurl.md +15 -0
  53. package/dist/versions/v5/js/appearance-organizationpreview-organizationswitcher.md +8 -0
  54. package/dist/versions/v5/js/experimental-canusecaptcha.md +6 -0
  55. package/dist/versions/v5/js/experimental-captchasitekey.md +6 -0
  56. package/dist/versions/v5/js/experimental-captchaurl.md +6 -0
  57. package/dist/versions/v5/js/external-account-avatarurl.md +7 -0
  58. package/dist/versions/v5/js/getorganizationmemberships.md +14 -0
  59. package/dist/versions/v5/js/lastorganizationinvitation-member.md +6 -0
  60. package/dist/versions/v5/js/organization-create-string.md +15 -0
  61. package/dist/versions/v5/js/organization-getpendinginvitations.md +14 -0
  62. package/dist/versions/v5/js/organization-logourl.md +7 -0
  63. package/dist/versions/v5/js/redirecttohome.md +13 -0
  64. package/dist/versions/v5/js/signup-attemptweb3walletverification-generatedsignature.md +20 -0
  65. package/dist/versions/v5/js/unstable-invitationupdate.md +6 -0
  66. package/dist/versions/v5/js/unstable-membershipupdate.md +6 -0
  67. package/dist/versions/v5/js/useorganization-invitationlist.md +25 -0
  68. package/dist/versions/v5/js/useorganization-membershiplist.md +24 -0
  69. package/dist/versions/v5/js/useorganizations.md +26 -0
  70. package/dist/versions/v5/js/user-createexternalaccount-redirecturl.md +7 -0
  71. package/dist/versions/v5/js/user-orgpublicdata-profileimageurl.md +7 -0
  72. package/dist/versions/v5/js/user-update-password.md +19 -0
  73. package/dist/versions/v5/js/userprofile-prop.md +7 -0
  74. package/dist/versions/v5/next/api-url-value-change.md +6 -0
  75. package/dist/versions/v5/next/auth-middleware-deprecated.md +10 -0
  76. package/dist/versions/v5/next/authmiddleware-apikey.md +17 -0
  77. package/dist/versions/v5/next/authmiddleware-frontendapi.md +9 -0
  78. package/dist/versions/v5/next/clerk-js-version-next-public.md +8 -0
  79. package/dist/versions/v5/next/createclerkclient-apikey.md +17 -0
  80. package/dist/versions/v5/next/createclerkclient-frontendapi.md +17 -0
  81. package/dist/versions/v5/next/getauth-apikey.md +9 -0
  82. package/dist/versions/v5/next/import-api-url.md +7 -0
  83. package/dist/versions/v5/next/import-api-version.md +7 -0
  84. package/dist/versions/v5/next/import-clerk-js-url.md +7 -0
  85. package/dist/versions/v5/next/import-clerk-js-version.md +7 -0
  86. package/dist/versions/v5/next/import-domain.md +7 -0
  87. package/dist/versions/v5/next/import-is-satellite.md +7 -0
  88. package/dist/versions/v5/next/import-nextjs-api.md +22 -0
  89. package/dist/versions/v5/next/import-nextjs-app-beta.md +10 -0
  90. package/dist/versions/v5/next/import-nextjs-edge-middleware.md +6 -0
  91. package/dist/versions/v5/next/import-nextjs-edge-middlewarefiles.md +6 -0
  92. package/dist/versions/v5/next/import-nextjs-ssr.md +7 -0
  93. package/dist/versions/v5/next/import-proxy-url.md +7 -0
  94. package/dist/versions/v5/next/import-publishable-key.md +7 -0
  95. package/dist/versions/v5/next/import-secret-key.md +7 -0
  96. package/dist/versions/v5/next/import-sign-in-url.md +7 -0
  97. package/dist/versions/v5/next/import-sign-up-url.md +6 -0
  98. package/dist/versions/v5/next/with-clerk-middleware-removed.md +10 -0
  99. package/dist/versions/v5/node/api-url-value-change.md +6 -0
  100. package/dist/versions/v5/node/cjs-esm-instance.md +16 -0
  101. package/dist/versions/v5/node/clerkexpressrequireauth-apikey.md +17 -0
  102. package/dist/versions/v5/node/clerkexpressrequireauth-frontendapi.md +17 -0
  103. package/dist/versions/v5/node/clerkexpresswithauth-apikey.md +17 -0
  104. package/dist/versions/v5/node/clerkexpresswithauth-frontendapi.md +17 -0
  105. package/dist/versions/v5/node/createclerkclient-apikey.md +17 -0
  106. package/dist/versions/v5/node/createclerkclient-frontendapi.md +17 -0
  107. package/dist/versions/v5/node/createclerkexpressrequireauth-apikey.md +17 -0
  108. package/dist/versions/v5/node/createclerkexpressrequireauth-frontendapi.md +17 -0
  109. package/dist/versions/v5/node/createclerkexpresswithauth-apikey.md +17 -0
  110. package/dist/versions/v5/node/createclerkexpresswithauth-frontendapi.md +17 -0
  111. package/dist/versions/v5/node/package-rename.md +6 -0
  112. package/dist/versions/v5/node/setclerkapikey.md +17 -0
  113. package/dist/versions/v5/node/setclerkapiversion.md +17 -0
  114. package/dist/versions/v5/node/setclerkhttpoptions.md +17 -0
  115. package/dist/versions/v5/node/setclerkserverapiurl.md +20 -0
  116. package/dist/versions/v5/react/api-url-value-change.md +6 -0
  117. package/dist/versions/v5/shared/buildrequesturl.md +14 -0
  118. package/dist/versions/v5/shared/organizationcontext.md +7 -0
  119. package/dist/versions/v5/shared/useorganizationlist-organizationlist.md +19 -0
  120. package/package.json +63 -0
@@ -0,0 +1,63 @@
1
+ import createLoader from '../../util/load-change.js';
2
+ const load = createLoader({
3
+ version: '5',
4
+ baseUrl: 'https://clerk.com/docs/upgrade-guides/v5'
5
+ });
6
+ const reactChangesList = ['magiclinkerrorcode', 'usemagiclink', 'ismagiclinkerror', 'magiclinkerror', 'handlemagiclinkverification', 'clerkprovider-frontendapi', 'setsession', 'navigate-to-routerpush-routerreplace'];
7
+ export default {
8
+ nextjs: load('next', ['api-key-to-secret-key', 'frontend-api-to-publishable-key', 'with-clerk-middleware-removed', 'auth-middleware-deprecated', 'clerk-js-version-next-public', 'authmiddleware-apikey', 'authmiddleware-frontendapi', 'createclerkclient-apikey', 'createclerkclient-frontendapi', 'getauth-apikey', 'clerkprovider-frontendapi', 'import-nextjs-app-beta', 'import-nextjs-ssr', 'import-nextjs-edge-middleware', 'import-nextjs-edge-middlewarefiles', 'import-api-url', 'import-api-version', 'import-clerk-js-url', 'import-clerk-js-version', 'import-domain', 'import-is-satellite', 'import-proxy-url', 'import-publishable-key', 'import-secret-key', 'import-sign-in-url', 'import-sign-up-url', 'import-nextjs-api', 'api-url-value-change', 'ismagiclinkerror', 'usemagiclink', 'magiclinkerrorcode', 'setsession']),
9
+ // since we export clerk-react at the top level from the gatsby plugin
10
+ // if you're using gatsby, we also need to scan for the react changes
11
+ gatsby: load('gatsby', dedupeMerge(reactChangesList, ['api-key-to-secret-key', 'createclerkclient-apikey', 'apikey-to-publishable-key', 'createclerkclient-frontendapi', 'ismagiclinkerror', 'usemagiclink', 'magiclinkerrorcode', 'setsession', 'api-url-value-change', 'withserverauth-return-type'])),
12
+ expo: load('expo', ['apikey-to-publishable-key', 'ismagiclinkerror', 'usemagiclink', 'magiclinkerrorcode', 'setsession']),
13
+ fastify: load('fastify', ['api-key-to-secret-key', 'api-url-value-change', 'frontend-api-to-publishable-key', 'createclerkclient-apikey', 'createclerkclient-frontendapi', 'clerkplugin-frontendapi']),
14
+ node: load('node', ['package-rename', 'api-key-to-secret-key', 'api-url-value-change', 'frontend-api-to-publishable-key', 'clerkexpressrequireauth-apikey', 'clerkexpresswithauth-apikey', 'createclerkclient-apikey', 'createclerkexpressrequireauth-apikey', 'createclerkexpresswithauth-apikey', 'createclerkclient-frontendapi', 'createclerkexpressrequireauth-frontendapi', 'clerkexpressrequireauth-frontendapi', 'createclerkexpresswithauth-frontendapi', 'clerkexpresswithauth-frontendapi', 'setclerkapikey', 'setclerkapiversion', 'setclerkhttpoptions', 'setclerkserverapiurl', 'cjs-esm-instance']),
15
+ react: load('react', reactChangesList),
16
+ js: load('js', ['magiclinkerror', 'ismagiclinkerror', 'magiclinkerrorcode', 'usemagiclink', 'handlemagiclinkverification', 'external-account-avatarurl',
17
+ // shared w/ all
18
+ 'organization-logourl',
19
+ // shared w/ all
20
+ 'user-orgpublicdata-profileimageurl',
21
+ // shared w/ all
22
+ 'useorganizations', 'userprofile-prop', 'setsession', 'user-update-password',
23
+ // shared w/ all
24
+ 'afterswitchorganizationurl',
25
+ // shared w/ all
26
+ 'experimental-canusecaptcha', 'experimental-captchaurl', 'experimental-captchasitekey', 'getorganizationmemberships', 'lastorganizationinvitation-member', 'unstable-invitationupdate', 'unstable-membershipupdate', 'organization-create-string',
27
+ // maybe shared with all?
28
+ 'organization-getpendinginvitations',
29
+ // maybe shared with all?
30
+ 'useorganization-invitationlist',
31
+ // maybe shared with all?
32
+ 'useorganization-membershiplist',
33
+ // maybe shared with all?
34
+ 'user-createexternalaccount-redirecturl',
35
+ // maybe shared with all?
36
+ 'signup-attemptweb3walletverification-generatedsignature', 'appearance-organizationpreview-organizationswitcher',
37
+ // shared w/ all
38
+ 'redirecttohome']),
39
+ shared: load('shared', ['magiclinkerror', 'ismagiclinkerror', 'magiclinkerrorcode', 'usemagiclink', 'buildrequesturl', 'organizationcontext', 'useorganizationlist-organizationlist' // shared outside this pkg?
40
+ ]),
41
+
42
+ chromeExtension: load('chromeExtension', ['clerkprovider-tokencache']),
43
+ localizations: [],
44
+ types: [],
45
+ backend: []
46
+ // backend: load('backend', [
47
+ // 'createclerkclient-frontendapi',
48
+ // 'clerk-import',
49
+ // 'externalaccount-picture',
50
+ // 'externalaccountjson-avatarurl',
51
+ // 'organization-logourl',
52
+ // 'organizationjson-logourl',
53
+ // 'user-profileimageurl',
54
+ // 'userjson-profileimageurl',
55
+ // 'organizationmembershippublicuserdata-profileimageurl',
56
+ // 'organizationmembershippublicuserdatajson-profileimageurl',
57
+ // 'clockskewinseconds',
58
+ // ]),
59
+ };
60
+
61
+ function dedupeMerge(arr1, arr2) {
62
+ return [...new Set(arr1.concat(arr2))];
63
+ }
@@ -0,0 +1,15 @@
1
+ ---
2
+ title: '`afterSwitchOrganizationUrl` -> `afterSelectOrganizationUrl` in `OrganizationSwitcher`'
3
+ matcher: '<OrganizationSwitcher.*?(afterSwitchOrganizationUrl)=.*?>'
4
+ replaceWithString: 'afterSelectOrganizationUrl'
5
+ ---
6
+
7
+ The `afterSwitchOrganizationUrl` prop on the `<OrganizationSwitcher />` component has been renamed to `afterSelectOrganizationUrl`. This is a quick and simple rename.
8
+
9
+ ```js
10
+ // before
11
+ <OrganizationSwitcher afterSwitchOrganizationUrl='...' />
12
+
13
+ // after
14
+ <OrganizationSwitcher afterSelectOrganizationUrl='...' />
15
+ ```
@@ -0,0 +1,8 @@
1
+ ---
2
+ title: '`elements.organizationPreview__organizationSwitcher` -> `elements.organizationPreview__organizationSwitcherTrigger` in `<OrganizationSwitcher />` appearance prop'
3
+ matcher: "<OrganizationSwitcher[\\s\\S]*?appearance={\\s*{\\s*elements:\\s*{\\s*(organizationPreview__organizationSwitcher)[\\s\\S]*?>"
4
+ matcherFlags: 'm'
5
+ replaceWithString: 'organizationPreview__organizationSwitcherTrigger'
6
+ ---
7
+
8
+ If you are using `organizationPreview__organizationSwitcher` as an [appearance prop](https://clerk.com/docs/components/customization/overview#appearance-prop) value to the [`<OrganizationSwitcher />` component](https://clerk.com/docs/references/javascript/clerk/organization-switcher#organization-switcher-component), it must be updated to `organizationPreview__organizationSwitcherTrigger` instead. This is a simple text replacement. However, it should be noted that component designs have been updated as part of v5, so you may need to make adjustments to any appearance prop customizations that have been implemented as a whole.
@@ -0,0 +1,6 @@
1
+ ---
2
+ title: '`Clerk.experimental_canUseCaptcha` property removed'
3
+ matcher: 'experimental_canUseCaptcha'
4
+ ---
5
+
6
+ The experimental property `Clerk.experimental_canUseCaptcha` has been removed. There is no replacement for this functionality currently. If this is problematic for your application, please [reach out to our support team](https://clerk.com/support)!
@@ -0,0 +1,6 @@
1
+ ---
2
+ title: '`Clerk.experimental_captchaSiteKey` property removed'
3
+ matcher: 'experimental_captchaSiteKey'
4
+ ---
5
+
6
+ The experimental property `Clerk.experimental_captchaSiteKey` has been removed. There is no replacement for this functionality currently. If this is problematic for your application, please [reach out to our support team](https://clerk.com/support)!
@@ -0,0 +1,6 @@
1
+ ---
2
+ title: '`Clerk.experimental_captchaURL` property removed'
3
+ matcher: 'experimental_captchaURL'
4
+ ---
5
+
6
+ The experimental property `Clerk.experimental_captchaURL` has been removed. There is no replacement for this functionality currently. If this is problematic for your application, please [reach out to our support team](https://clerk.com/support)!
@@ -0,0 +1,7 @@
1
+ ---
2
+ title: '`ExternalAccount.avatarUrl` -> `ExternalAccount.imageUrl`'
3
+ matcher: "\\.avatarUrl"
4
+ replaceWithString: '.imageUrl'
5
+ ---
6
+
7
+ The `avatarUrl` property of any [`ExternalAcccount` object](https://clerk.com/docs/references/javascript/external-account) has been changed to `imageUrl`.
@@ -0,0 +1,14 @@
1
+ ---
2
+ title: '`Clerk.getOrganizationMemberships()` -> `user.getOrganizationMemberships()`'
3
+ matcher: "Clerk.getOrganizationMemberships\\("
4
+ ---
5
+
6
+ The `getOrganizationMemberships` [method on the `Clerk` class](https://clerk.com/docs/references/javascript/clerk/clerk#organization) has been removed. Instead, use `getOrganizationMemberships` on a user instance.
7
+
8
+ ```js
9
+ // before
10
+ Clerk.getOrganizationMemberships();
11
+
12
+ // after
13
+ user.getOrganizationMemberships();
14
+ ```
@@ -0,0 +1,6 @@
1
+ ---
2
+ title: '`lastOrganizationInvitation` and `lastOrganizationMember` dropped from event emitter'
3
+ matcher: "[\\.lastOrganizationInvitation|\\.lastOrganizationMember]"
4
+ ---
5
+
6
+ If you are using [`Clerk.addListener`](https://clerk.com/docs/references/javascript/clerk/clerk#add-listener) or `OrganizationContext` and utilizing either the `lastOrganizationInvitation` and/or `lastOrganizationMember` emitted events, these properties have been removed, as they were only relevant for internal use. We are not providing a way to backfill this functionality at the moment. If you are using it and this is an issue for you, please [reach out to Clerk support](https://clerk.com/support) and we can find a way to resolve the issue!
@@ -0,0 +1,15 @@
1
+ ---
2
+ title: "`Organization.create('x')` -> `Organization.create({ name: 'x' })`"
3
+ matcher: "Organization\\.create\\(\\s*[\"']"
4
+ matcherFlags: 'm'
5
+ ---
6
+
7
+ Passing a string as an argument to `Organization.create` is no longer possible - instead, pass an object with the `name` property.
8
+
9
+ ```js
10
+ // before
11
+ Organization.create('...');
12
+
13
+ // after
14
+ Organization.create({ name: '...' });
15
+ ```
@@ -0,0 +1,14 @@
1
+ ---
2
+ title: "`Organization.getPendingInvitations()` -> `Organization.getInvitations({ status: 'pending' })`"
3
+ matcher: "\\.getPendingInvitations\\("
4
+ ---
5
+
6
+ The `Organization.getPendingInvitations()` method has been removed. You can use `Organization.getInvitations` instead.
7
+
8
+ ```js
9
+ // before
10
+ Organization.getPendingInvitations();
11
+
12
+ // after
13
+ Organization.getInvitations({ status: 'pending' });
14
+ ```
@@ -0,0 +1,7 @@
1
+ ---
2
+ title: '`Organization.logoUrl` -> `Organization.imageUrl`'
3
+ matcher: "\\.logoUrl"
4
+ replaceWithString: '.imageUrl'
5
+ ---
6
+
7
+ The `logoUrl` property of any [`Organization` object](https://clerk.com/docs/references/javascript/organization/organization#organization) has been changed to `imageUrl`.
@@ -0,0 +1,13 @@
1
+ ---
2
+ title: '`Clerk.redirectToHome()` removed'
3
+ matcher: "Clerk.redirectToHome\\("
4
+ ---
5
+
6
+ The `Clerk.redirectToHome` method has been removed. If you are looking for a generic replacement for this method, you can instead use `window.Clerk.redirectToAfterSignUp()` or `window.Clerk.redirectAfterSignIn()`.
7
+
8
+ To set the `afterSignUpUrl` or `afterSignInUrl`, you can:
9
+
10
+ - [pass the desired values into ClerkProvider](https://clerk.com/docs/components/clerk-provider#properties)
11
+ - if using nextjs SDK, set with `NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL` or `NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL`
12
+ - if using remix SDK, set with `CLERK_AFTER_SIGN_IN_URL` or `CLERK_AFTER_SIGN_UP_URL`
13
+ - If not using a react-based SDK, they can be passed into `Clerk.load` as such: `Clerk.load({ afterSignUpUrl: ‘x’, afterSignInUrl: ‘y’ })`
@@ -0,0 +1,20 @@
1
+ ---
2
+ title: '`generatedSignature` -> `signature` as param of Signup.attemptWeb3WalletVerification()'
3
+ matcher: "attemptWeb3WalletVerification\\(\\s*{\\.*?generatedSignature:"
4
+ ---
5
+
6
+ The `generatedSignature` param to [`Signup.attemptWeb3WalletVerification()`](https://clerk.com/docs/references/javascript/sign-up/web3-verification#attempt-web3-wallet-verification) has been removed. Instead, use the `signature` param. Note that this param takes a string, where the `generatedSignature` param took a function, so both key and value will need to change.
7
+
8
+ ```js
9
+ // before
10
+ s.attemptWeb3WalletVerification({
11
+ generatedSignature: async () => 'signatureString',
12
+ });
13
+
14
+ // after
15
+ s.attemptWeb3WalletVerification({ signature: 'signatureString' });
16
+
17
+ // or, if you still need to fetch the signature async
18
+ const signatureString = await (async () => 'signatureString');
19
+ s.attemptWeb3WalletVerification({ signature: signatureString });
20
+ ```
@@ -0,0 +1,6 @@
1
+ ---
2
+ title: '`Clerk.__unstable__invitationUpdate` removed'
3
+ matcher: '__unstable__invitationUpdate'
4
+ ---
5
+
6
+ The `Clerk.__unstable__invitationUpdate` experimental property has been removed, and has no current replacement. If this is an issue in your codebase, please [reach out to Clerk support](https://clerk.com/support)!
@@ -0,0 +1,6 @@
1
+ ---
2
+ title: '`Clerk.__unstable__membershipUpdate` removed'
3
+ matcher: '__unstable__membershipUpdate'
4
+ ---
5
+
6
+ The `Clerk.__unstable__membershipUpdate` experimental property has been removed, and has no current replacement. If this is an issue in your codebase, please [reach out to Clerk support](https://clerk.com/support)!
@@ -0,0 +1,25 @@
1
+ ---
2
+ title: '`invitationList` -> `invitations` as param to `useOrganizations`'
3
+ matcher: "useOrganizations\\(\\s*{\\.*?invitationList:"
4
+ matcherFlags: 'm'
5
+ ---
6
+
7
+ The `invitationList` param to the `useOrganizations` hook has been replaced by `invitations`. This param also has a slightly different way of working, examples included below. Note also that `useOrganizations` is deprecated and should be updated to `useOrganization` instead.
8
+
9
+ ```js
10
+ // before
11
+ const { invitationList } = useOrganizations({
12
+ invitationList: { limit: 10, offset: 1 },
13
+ });
14
+
15
+ // after
16
+ const { invitations } = useOrganization({
17
+ invitations: {
18
+ initialPage: 1,
19
+ pageSize: 10,
20
+ },
21
+ });
22
+
23
+ // you can also simply return all invitations
24
+ const { invitations } = useOrganization({ invitations: true });
25
+ ```
@@ -0,0 +1,24 @@
1
+ ---
2
+ title: '`membershipList` -> `members` as param to `useOrganization`'
3
+ matcher: "useOrganizations\\(\\s*{\\.*?membershipList:"
4
+ ---
5
+
6
+ The `membershipList` param from the `useOrganization` hook has been removed. Instead, [use the `memberships` param](https://clerk.com/docs/references/react/use-organization#parameters). Examples of each can be seen here:
7
+
8
+ ```js
9
+ // before
10
+ const { membershipList } = useOrganizations({
11
+ membershipList: { limit: 10, offset: 1 },
12
+ });
13
+
14
+ // after
15
+ const { memberships } = useOrganization({
16
+ memberships: {
17
+ initialPage: 1,
18
+ pageSize: 10,
19
+ },
20
+ });
21
+
22
+ // you can also simply return all memberships
23
+ const { memberships } = useOrganization({ memberships: true });
24
+ ```
@@ -0,0 +1,26 @@
1
+ ---
2
+ title: '`useOrganizations` -> `useOrganizationList`'
3
+ matcher: "useOrganizations\\("
4
+ ---
5
+
6
+ Any place where `useOrganizations` is used should be switched to [`useOrganizationList`](https://clerk.com/docs/references/react/use-organization-list) or [`useOrganization`](https://clerk.com/docs/references/react/use-organization) instead. The return signature has also changed, so take note of this when making the upgrade.
7
+
8
+ ```js
9
+ // before: useOrganizations return values
10
+ {
11
+ isLoaded: boolean,
12
+ createOrganization: clerk.createOrganization,
13
+ getOrganizationMemberships: clerk.getOrganizationMemberships,
14
+ getOrganization: clerk.getOrganization,
15
+ }
16
+
17
+ // after: useOrganizationList return values
18
+ {
19
+ isLoaded: boolean,
20
+ createOrganization: clerk.createOrganization,
21
+ userMemberships: PaginatedResourcesWithDefault<...> | PaginatedResources<...>,
22
+ userInvitations: PaginatedResourcesWithDefault<...> | PaginatedResources<...>,
23
+ userSuggestions: PaginatedResourcesWithDefault<...> | PaginatedResources<...>,
24
+ setActive: clerk.setActive,
25
+ }
26
+ ```
@@ -0,0 +1,7 @@
1
+ ---
2
+ title: '`redirect_url` -> `redirectUrl` as param of `User.createExternalAccount`'
3
+ matcher: "createExternalAccount\\(\\s*{\\.*?(redirect_url):"
4
+ replaceWithString: 'redirectUrl'
5
+ ---
6
+
7
+ The param `redirect_url` of [`User.createExternalAccount`](https://clerk.com/docs/references/javascript/user/create-metadata#create-external-account) has been updated to `redirectUrl`. This is a simple text replacement without any signature changes.
@@ -0,0 +1,7 @@
1
+ ---
2
+ title: '`[User|OrganizationMembershipPublicData].profileImageUrl` -> `[User|OrganizationMembershipPublicData].imageUrl`'
3
+ matcher: "\\.profileImageUrl"
4
+ replaceWithString: '.imageUrl'
5
+ ---
6
+
7
+ The `profileImageUrl` property of any [`User` object](https://clerk.com/docs/references/javascript/user/user#user) or [`OrganizationMembershipPublicData` object](https://github.com/clerk/javascript/blob/37f36e538d8879981f76f4a433066e057afb06de/packages/backend/src/api/resources/OrganizationMembership.ts#L31) has been changed to `imageUrl`.
@@ -0,0 +1,19 @@
1
+ ---
2
+ title: "`User.update({ password: 'x' })` -> `User.updatePassword('x')`"
3
+ matcher: "\\.update\\(\\s*{.*?password:"
4
+ matcherFlags: 'm'
5
+ ---
6
+
7
+ If you are updating a user's password via the [`User.update` method](https://clerk.com/docs/references/javascript/user/user#update), it must be changed to [`User.updatePassword`](https://clerk.com/docs/references/javascript/user/password-management#update-password) instead. This method will require the current password as well as the desired new password. We made this update to improve the security of password changes. Example below:
8
+
9
+ ```js
10
+ // before
11
+ user.update({ password: 'foo' });
12
+
13
+ // after
14
+ user.updatePassword({
15
+ currentPassword: 'bar',
16
+ newPassword: 'foo',
17
+ signOutOfOtherSessions: true,
18
+ });
19
+ ```
@@ -0,0 +1,7 @@
1
+ ---
2
+ title: '`userProfile` -> `userProfileProps` for `UserButton`'
3
+ matcher: '<UserButton.*?(userProfile)=.*?>'
4
+ replaceWithString: 'userProfileProps'
5
+ ---
6
+
7
+ The `userProfile` prop on [the `UserButton` component](https://clerk.com/docs/references/javascript/clerk/user-button#user-button-component) has been changed to `userProfileProps`. This is purely a name change, none of the values need to be updated
@@ -0,0 +1,6 @@
1
+ ---
2
+ title: '`API_URL` value has changed'
3
+ matcher: "API_URL[\\s\\S]+?from\\s+['\"]@clerk\\/nextjs\\/server['\"]"
4
+ ---
5
+
6
+ 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,10 @@
1
+ ---
2
+ title: '`authMiddleware` deprecated'
3
+ matcher: "import\\s+{[\\s\\S]*?authMiddleware[\\s\\S]*?}\\s+from\\s+['\"]@clerk\\/nextjs.*?['\"]"
4
+ ---
5
+
6
+ `authMiddleware` is now deprecated, and we recommend instead using `clerkMiddleware`. Here’s how code could look before and after migration:
7
+
8
+ ```js
9
+ // TODO
10
+ ```
@@ -0,0 +1,17 @@
1
+ ---
2
+ title: '`apiKey` -> `secretKey` as param to authMiddleware'
3
+ matcher: "authMiddleware\\({[\\s\\S]*?apiKey:[\\s\\S]*?}\\)"
4
+ matcherFlags: 'm'
5
+ ---
6
+
7
+ The `apiKey` argument passed to `authMiddleware` must be changed to `secretKey`.
8
+
9
+ ```js
10
+ import { authMiddleware } from '@clerk/nextjs';
11
+
12
+ // before
13
+ authMiddleware({ apiKey: '...' });
14
+
15
+ // after
16
+ authMiddleware({ secretKey: '...' });
17
+ ```
@@ -0,0 +1,9 @@
1
+ ---
2
+ title: '`frontendApi` -> `publishableKey` as param to authMiddleware'
3
+ matcher: "authMiddleware\\({[\\s\\S]*?frontendApi:[\\s\\S]*?}\\)"
4
+ matcherFlags: 'm'
5
+ ---
6
+
7
+ <!-- TODO: is there a possible issue with import matching? this from `@clerk/nextjs` -->
8
+
9
+ The `frontendApi` argument passed to `authMiddleware` must be changed to `publishableKey`
@@ -0,0 +1,8 @@
1
+ ---
2
+ title: '`CLERK_JS_VERSION` should be `NEXT_PUBLIC_CLERK_JS_VERSION`'
3
+ matcher: '[^_]CLERK_JS_VERSION'
4
+ ---
5
+
6
+ If you are using `CLERK_JS_VERSION` as an environment variable, it should be changed to `NEXT_PUBLIC_CLERK_JS_VERSION` instead.
7
+
8
+ This change brings our SDK up to date with the latest standards for next.js - that public environment variables should have the `NEXT_PUBLIC_` prefix. This env variable is not private, so it should get the public prefix.
@@ -0,0 +1,17 @@
1
+ ---
2
+ title: '`apiKey` -> `secretKey` as param to createClerkClient'
3
+ matcher: "createClerkClient\\({[\\s\\S]*?apiKey:[\\s\\S]*?}\\)"
4
+ matcherFlags: 'm'
5
+ ---
6
+
7
+ The `apiKey` argument passed to `createClerkClient` must be changed to `secretKey`.
8
+
9
+ ```js
10
+ import { createClerkClient } from '@clerk/nextjs/server';
11
+
12
+ // before
13
+ createClerkClient({ apiKey: '...' });
14
+
15
+ // after
16
+ createClerkClient({ secretKey: '...' });
17
+ ```
@@ -0,0 +1,17 @@
1
+ ---
2
+ title: '`frontendApi` -> `publishableKey` as param to createClerkClient'
3
+ matcher: "createClerkClient\\({[\\s\\S]*?frontendApi:[\\s\\S]*?}\\)"
4
+ matcherFlags: 'm'
5
+ ---
6
+
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
+
9
+ ```js
10
+ import { createClerkClient } from '@clerk/nextjs/server';
11
+
12
+ // before
13
+ createClerkClient({ frontendApi: '...' });
14
+
15
+ // after
16
+ createClerkClient({ publishableKey: '...' });
17
+ ```
@@ -0,0 +1,9 @@
1
+ ---
2
+ title: '`apiKey` -> `secretKey` as param to getAuth'
3
+ matcher: "getAuth\\({[\\s\\S]*?apiKey:[\\s\\S]*?}\\)"
4
+ matcherFlags: 'm'
5
+ ---
6
+
7
+ <!-- TODO: is there a possible issue with import matching? this from `@clerk/nextjs/server` -->
8
+
9
+ The `apiKey` argument passed to `getAuth` must be changed to `secretKey`
@@ -0,0 +1,7 @@
1
+ ---
2
+ title: '`API_URL` constant removed'
3
+ matcher: "API_URL[\\s\\S]*?from\\s+['\"]@clerk\\/nextjs[\\s\\S]*?['\"]"
4
+ matcherFlags: 'm'
5
+ ---
6
+
7
+ This deprecated constant has been removed as an export from `@clerk/nextjs`. We recommend setting the `CLERK_API_URL` environment variable and using this instead.
@@ -0,0 +1,7 @@
1
+ ---
2
+ title: '`API_VERSION` constant removed'
3
+ matcher: "API_VERSION[\\s\\S]*?from\\s+['\"]@clerk\\/nextjs[\\s\\S]*?['\"]"
4
+ matcherFlags: 'm'
5
+ ---
6
+
7
+ This deprecated constant has been removed as an export from `@clerk/nextjs`. We recommend setting the `CLERK_API_VERSION` environment variable and using this instead.
@@ -0,0 +1,7 @@
1
+ ---
2
+ title: '`CLERK_JS_URL` constant removed'
3
+ matcher: "CLERK_JS_URL[\\s\\S]*?from\\s+['\"]@clerk\\/nextjs[\\s\\S]*?['\"]"
4
+ matcherFlags: 'm'
5
+ ---
6
+
7
+ This deprecated constant has been removed as an export from `@clerk/nextjs`. We recommend setting the `NEXT_PUBLIC_CLERK_JS` environment variable and using this instead.
@@ -0,0 +1,7 @@
1
+ ---
2
+ title: '`CLERK_JS_VERSION` constant removed'
3
+ matcher: "CLERK_JS_VERSION[\\s\\S]*?from\\s+['\"]@clerk\\/nextjs[\\s\\S]*?['\"]"
4
+ matcherFlags: 'm'
5
+ ---
6
+
7
+ This deprecated constant has been removed as an export from `@clerk/nextjs`. We recommend setting the `NEXT_PUBLIC_CLERK_JS_VERSION` environment variable and using this instead.
@@ -0,0 +1,7 @@
1
+ ---
2
+ title: '`DOMAIN` constant removed'
3
+ matcher: "DOMAIN[\\s\\S]*?from\\s+['\"]@clerk\\/nextjs[\\s\\S]*?['\"]"
4
+ matcherFlags: 'm'
5
+ ---
6
+
7
+ This deprecated constant has been removed as an export from `@clerk/nextjs`. We recommend setting the `NEXT_PUBLIC_CLERK_DOMAIN` environment variable and using this instead.
@@ -0,0 +1,7 @@
1
+ ---
2
+ title: '`IS_SATELLITE` constant removed'
3
+ matcher: "IS_SATELLITE[\\s\\S]*?from\\s+['\"]@clerk\\/nextjs[\\s\\S]*?['\"]"
4
+ matcherFlags: 'm'
5
+ ---
6
+
7
+ This deprecated constant has been removed as an export from `@clerk/nextjs`. We recommend setting the `NEXT_PUBLIC_CLERK_IS_SATELLITE` environment variable and using this instead.
@@ -0,0 +1,22 @@
1
+ ---
2
+ title: '`@clerk/nextjs/api` import removed'
3
+ matcher: "@clerk\\/nextjs\\/api"
4
+ ---
5
+
6
+ <!-- TODO: verify accuracy of this with dimitris -->
7
+
8
+ The import subpath `@clerk/nextjs/api` has been removed. This includes the following imports:
9
+
10
+ ```js
11
+ // These have been removed
12
+ import {
13
+ ClerkMiddleware,
14
+ ClerkMiddlewareOptions,
15
+ LooseAuthProp,
16
+ RequireAuthProp,
17
+ StrictAuthProp,
18
+ WithAuthProp,
19
+ } from '@clerk/nextjs/api';
20
+ ```
21
+
22
+ If you still need to use any of these functions, they can be instead imported from `@clerk/clerk-sdk-node`.
@@ -0,0 +1,10 @@
1
+ ---
2
+ title: '`@clerk/nextjs/app-beta` import removed'
3
+ matcher: "@clerk\\/nextjs\\/app-beta"
4
+ ---
5
+
6
+ If you are using the `@clerk/nextjs/app-beta` import anywhere, it should use `@clerk/nextjs` instead. The `app-beta` import has been removed as our approuter support is stable, if there are any places you’re using it you can remove.
7
+
8
+ Make this change carefully as some behavior may have changed between our beta and stable releases. You can refer to [our documentation](https://clerk.com/docs/quickstarts/nextjs) and/or [approuter example](https://github.com/clerk/clerk-nextjs-app-quickstart) for up-to-date usage.
9
+
10
+ The `@clerk/nextjs` import will work with both app router and pages router.
@@ -0,0 +1,6 @@
1
+ ---
2
+ title: '`@clerk/nextjs/edge-middleware` import removed'
3
+ matcher: "@clerk\\/nextjs\\/edge-middleware"
4
+ ---
5
+
6
+ This deprecated import has been replaced by `@clerk/nextjs`. Usage should now look as such: `import { authMiddleware } from @clerk/nextjs`. There may be changes in functionality between the two exports depending on how old the version used is, so upgrade with caution.
@@ -0,0 +1,6 @@
1
+ ---
2
+ title: '`@clerk/nextjs/edge-middlewarefiles` import removed'
3
+ matcher: "@clerk\\/nextjs\\/edge-middlewarefiles"
4
+ ---
5
+
6
+ This deprecated import has been replaced by `@clerk/nextjs`. Usage should now look as such: `import { authMiddleware } from @clerk/nextjs`. There may be changes in functionality between the two exports depending on how old the version used is, so upgrade with caution.
@@ -0,0 +1,7 @@
1
+ ---
2
+ title: '`@clerk/nextjs/ssr` import removed'
3
+ matcher: "@clerk\\/nextjs\\/ssr"
4
+ replaceWithString: '@clerk/nextjs'
5
+ ---
6
+
7
+ If you are importing from `@clerk/nextjs/ssr`, you can use `@clerk/nextjs` instead. Our top-level import supports SSR functionality by default now, so the subpath on the import is no longer needed. This import can be directly replaced without any other considerations.
@@ -0,0 +1,7 @@
1
+ ---
2
+ title: '`PROXY_URL` constant removed'
3
+ matcher: "PROXY_URL[\\s\\S]*?from\\s+['\"]@clerk\\/nextjs[\\s\\S]*?['\"]"
4
+ matcherFlags: 'm'
5
+ ---
6
+
7
+ This deprecated constant has been removed as an export from `@clerk/nextjs`. We recommend setting the `NEXT_PUBLIC_CLERK_PROXY_URL` environment variable and using this instead.
@@ -0,0 +1,7 @@
1
+ ---
2
+ title: '`PUBLISHABLE_KEY` constant removed'
3
+ matcher: "PUBLISHABLE_KEY[\\s\\S]*?from\\s+['\"]@clerk\\/nextjs[\\s\\S]*?['\"]"
4
+ matcherFlags: 'm'
5
+ ---
6
+
7
+ This deprecated constant has been removed as an export from `@clerk/nextjs`. We recommend setting the `NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY` environment variable and using this instead.
@@ -0,0 +1,7 @@
1
+ ---
2
+ title: '`SECRET_KEY` constant removed'
3
+ matcher: "SECRET_KEY[\\s\\S]*?from\\s+['\"]@clerk\\/nextjs[\\s\\S]*?['\"]"
4
+ matcherFlags: 'm'
5
+ ---
6
+
7
+ This deprecated constant has been removed as an export from `@clerk/nextjs`. We recommend setting the `CLERK_SECRET_KEY` environment variable and using this instead.
@@ -0,0 +1,7 @@
1
+ ---
2
+ title: '`SIGN_IN_URL` constant removed'
3
+ matcher: "SIGN_IN_URL[\\s\\S]*?from\\s+['\"]@clerk\\/nextjs[\\s\\S]*?['\"]"
4
+ matcherFlags: 'm'
5
+ ---
6
+
7
+ This deprecated constant has been removed as an export from `@clerk/nextjs`. We recommend setting the `NEXT_PUBLIC_CLERK_SIGN_IN_URL` environment variable and using this instead.