@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.
Files changed (134) hide show
  1. package/dist/app.js +20 -12
  2. package/dist/cli.js +17 -11
  3. package/dist/scan.js +59 -18
  4. package/dist/util/expandable-list.js +5 -4
  5. package/dist/util/generate-changelog.js +1 -1
  6. package/dist/util/generate-export-change.js +0 -3
  7. package/dist/util/guess-framework.js +47 -11
  8. package/dist/util/load-change.js +1 -1
  9. package/dist/versions/v5/backend/api-url-value-changed.md +1 -0
  10. package/dist/versions/v5/backend/clerk-import.md +2 -2
  11. package/dist/versions/v5/backend/createclerkclient-frontendapi.md +1 -1
  12. package/dist/versions/v5/backend/pkgversion.md +3 -3
  13. package/dist/versions/v5/common/afterswitchorganizationurl.md +3 -6
  14. package/dist/versions/v5/common/getorganizationinvitationlist-return-type-change.md +14 -0
  15. package/dist/versions/v5/common/getorganizationlist-return-type-change.md +14 -0
  16. package/dist/versions/v5/common/getorganizationmembershiplist-return-type-change.md +14 -0
  17. package/dist/versions/v5/common/getroles-pagination.md +15 -0
  18. package/dist/versions/v5/common/handlemagiclinkverification.md +1 -1
  19. package/dist/versions/v5/common/min-react-version.md +6 -0
  20. package/dist/versions/v5/common/navigate-to-routerpush-routerreplace.md +8 -6
  21. package/dist/versions/v5/common/organization-getdomains-arguments-change.md +1 -6
  22. package/dist/versions/v5/common/organization-getinvitations-arguments-changed.md +15 -0
  23. package/dist/versions/v5/common/organization-getmembershiprequests-arguments-changed.md +1 -6
  24. package/dist/versions/v5/common/organization-getmemberships-arguments-changed.md +15 -0
  25. package/dist/versions/v5/common/organization-getroles-arguments-changed.md +1 -6
  26. package/dist/versions/v5/common/setsession.md +1 -0
  27. package/dist/versions/v5/common/usemagiclink.md +1 -1
  28. package/dist/versions/v5/common/user-getorganizationinvitations-arguments-chanaged.md +15 -0
  29. package/dist/versions/v5/common/user-getorganizationmemberships-arguments-chanaged.md +15 -0
  30. package/dist/versions/v5/common/user-getorganizationsuggestions-arguments-chanaged.md +15 -0
  31. package/dist/versions/v5/common/userprofile-prop.md +6 -1
  32. package/dist/versions/v5/expo/clerkprovider-frontendapi.md +4 -7
  33. package/dist/versions/v5/fastify/api-url-value-change.md +3 -1
  34. package/dist/versions/v5/fastify/clerk-import-change.md +12 -0
  35. package/dist/versions/v5/fastify/clerkplugin-frontendapi.md +3 -6
  36. package/dist/versions/v5/fastify/createclerkclient-apikey.md +4 -7
  37. package/dist/versions/v5/fastify/createclerkclient-frontendapi.md +4 -7
  38. package/dist/versions/v5/gatsby/api-url-value-change.md +3 -1
  39. package/dist/versions/v5/gatsby/clerk-import-change.md +12 -0
  40. package/dist/versions/v5/gatsby/createclerkclient-apikey.md +4 -7
  41. package/dist/versions/v5/gatsby/createclerkclient-frontendapi.md +4 -7
  42. package/dist/versions/v5/index.js +8 -8
  43. package/dist/versions/v5/js/organization-create-string.md +3 -6
  44. package/dist/versions/v5/js/organization-getdomains-arguments-change.md +1 -6
  45. package/dist/versions/v5/js/organization-getinvitations-arguments-changed.md +1 -6
  46. package/dist/versions/v5/js/organization-getmembershiprequests-arguments-changed.md +1 -6
  47. package/dist/versions/v5/js/organization-getmemberships-arguments-changed.md +1 -6
  48. package/dist/versions/v5/js/organization-getpendinginvitations.md +3 -6
  49. package/dist/versions/v5/js/organization-getroles-arguments-changed.md +1 -6
  50. package/dist/versions/v5/js/redirecttohome.md +1 -1
  51. package/dist/versions/v5/js/router-navigate-push-replace.md +18 -0
  52. package/dist/versions/v5/js/signup-attemptweb3walletverification-generatedsignature.md +2 -1
  53. package/dist/versions/v5/js/user-createexternalaccount-redirecturl.md +1 -1
  54. package/dist/versions/v5/js/user-getorganizationinvitations-arguments-chanaged.md +1 -6
  55. package/dist/versions/v5/js/user-getorganizationmemberships-arguments-chanaged.md +1 -6
  56. package/dist/versions/v5/js/user-getorganizationsuggestions-arguments-chanaged.md +1 -6
  57. package/dist/versions/v5/js/user-update-password.md +1 -1
  58. package/dist/versions/v5/next/api-url-value-change.md +1 -0
  59. package/dist/versions/v5/next/auth-import-change.md +1 -1
  60. package/dist/versions/v5/next/authmiddleware-frontendapi.md +7 -2
  61. package/dist/versions/v5/next/constants-import-change.md +1 -1
  62. package/dist/versions/v5/next/createclerkclient-apikey.md +3 -6
  63. package/dist/versions/v5/next/createclerkclient-frontendapi.md +3 -6
  64. package/dist/versions/v5/next/getauth-apikey.md +5 -2
  65. package/dist/versions/v5/next/import-nextjs-api.md +0 -2
  66. package/dist/versions/v5/next/min-nextjs-version.md +9 -0
  67. package/dist/versions/v5/next/redirect-import-change.md +1 -1
  68. package/dist/versions/v5/next/redirecttosignin-import-path.md +12 -0
  69. package/dist/versions/v5/next/redirecttosignin-removed.md +6 -0
  70. package/dist/versions/v5/next/redirecttosignup-import-path.md +12 -0
  71. package/dist/versions/v5/next/redirecttosignup-removed.md +6 -0
  72. package/dist/versions/v5/next/with-clerk-middleware-removed.md +2 -2
  73. package/dist/versions/v5/node/api-url-value-change.md +4 -2
  74. package/dist/versions/v5/node/cjs-esm-instance.md +6 -9
  75. package/dist/versions/v5/node/clerk-import-change.md +12 -0
  76. package/dist/versions/v5/node/clerkexpressrequireauth-apikey.md +4 -7
  77. package/dist/versions/v5/node/clerkexpressrequireauth-frontendapi.md +4 -7
  78. package/dist/versions/v5/node/clerkexpresswithauth-apikey.md +4 -7
  79. package/dist/versions/v5/node/clerkexpresswithauth-frontendapi.md +4 -7
  80. package/dist/versions/v5/node/createclerkclient-apikey.md +4 -7
  81. package/dist/versions/v5/node/createclerkclient-frontendapi.md +4 -7
  82. package/dist/versions/v5/node/createclerkexpressrequireauth-apikey.md +4 -7
  83. package/dist/versions/v5/node/createclerkexpressrequireauth-frontendapi.md +4 -7
  84. package/dist/versions/v5/node/createclerkexpresswithauth-apikey.md +4 -7
  85. package/dist/versions/v5/node/createclerkexpresswithauth-frontendapi.md +4 -7
  86. package/dist/versions/v5/node/legacyauthobject-removed.md +6 -6
  87. package/dist/versions/v5/node/setclerkapikey.md +4 -6
  88. package/dist/versions/v5/node/setclerkapiversion.md +4 -6
  89. package/dist/versions/v5/node/setclerkhttpoptions.md +4 -6
  90. package/dist/versions/v5/node/setclerkserverapiurl.md +7 -9
  91. package/dist/versions/v5/react/api-url-value-change.md +3 -1
  92. package/dist/versions/v5/remix/clerk-import-change.md +12 -0
  93. package/dist/versions/v5/remix/clerkerrorboundary-removed.md +1 -0
  94. package/package.json +50 -61
  95. package/dist/test.js +0 -100
  96. package/dist/util/test.js +0 -100
  97. package/dist/versions/v5/backend/return-signature-change.md +0 -14
  98. package/dist/versions/v5/common/aftersigninouturl-behavior-change.md +0 -7
  99. package/dist/versions/v5/common/aftersigninurl-behavior-change +0 -7
  100. package/dist/versions/v5/common/aftersigninurl-behavior-change.md +0 -7
  101. package/dist/versions/v5/common/clerkprovider-frontendapi.md +0 -7
  102. package/dist/versions/v5/common/external-account-avatarurl.md +0 -7
  103. package/dist/versions/v5/common/multi-session-ui-changes.md +0 -0
  104. package/dist/versions/v5/common/organization-getroles-return-type.md +0 -0
  105. package/dist/versions/v5/common/organizationprofile-general.md +0 -0
  106. package/dist/versions/v5/common/userbuttonpopoveractionbuttontext.md +0 -7
  107. package/dist/versions/v5/common/withuser-removed.md +0 -16
  108. package/dist/versions/v5/js/aftersigninout-behavior-change.md +0 -7
  109. package/dist/versions/v5/js/aftersigninouturl-behavior-change.md +0 -7
  110. package/dist/versions/v5/js/aftersigninurl-behavior-change.md +0 -0
  111. package/dist/versions/v5/js/afterswitchorganizationurl.md +0 -15
  112. package/dist/versions/v5/js/appearance-organizationpreview-organizationswitcher.md +0 -8
  113. package/dist/versions/v5/js/useorganization-invitationlist.md +0 -25
  114. package/dist/versions/v5/js/useorganization-membershiplist.md +0 -24
  115. package/dist/versions/v5/js/useorganizations.md +0 -26
  116. package/dist/versions/v5/js/user-getorganizationmemberships-arguments-chanaged +0 -0
  117. package/dist/versions/v5/js/userprofile-prop.md +0 -7
  118. package/dist/versions/v5/next/verify +0 -0
  119. package/dist/versions/v5/next/withclerk-removed.md +0 -15
  120. package/dist/versions/v5/next/withsession-removed.md +0 -15
  121. package/dist/versions/v5/next/withuser-removed.md +0 -0
  122. package/dist/versions/v5/node/package-rename.md +0 -6
  123. package/dist/versions/v5/react/afterswitchorganizationurl.md +0 -15
  124. package/dist/versions/v5/react/appearance-organizationpreview-organizationswitcher.md +0 -8
  125. package/dist/versions/v5/react/signoutcallback-to- +0 -0
  126. package/dist/versions/v5/react/signoutcallback-to-redirecturl.md +0 -22
  127. package/dist/versions/v5/react/useorganization-invitationlist.md +0 -25
  128. package/dist/versions/v5/react/useorganization-membershiplist.md +0 -24
  129. package/dist/versions/v5/react/useorganizations.md +0 -26
  130. package/dist/versions/v5/react/userprofile-prop.md +0 -7
  131. package/dist/versions/v5/remix/clerkprovider-frontendapi.md +0 -0
  132. package/dist/versions/v5/shared/buildrequesturl.md +0 -12
  133. /package/dist/versions/v5/backend/{signjwt-import-path-move → clerkoptions-type.md} +0 -0
  134. /package/dist/versions/v5/backend/{decodeJwt-import-path-move.md → decodejwt-import-path-move.md} +0 -0
