@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
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`.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -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.
|
|
File without changes
|
|
@@ -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
|
-
```
|
|
File without changes
|
|
@@ -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
|
|
File without changes
|
|
@@ -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
|
-
```
|
|
File without changes
|
/package/dist/versions/v5/backend/{decodeJwt-import-path-move.md → decodejwt-import-path-move.md}
RENAMED
|
File without changes
|