package/dist/test.js DELETED
@@ -1,100 +0,0 @@
1
- import React, { useReducer, useMemo } from 'react';
2
- import { Text, Newline, useInput, Box, render } from 'ink';
3
- function ExpandableList({
4
- items
5
- }) {
6
- // add focused/expanded state on the set of items
7
- const initialItems = useMemo(() => {
8
- return items.map((i, idx) => {
9
- i.focused = idx === 0 ? true : false;
10
- i.expanded = false;
11
- return i;
12
- });
13
- }, [items]);
14
-
15
- // set up the focus/expanded state machine
16
- const [state, dispatch] = useReducer(reducer, initialItems);
17
-
18
- // this is what lets us respond to keyboard input
19
- useInput((input, key) => {
20
- if (key.downArrow) {
21
- dispatch({
22
- type: 'focus-next-option'
23
- });
24
- }
25
- if (key.upArrow) {
26
- dispatch({
27
- type: 'focus-previous-option'
28
- });
29
- }
30
- if (input === ' ') {
31
- dispatch({
32
- type: 'toggle-focused-option'
33
- });
34
- }
35
- });
36
-
37
- // and here's the actual markup we render for each list item!
38
- return state.map(item => {
39
- return /*#__PURE__*/React.createElement(Box, {
40
- borderStyle: "round",
41
- flexDirection: "column",
42
- borderColor: item.focused ? 'blue' : 'white',
43
- key: item.title
44
- }, /*#__PURE__*/React.createElement(Text, {
45
- bold: true
46
- }, item.title), /*#__PURE__*/React.createElement(Text, null, "Location: ", result.file, ":", result.position.line, ":", result.position.column), item.expanded && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Newline, null), /*#__PURE__*/React.createElement(Text, {
47
- color: "gray"
48
- }, "changed in ", item.sdk, " SDK"), /*#__PURE__*/React.createElement(Link, {
49
- url: item.link
50
- }, /*#__PURE__*/React.createElement(Text, null, "Migration guide entry \xBB")), /*#__PURE__*/React.createElement(Text, null, item.content)));
51
- });
52
- }
53
-
54
- // I'd like to recognize that this logic is kinda crazy, but it works 💖
55
- function reducer(state, action) {
56
- // if the current item is focused and a next item exists
57
- // un-focus it and tee up the next one to be focused
58
- if (action.type === 'focus-next-option') {
59
- let nextIdx;
60
- return state.map((item, idx) => {
61
- if (item.focused && state[idx + 1]) {
62
- nextIdx = idx + 1;
63
- item.focused = false;
64
- return item;
65
- }
66
- if (idx === nextIdx) {
67
- item.focused = true;
68
- return item;
69
- }
70
- return item;
71
- });
72
- }
73
-
74
- // if the next item is focused, focus this one and tee up the next one to be un-focused
75
- if (action.type === 'focus-previous-option') {
76
- let nextIdx;
77
- return state.map((item, idx) => {
78
- if (state[idx + 1]?.focused) {
79
- item.focused = true;
80
- nextIdx = idx + 1;
81
- return item;
82
- }
83
- if (idx === nextIdx) {
84
- item.focused = false;
85
- return item;
86
- }
87
- return item;
88
- });
89
- }
90
-
91
- // if the space bar is hit, toggle expand/contract on the currently focused item
92
- if (action.type === 'toggle-focused-option') {
93
- return state.map(item => {
94
- if (item.focused) {
95
- item.expanded = !item.expanded;
96
- }
97
- return item;
98
- });
99
- }
100
- }
package/dist/util/test.js DELETED
@@ -1,100 +0,0 @@
1
- import React, { useReducer, useMemo } from 'react';
2
- import { Text, Newline, useInput, Box, render } from 'ink';
3
- function ExpandableList({
4
- items
5
- }) {
6
- // add focused/expanded state on the set of items
7
- const initialItems = useMemo(() => {
8
- return items.map((i, idx) => {
9
- i.focused = idx === 0 ? true : false;
10
- i.expanded = false;
11
- return i;
12
- });
13
- }, [items]);
14
-
15
- // set up the focus/expanded state machine
16
- const [state, dispatch] = useReducer(reducer, initialItems);
17
-
18
- // this is what lets us respond to keyboard input
19
- useInput((input, key) => {
20
- if (key.downArrow) {
21
- dispatch({
22
- type: 'focus-next-option'
23
- });
24
- }
25
- if (key.upArrow) {
26
- dispatch({
27
- type: 'focus-previous-option'
28
- });
29
- }
30
- if (input === ' ') {
31
- dispatch({
32
- type: 'toggle-focused-option'
33
- });
34
- }
35
- });
36
-
37
- // and here's the actual markup we render for each list item!
38
- return state.map(item => {
39
- return /*#__PURE__*/React.createElement(Box, {
40
- borderStyle: "round",
41
- flexDirection: "column",
42
- borderColor: item.focused ? 'blue' : 'white',
43
- key: item.title
44
- }, /*#__PURE__*/React.createElement(Text, {
45
- bold: true
46
- }, item.title), /*#__PURE__*/React.createElement(Text, null, "Location: ", result.file, ":", result.position.line, ":", result.position.column), item.expanded && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Newline, null), /*#__PURE__*/React.createElement(Text, {
47
- color: "gray"
48
- }, "changed in ", item.sdk, " SDK"), /*#__PURE__*/React.createElement(Link, {
49
- url: item.link
50
- }, /*#__PURE__*/React.createElement(Text, null, "Migration guide entry \xBB")), /*#__PURE__*/React.createElement(Text, null, item.content)));
51
- });
52
- }
53
-
54
- // I'd like to recognize that this logic is kinda crazy, but it works 💖
55
- function reducer(state, action) {
56
- // if the current item is focused and a next item exists
57
- // un-focus it and tee up the next one to be focused
58
- if (action.type === 'focus-next-option') {
59
- let nextIdx;
60
- return state.map((item, idx) => {
61
- if (item.focused && state[idx + 1]) {
62
- nextIdx = idx + 1;
63
- item.focused = false;
64
- return item;
65
- }
66
- if (idx === nextIdx) {
67
- item.focused = true;
68
- return item;
69
- }
70
- return item;
71
- });
72
- }
73
-
74
- // if the next item is focused, focus this one and tee up the next one to be un-focused
75
- if (action.type === 'focus-previous-option') {
76
- let nextIdx;
77
- return state.map((item, idx) => {
78
- if (state[idx + 1]?.focused) {
79
- item.focused = true;
80
- nextIdx = idx + 1;
81
- return item;
82
- }
83
- if (idx === nextIdx) {
84
- item.focused = false;
85
- return item;
86
- }
87
- return item;
88
- });
89
- }
90
-
91
- // if the space bar is hit, toggle expand/contract on the currently focused item
92
- if (action.type === 'toggle-focused-option') {
93
- return state.map(item => {
94
- if (item.focused) {
95
- item.expanded = !item.expanded;
96
- }
97
- return item;
98
- });
99
- }
100
- }
@@ -1,14 +0,0 @@
1
- ---
2
- title: '`Users.getOrganizationMembershipList` return signature changed'
3
- matcher: "\\.users\\.getOrganizationMembershipList\\("
4
- warning: true
5
- ---
6
-
7
- The response payload of `Users.getOrganizationMembershipList` was changed as part of the v5 release. Rather than directly returning ` data`, the return signature is now `{ data, totalCount }`. Since backend API responses are paginated, the `totalCount` property is helpful in determining the total number of items in the response easily, and this change in the backend SDK aligns the response shape with what the backend API returns directly.
8
-
9
- Here's an example of how the response shape would change with this modification:
10
-
11
- ```diff
12
- - const data = await clerkClient.users.getOrganizationMembershipList()
13
- + const { data, totalCount } = await clerkClient.users.getOrganizationMembershipList()
14
- ```
@@ -1,7 +0,0 @@
1
- ---
2
- title: '`afterSignOutUrl` prop behavior change'
3
- matcher: 'afterSignOutUrl='
4
- warning: true
5
- ---
6
-
7
- The default value of `afterSignOutUrl` has been changed to `/`. The URLs defined in your `Dashboard > Account Portal > Redirects` section will no longer affect these values. Read the [Customizing your Account Portal redirects](https://docs-preview-605.clerkpreview.com/docs/account-portal/custom-redirects) guide to learn how to override these defaults.
@@ -1,7 +0,0 @@
1
- ---
2
- title: '`afterSignInUrl` prop behavior change'
3
- matcher: 'afterSignInUrl='
4
- warning: true
5
- ---
6
-
7
- The default value of `afterSignInUrl` has been changed to `/`. The URLs defined in your `Dashboard > Account Portal > Redirects` section will no longer affect these values. Read the [Customizing your Account Portal redirects](https://docs-preview-605.clerkpreview.com/docs/account-portal/custom-redirects) guide to learn how to override these defaults.
@@ -1,7 +0,0 @@
1
- ---
2
- title: '`afterSignInUrl` prop behavior change'
3
- matcher: 'afterSignInUrl='
4
- warning: true
5
- ---
6
-
7
- The default value of `afterSignInUrl` has been changed to `/`. The URLs defined in your `Dashboard > Account Portal > Redirects` section will no longer affect these values. Read the [Customizing your Account Portal redirects](https://clerk.com/docs/account-portal/custom-redirects) guide to learn how to override these defaults.
@@ -1,7 +0,0 @@
1
- ---
2
- title: '`frontendApi` -> `publishableKey` as prop to `ClerkProvider`'
3
- matcher: "<ClerkProvider[\\s\\S]*?frontendApi=[\\s\\S]*?>"
4
- matcherFlags: 'm'
5
- ---
6
-
7
- The `frontendApi` prop passed to `<ClerkProvider>` was renamed to `publishableKey`. **Note:** The values are different, so this is not just a key replacement. You can visit your [Clerk dashboard](https://dashboard.clerk.com/last-active?path=api-keys) to copy/paste the new keys after choosing your framework. Make sure to update this in all environments (e.g. dev, staging, production). [More information](/docs/deployments/overview#api-keys-and-environment-variables).
@@ -1,7 +0,0 @@
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`.
@@ -1,7 +0,0 @@
1
- ---
2
- title: '`userButtonPopoverActionButtonText` descriptor removed'
3
- matcher:
4
- ["\\.cl-userButtonPopoverActionButtonText", "elements:\\s+{[\\s\\S]*?userButtonPopoverActionButtonText:[\\s\\S]*?}"]
5
- ---
6
-
7
- The `userButtonPopoverActionButtonText` customization descriptor has been removed, as the text for this button is now directly rendered inside the button rather than an extra wrapping element. Any styling that needs to apply to the text can be applied to its direct parent `cl-userButtonPopoverActionButton`.
@@ -1,16 +0,0 @@
1
- ---
2
- title: '`WithUser` component removed'
3
- matcher: 'foobar'
4
- matcherFlags: 'm'
5
- ---
6
-
7
- The `WithUser` higher order component has been removed. If you would still like to use this function in the way its implemented, it can be created quickly using Clerk's [custom hooks](https://clerk.com/docs/references/react/overview). An example of how to do so is below:
8
-
9
- ```js
10
- export const WithUser = ({ children }) => {
11
- const user = useUser();
12
- if (typeof children !== 'function') throw new Error();
13
-
14
- return {children(user)};
15
- };
16
- ```
@@ -1,7 +0,0 @@
1
- ---
2
- title: '`afterSignOutUrl` prop behavior change'
3
- matcher: 'afterSignOutUrl='
4
- warning: true
5
- ---
6
-
7
- The default value of `afterSignOutUrl` has been changed to `/`. The URLs defined in your `Dashboard > Account Portal > Redirects` section will no longer affect these values. Read the [Customizing your Account Portal redirects](https://docs-preview-605.clerkpreview.com/docs/account-portal/custom-redirects) guide to learn how to override these defaults.
@@ -1,7 +0,0 @@
1
- ---
2
- title: '`afterSignOutUrl` prop behavior change'
3
- matcher: 'afterSignOutUrl='
4
- warning: true
5
- ---
6
-
7
- The default value of `afterSignOutUrl` has been changed to `/`. The URLs defined in your `Dashboard > Account Portal > Redirects` section will no longer affect these values. Read the [Customizing your Account Portal redirects](https://docs-preview-605.clerkpreview.com/docs/account-portal/custom-redirects) guide to learn how to override these defaults.
@@ -1,15 +0,0 @@
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
- ```
@@ -1,8 +0,0 @@
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.
@@ -1,25 +0,0 @@
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
- ```
@@ -1,24 +0,0 @@
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
- ```
@@ -1,26 +0,0 @@
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
- ```
@@ -1,7 +0,0 @@
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
File without changes
@@ -1,15 +0,0 @@
1
- ---
2
- title: '`WithClerk` component removed'
3
- matcher: "import\\s+{[\\s\\S]*?WithClerk[\\s\\S]*?from\\s+['\"]@clerk\\/(?:nextjs|clerk-react)[\\s\\S]*?['\"]"
4
- ---
5
-
6
- The `WithClerk` higher order component has been removed. If you would still like to use this function in the way its implemented, it can be created quickly using Clerk's [custom hooks](https://clerk.com/docs/references/react/overview). An example of how to do so is below:
7
-
8
- ```js
9
- export const withSession = ({ children }) => {
10
- const session = useSession();
11
- if (typeof children !== 'function') throw new Error();
12
-
13
- return {children(session)};
14
- };
15
- ```
@@ -1,15 +0,0 @@
1
- ---
2
- title: '`WithSession` component removed'
3
- matcher: "import\\s+{[\\s\\S]*?WithSession[\\s\\S]*?from\\s+['\"]@clerk\\/(nextjs)[\\s\\S]*?['\"]"
4
- ---
5
-
6
- The `WithSession` higher order component has been removed. If you would still like to use this function in the way its implemented, it can be created quickly using Clerk's [custom hooks](https://clerk.com/docs/references/react/overview). An example of how to do so is below:
7
-
8
- ```js
9
- export const withSession = ({ children }) => {
10
- const session = useSession();
11
- if (typeof children !== 'function') throw new Error();
12
-
13
- return {children(session)};
14
- };
15
- ```
File without changes
@@ -1,6 +0,0 @@
1
- ---
2
- title: '`@clerk/clerk-sdk-node` renamed to `@clerk/express`'
3
- matcher: "@clerk\\/clerk-sdk-node"
4
- ---
5
-
6
- This package has been renamed to `@clerk/express` and the `@clerk/clerk-sdk-node` package is now deprecated. Note that any other changes listed under the node sdk describe steps needed to migrate to `@clerk/express`, rather than changes needed for `@clerk/clerk-sdk-node`, which will not change aside from security updates from here forward.
@@ -1,15 +0,0 @@
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
- ```
@@ -1,8 +0,0 @@
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.
File without changes
@@ -1,22 +0,0 @@
1
- ---
2
- title: 'Replace `signOutCallback` prop on `SignOutButton` with `redirectUrl`'
3
- matcher: "<SignOutButton[\\s\\S]*?signOutCallback=[\\s\\S]*?>"
4
- matcherFlags: 'm'
5
- ---
6
-
7
- The `signOutCallback` prop on the [`<SignOutButton />` component](https://clerk.com/docs/components/unstyled/sign-out-button) has been removed. Instead, you can use the `redirectUrl` prop. Example below:
8
-
9
- ```diff
10
- import { SignOutButton } from "@clerk/clerk-react";
11
-
12
- export const Signout = () => {
13
- return (
14
- <SignOutButton
15
- - signOutCallback={() => { window.location.href = "/your-path" }}
16
- + redirectUrl="/your-path"
17
- >
18
- <button>Sign Out</button>
19
- </SignOutButton>
20
- )
21
- }
22
- ```
@@ -1,25 +0,0 @@
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 } = useOrganization({
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
- ```
@@ -1,24 +0,0 @@
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 } = useOrganization({
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
- ```
@@ -1,26 +0,0 @@
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
- ```
@@ -1,7 +0,0 @@
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
@@ -1,12 +0,0 @@
1
- ---
2
- title: '`getRequestUrl` -> `buildRequestUrl` from `@clerk/backend/internal`'
3
- matcher: "getRequestUrl\\("
4
- ---
5
-
6
- ```diff
7
- - import { getRequestUrl } from '@clerk/shared/proxy';
8
- + import { buildRequestUrl } from '@clerk/backend/internal';
9
-
10
- - const url = getRequestUrl(req, '/your/path');
11
- + const url = buildRequestUrl(/* ??? */);
12
- ```