@clerk/upgrade 0.0.2 → 0.1.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 +10 -2
- package/dist/cli.js +15 -6
- package/dist/img/alternativemethods-backlink.png +0 -0
- package/dist/img/button-to-organizationlistcreateorganizationactionbutton.png +0 -0
- package/dist/img/connected-accounts-dropdown.png +0 -0
- package/dist/img/mfa-dropdown.png +0 -0
- package/dist/img/organizationprofile-settings.png +0 -0
- package/dist/img/remove-identitypreview-avatar.png +0 -0
- package/dist/img/remove-socialbuttonsblockbuttonarrow.png +0 -0
- package/dist/img/userbuttonpopoveractionbuttontext-removed.png +0 -0
- package/dist/img/userprofile-security.png +0 -0
- package/dist/scan.js +50 -23
- package/dist/util/expandable-list.js +12 -5
- package/dist/util/generate-export-change.js +10 -0
- package/dist/util/guess-framework.js +8 -3
- package/dist/util/load-change.js +2 -1
- package/dist/versions/v5/backend/api-url-value-changed.md +7 -0
- package/dist/versions/v5/backend/authenticaterequest-params-change.md +12 -0
- package/dist/versions/v5/backend/buildrequesturl-removed.md +7 -0
- package/dist/versions/v5/backend/clerk-import.md +2 -2
- package/dist/versions/v5/backend/client-unstableoptions-removed.md +15 -0
- package/dist/versions/v5/backend/clockskewinseconds.md +10 -2
- package/dist/versions/v5/backend/constants-import-path-move.md +13 -0
- package/dist/versions/v5/backend/createauthenticaterequest-import-path-move.md +13 -0
- package/dist/versions/v5/backend/createclerkclient-apikey.md +8 -11
- package/dist/versions/v5/backend/createclerkclient-frontendapi.md +7 -10
- package/dist/versions/v5/backend/createemail-removed.md +7 -0
- package/dist/versions/v5/backend/createisomorphicrequest-import-path-move.md +13 -0
- package/dist/versions/v5/backend/createisomorphicrequest-removed.md +13 -0
- package/dist/versions/v5/backend/decodeJwt-import-path-move.md +13 -0
- package/dist/versions/v5/backend/externalaccount-picture.md +6 -0
- package/dist/versions/v5/backend/externalaccountjson-avatarurl.md +6 -0
- package/dist/versions/v5/backend/getorganizationinvitationlist-return-signature.md +14 -0
- package/dist/versions/v5/backend/getorganizationlist-return-signature.md +14 -0
- package/dist/versions/v5/backend/getorganizationmembershiplist-return-signature.md +14 -0
- package/dist/versions/v5/backend/getpendingorganizationinvitationlist.md +5 -5
- package/dist/versions/v5/backend/httpoptions-removed.md +15 -0
- package/dist/versions/v5/backend/membershiprole.md +21 -0
- package/dist/versions/v5/backend/organization-logourl.md +6 -0
- package/dist/versions/v5/backend/organizationjson-logourl.md +6 -0
- package/dist/versions/v5/backend/organizationmembershippublicuserdata-profileimageurl.md +6 -0
- package/dist/versions/v5/backend/organizationmembershippublicuserdatajson-profileimageurl.md +6 -0
- package/dist/versions/v5/backend/pkgversion.md +15 -0
- package/dist/versions/v5/backend/redirect-import-path-move.md +13 -0
- package/dist/versions/v5/backend/return-signature-change.md +14 -0
- package/dist/versions/v5/backend/signjwt-import-path-move +0 -0
- package/dist/versions/v5/backend/signjwt-import-path-move.md +13 -0
- package/dist/versions/v5/backend/signjwterror-import-move.md +13 -0
- package/dist/versions/v5/backend/tokenverificationerror-import-move.md +13 -0
- package/dist/versions/v5/backend/tokenverificationerroraction-import-move.md +13 -0
- package/dist/versions/v5/backend/tokenverificationerrorcode-import-move.md +13 -0
- package/dist/versions/v5/backend/tokenverificationerrorreason-import-move.md +13 -0
- package/dist/versions/v5/backend/user-profileimageurl.md +6 -0
- package/dist/versions/v5/backend/userjson-profileimageurl.md +6 -0
- package/dist/versions/v5/backend/verifyjwt-import-path-move.md +13 -0
- package/dist/versions/v5/common/aftersigninouturl-behavior-change.md +7 -0
- package/dist/versions/v5/common/aftersigninurl-behavior-change +7 -0
- package/dist/versions/v5/common/aftersigninurl-behavior-change-2.md +7 -0
- package/dist/versions/v5/common/aftersigninurl-behavior-change.md +7 -0
- package/dist/versions/v5/common/aftersignouturl-behavior-change.md +7 -0
- package/dist/versions/v5/common/aftersignupurl-behavior-change.md +7 -0
- package/dist/versions/v5/common/afterswitchorganizationurl.md +16 -0
- package/dist/versions/v5/common/alternativemethods-backlink.md +18 -0
- package/dist/versions/v5/common/api-key-to-secret-key.md +1 -1
- package/dist/versions/v5/common/appearance-organizationpreview-organizationswitcher.md +8 -0
- package/dist/versions/v5/common/button-to-organizationlistcreateorganizationactionbutton.md +11 -0
- package/dist/versions/v5/common/card-changes.md +14 -0
- package/dist/versions/v5/common/changed-localization-keys.md +179 -0
- package/dist/versions/v5/common/clerkprovider-frontendapi-2.md +7 -0
- package/dist/versions/v5/common/clerkprovideroptionswrapper-dropped.md +6 -0
- package/dist/versions/v5/common/connected-accounts-dropdown.md +15 -0
- package/dist/versions/v5/common/emaillinkerrorcode-import-change.md +13 -0
- package/dist/versions/v5/common/external-account-avatarurl.md +7 -0
- package/dist/versions/v5/common/frontend-api-to-publishable-key.md +1 -1
- package/dist/versions/v5/common/isclerkapiresponserror-import-change.md +13 -0
- package/dist/versions/v5/common/isemaillinkerror-import-change.md +13 -0
- package/dist/versions/v5/common/isknownerror-import-change.md +13 -0
- package/dist/versions/v5/common/ismetamaskerror-import-change.md +13 -0
- package/dist/versions/v5/common/mfa-dropdown.md +11 -0
- package/dist/versions/v5/common/multi-session-ui-changes.md +0 -0
- package/dist/versions/v5/common/multisessionappsupport-import-change.md +12 -0
- package/dist/versions/v5/common/new-localization-keys.md +133 -0
- package/dist/versions/v5/common/organization-getdomains-arguments-change.md +20 -0
- package/dist/versions/v5/common/organization-getmembershiprequests-arguments-changed.md +20 -0
- package/dist/versions/v5/common/organization-getroles-arguments-changed.md +20 -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/organizationprofile-settings.md +12 -0
- package/dist/versions/v5/common/organizationswitcherpopoveractionbuttontext-removed.md +14 -0
- package/dist/versions/v5/common/remove-identitypreview-avatar.md +12 -0
- package/dist/versions/v5/common/remove-socialbuttonsblockbuttonarrow.md +10 -0
- package/dist/versions/v5/common/removed-localization-keys.md +166 -0
- package/dist/versions/v5/common/signoutcallback-to-redirecturl.md +22 -0
- package/dist/versions/v5/common/useorganization-invitationlist.md +25 -0
- package/dist/versions/v5/common/useorganization-membershiplist.md +25 -0
- package/dist/versions/v5/common/useorganizations.md +26 -0
- package/dist/versions/v5/common/userbuttonpopoveractionbuttontext-removed.md +14 -0
- package/dist/versions/v5/common/userbuttonpopoveractionbuttontext.md +7 -0
- package/dist/versions/v5/common/userbuttontrigger-userbuttonbox-invert.md +12 -0
- package/dist/versions/v5/common/userprofile-prop.md +8 -0
- package/dist/versions/v5/common/userprofile-security.md +8 -0
- package/dist/versions/v5/common/withclerk-hof-removed.md +29 -0
- package/dist/versions/v5/common/withclerk-removed.md +16 -0
- package/dist/versions/v5/common/withsession-hof-removed.md +29 -0
- package/dist/versions/v5/common/withsession-removed.md +16 -0
- package/dist/versions/v5/common/withuser-hof-removed.md +29 -0
- package/dist/versions/v5/common/withuser-removed-2.md +18 -0
- package/dist/versions/v5/common/withuser-removed.md +16 -0
- package/dist/versions/v5/expo/apikey-to-publishable-key.md +1 -1
- package/dist/versions/v5/gatsby/apikey-to-publishable-key.md +1 -1
- package/dist/versions/v5/index.js +12 -31
- package/dist/versions/v5/js/aftersigninout-behavior-change.md +7 -0
- package/dist/versions/v5/js/aftersigninouturl-behavior-change.md +7 -0
- package/dist/versions/v5/js/aftersigninurl-behavior-change.md +0 -0
- package/dist/versions/v5/js/clerk-isready-removed.md +6 -0
- package/dist/versions/v5/js/lastorganizationinvitation-member.md +1 -1
- package/dist/versions/v5/js/organization-getdomains-arguments-change.md +20 -0
- package/dist/versions/v5/js/organization-getinvitations-arguments-changed.md +20 -0
- package/dist/versions/v5/js/organization-getmembershiprequests-arguments-changed.md +20 -0
- package/dist/versions/v5/js/organization-getmemberships-arguments-changed.md +20 -0
- package/dist/versions/v5/js/organization-getroles-arguments-changed.md +20 -0
- package/dist/versions/v5/js/user-getorganizationinvitations-arguments-chanaged.md +20 -0
- package/dist/versions/v5/js/user-getorganizationmemberships-arguments-chanaged +0 -0
- package/dist/versions/v5/js/user-getorganizationmemberships-arguments-chanaged.md +20 -0
- package/dist/versions/v5/js/user-getorganizationsuggestions-arguments-chanaged.md +20 -0
- package/dist/versions/v5/next/api-url-value-change.md +1 -0
- package/dist/versions/v5/next/auth-import-change.md +13 -0
- package/dist/versions/v5/next/auth-middleware-deprecated.md +43 -4
- package/dist/versions/v5/next/authmiddleware-import-change.md +13 -0
- package/dist/versions/v5/next/buildclerkprops-import-change.md +13 -0
- package/dist/versions/v5/next/clerk-import-change.md +12 -0
- package/dist/versions/v5/next/clerk-js-version-next-public.md +1 -1
- package/dist/versions/v5/next/constants-import-change.md +13 -0
- package/dist/versions/v5/next/createauthenticaterequest-import-change.md +13 -0
- package/dist/versions/v5/next/createisomorphicrequest-import-change.md +13 -0
- package/dist/versions/v5/next/currentuser-import-change.md +13 -0
- package/dist/versions/v5/next/decodejwt-import-change.md +13 -0
- package/dist/versions/v5/next/emaillinkerrorcode-import-change.md +13 -0
- package/dist/versions/v5/next/import-api-url.md +1 -1
- package/dist/versions/v5/next/import-api-version.md +1 -1
- package/dist/versions/v5/next/import-clerk-js-url.md +1 -1
- package/dist/versions/v5/next/import-clerk-js-version.md +1 -1
- package/dist/versions/v5/next/import-domain.md +1 -1
- package/dist/versions/v5/next/import-is-satellite.md +1 -1
- package/dist/versions/v5/next/import-proxy-url.md +1 -1
- package/dist/versions/v5/next/import-publishable-key.md +1 -1
- package/dist/versions/v5/next/import-secret-key.md +1 -1
- package/dist/versions/v5/next/import-sign-in-url.md +1 -1
- package/dist/versions/v5/next/import-sign-up-url.md +2 -1
- package/dist/versions/v5/next/isclerkapiresponserror-import-change.md +13 -0
- package/dist/versions/v5/next/isemaillinkerror-import-change.md +13 -0
- package/dist/versions/v5/next/isknownerror-import-change.md +13 -0
- package/dist/versions/v5/next/ismetamaskerror-import-change.md +13 -0
- package/dist/versions/v5/next/multisessionappsupport-import-change.md +13 -0
- package/dist/versions/v5/next/next-public-clerk-js-url.md +6 -0
- package/dist/versions/v5/next/redirect-import-change.md +13 -0
- package/dist/versions/v5/next/signjwt-import-change.md +13 -0
- package/dist/versions/v5/next/verify +0 -0
- package/dist/versions/v5/next/verifyjwt-import-change.md +13 -0
- package/dist/versions/v5/next/verifytoken-import-change.md +13 -0
- package/dist/versions/v5/next/withclerk-removed.md +15 -0
- package/dist/versions/v5/next/withsession-removed.md +15 -0
- package/dist/versions/v5/next/withuser-removed.md +0 -0
- package/dist/versions/v5/node/legacyauthobject-removed.md +26 -0
- package/dist/versions/v5/react/afterswitchorganizationurl.md +15 -0
- package/dist/versions/v5/react/appearance-organizationpreview-organizationswitcher.md +8 -0
- package/dist/versions/v5/react/router-navigate.md +18 -0
- package/dist/versions/v5/react/signoutcallback-to- +0 -0
- package/dist/versions/v5/react/signoutcallback-to-redirecturl.md +22 -0
- package/dist/versions/v5/react/useorganization-invitationlist.md +25 -0
- package/dist/versions/v5/react/useorganization-membershiplist.md +24 -0
- package/dist/versions/v5/react/useorganizations.md +26 -0
- package/dist/versions/v5/react/userprofile-prop.md +7 -0
- package/dist/versions/v5/remix/clerkerrorboundary-removed.md +22 -0
- package/dist/versions/v5/remix/clerkprovider-frontendapi.md +0 -0
- package/dist/versions/v5/remix/createclerkclient-apikey.md +14 -0
- package/dist/versions/v5/remix/getauth-apikey.md +16 -0
- package/dist/versions/v5/remix/rootauthloader-apikey.md +14 -0
- package/dist/versions/v5/remix/rootauthloader-frontendapi.md +14 -0
- package/dist/versions/v5/shared/buildrequesturl.md +6 -8
- package/dist/versions/v5/shared/getrequesturl.md +6 -0
- package/package.json +1 -1
package/dist/app.js
CHANGED
|
@@ -13,8 +13,11 @@ export default function App({
|
|
|
13
13
|
_toVersion,
|
|
14
14
|
_sdk,
|
|
15
15
|
_dir = false,
|
|
16
|
-
_ignore = []
|
|
16
|
+
_ignore = [],
|
|
17
|
+
_yolo = false,
|
|
18
|
+
noWarnings = false
|
|
17
19
|
}) {
|
|
20
|
+
const [yolo, setYolo] = useState(_yolo);
|
|
18
21
|
const [sdks, setSdks] = useState(_sdk ? [_sdk] : []);
|
|
19
22
|
const [sdkGuesses, setSdkGuesses] = useState([]);
|
|
20
23
|
const [sdkGuessConfirmed, setSdkGuessConfirmed] = useState(false);
|
|
@@ -27,6 +30,10 @@ export default function App({
|
|
|
27
30
|
const [configComplete, setConfigComplete] = useState(false);
|
|
28
31
|
const [configVerified, setConfigVerified] = useState(false);
|
|
29
32
|
let fromVersionGuess = false;
|
|
33
|
+
if (yolo) {
|
|
34
|
+
setSdks(SDKS.map(s => s.value));
|
|
35
|
+
setYolo(false);
|
|
36
|
+
}
|
|
30
37
|
|
|
31
38
|
// We try to guess which SDK they are using
|
|
32
39
|
if (isEmpty(sdks) && isEmpty(sdkGuesses) && !sdkGuessAttempted) {
|
|
@@ -126,7 +133,8 @@ export default function App({
|
|
|
126
133
|
toVersion,
|
|
127
134
|
sdks,
|
|
128
135
|
dir,
|
|
129
|
-
ignore
|
|
136
|
+
ignore,
|
|
137
|
+
noWarnings
|
|
130
138
|
})));
|
|
131
139
|
}
|
|
132
140
|
|
package/dist/cli.js
CHANGED
|
@@ -9,11 +9,12 @@ const cli = meow(`
|
|
|
9
9
|
$ clerk-upgrade
|
|
10
10
|
|
|
11
11
|
Options
|
|
12
|
-
--from
|
|
13
|
-
--to
|
|
14
|
-
--sdk
|
|
15
|
-
--dir
|
|
16
|
-
--ignore
|
|
12
|
+
--from Major version number you're upgrading from
|
|
13
|
+
--to Major version number you're upgrading to
|
|
14
|
+
--sdk Name of the SDK you're upgrading
|
|
15
|
+
--dir Directory you'd like to scan for files
|
|
16
|
+
--ignore Any files or directories you'd like to ignore
|
|
17
|
+
--noWarnings Do not print warnings, only items that must be fixed
|
|
17
18
|
|
|
18
19
|
Examples
|
|
19
20
|
$ clerk-upgrade --from=4 --to=5 --sdk=nextjs --dir=src/**
|
|
@@ -39,6 +40,12 @@ const cli = meow(`
|
|
|
39
40
|
ignore: {
|
|
40
41
|
type: 'string',
|
|
41
42
|
isMultiple: true
|
|
43
|
+
},
|
|
44
|
+
yolo: {
|
|
45
|
+
type: 'boolean'
|
|
46
|
+
},
|
|
47
|
+
noWarnings: {
|
|
48
|
+
type: 'boolean'
|
|
42
49
|
}
|
|
43
50
|
}
|
|
44
51
|
});
|
|
@@ -46,5 +53,7 @@ render( /*#__PURE__*/React.createElement(App, {
|
|
|
46
53
|
_fromVersion: cli.flags.from,
|
|
47
54
|
_toVersion: cli.flags.to,
|
|
48
55
|
_sdk: cli.flags.sdk,
|
|
49
|
-
_dir: cli.flags.dir
|
|
56
|
+
_dir: cli.flags.dir,
|
|
57
|
+
_yolo: cli.flags.yolo,
|
|
58
|
+
noWarnings: cli.flags.noWarnings
|
|
50
59
|
}));
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/scan.js
CHANGED
|
@@ -2,6 +2,7 @@ import React, { useState, useEffect } from 'react';
|
|
|
2
2
|
import { Text, Newline, Box } from 'ink';
|
|
3
3
|
import { globby } from 'globby';
|
|
4
4
|
import fs from 'fs/promises';
|
|
5
|
+
import path from 'path';
|
|
5
6
|
import { ProgressBar } from '@inkjs/ui';
|
|
6
7
|
import indexToPosition from 'index-to-position';
|
|
7
8
|
import ExpandableList from './util/expandable-list.js';
|
|
@@ -10,7 +11,8 @@ export default function Scan({
|
|
|
10
11
|
toVersion,
|
|
11
12
|
sdks,
|
|
12
13
|
dir,
|
|
13
|
-
ignore
|
|
14
|
+
ignore,
|
|
15
|
+
noWarnings
|
|
14
16
|
}) {
|
|
15
17
|
// NOTE: if the difference between fromVersion and toVersion is greater than 1
|
|
16
18
|
// we need to do a little extra work here and import two matchers,
|
|
@@ -45,10 +47,16 @@ export default function Scan({
|
|
|
45
47
|
// result = `files` set to format: ['/filename', '/other/filename']
|
|
46
48
|
useEffect(() => {
|
|
47
49
|
setStatus('Collecting files to scan');
|
|
48
|
-
ignore.push('node_modules/**', '**/node_modules/**', '.git/**', 'package.json', 'package-lock.json', 'yarn.lock', 'pnpm-lock.yaml')
|
|
49
|
-
|
|
50
|
+
ignore.push('node_modules/**', '**/node_modules/**', '.git/**', 'package.json', '**/package.json', 'package-lock.json', '**/package-lock.json', 'yarn.lock', '**/yarn.lock', 'pnpm-lock.yaml', '**/pnpm-lock.yaml', '**/*.(png|webp|svg|gif|jpg|jpeg)+',
|
|
51
|
+
// common image files
|
|
52
|
+
'**/*.(mp4|mkv|wmv|m4v|mov|avi|flv|webm|flac|mka|m4a|aac|ogg)+' // common video files
|
|
53
|
+
);
|
|
54
|
+
|
|
55
|
+
globby(path.resolve(dir), {
|
|
50
56
|
ignore: [...ignore.filter(x => x)]
|
|
51
|
-
}).then(files =>
|
|
57
|
+
}).then(files => {
|
|
58
|
+
setFiles(files);
|
|
59
|
+
});
|
|
52
60
|
}, [dir, ignore]);
|
|
53
61
|
|
|
54
62
|
// Read files and scan regexes
|
|
@@ -57,34 +65,53 @@ export default function Scan({
|
|
|
57
65
|
//
|
|
58
66
|
useEffect(() => {
|
|
59
67
|
if (!matchers || !files) return;
|
|
68
|
+
const allResults = {};
|
|
60
69
|
Promise.all(
|
|
61
70
|
// first we read all the files
|
|
62
71
|
files.map(async (file, idx) => {
|
|
63
|
-
setStatus(`Scanning ${file}`);
|
|
64
|
-
setProgress(Math.ceil(idx / files.length * 100));
|
|
65
72
|
const content = await fs.readFile(file, 'utf8');
|
|
66
73
|
|
|
67
74
|
// then we run each of the matchers against the file contents
|
|
68
|
-
// TODO: combine results on the same match, add multiple file/positions
|
|
69
75
|
for (const sdk in matchers) {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
+
// returns [{ ...matcher, instances: [{sdk, file, position}] }]
|
|
77
|
+
matchers[sdk].map(matcherConfig => {
|
|
78
|
+
// run regex against file content, return array of matches
|
|
79
|
+
// matcher can be an array or string
|
|
80
|
+
let matches = [];
|
|
81
|
+
if (Array.isArray(matcherConfig.matcher)) {
|
|
82
|
+
matcherConfig.matcher.map(m => {
|
|
83
|
+
matches = matches.concat(Array.from(content.matchAll(m)));
|
|
84
|
+
});
|
|
85
|
+
} else {
|
|
86
|
+
matches = Array.from(content.matchAll(matcherConfig.matcher));
|
|
87
|
+
}
|
|
88
|
+
if (matches.length < 1) return;
|
|
89
|
+
|
|
90
|
+
// for each match, add to `instances` array of a key, create if not exists
|
|
91
|
+
matches.map(match => {
|
|
92
|
+
if (noWarnings && matcherConfig.warning) return;
|
|
93
|
+
if (!allResults[matcherConfig.title]) allResults[matcherConfig.title] = {
|
|
94
|
+
instances: [],
|
|
95
|
+
...matcherConfig
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
// TODO: there's a small bug where we can see multiple instances of the same position
|
|
99
|
+
allResults[matcherConfig.title].instances.push({
|
|
76
100
|
sdk,
|
|
77
|
-
file,
|
|
78
|
-
position: indexToPosition(content, match.index
|
|
79
|
-
|
|
101
|
+
file: path.relative(process.cwd(), file),
|
|
102
|
+
position: indexToPosition(content, match.index, {
|
|
103
|
+
oneBased: true
|
|
104
|
+
})
|
|
80
105
|
});
|
|
81
|
-
setResults(results);
|
|
82
106
|
});
|
|
83
107
|
});
|
|
84
108
|
}
|
|
109
|
+
setStatus(`Scanning ${file}`);
|
|
110
|
+
setProgress(Math.ceil(idx / files.length * 100));
|
|
85
111
|
})).then(() => {
|
|
112
|
+
setResults([...results, ...Object.keys(allResults).map(k => allResults[k])]);
|
|
86
113
|
setComplete(true);
|
|
87
|
-
if (
|
|
114
|
+
if (Object.keys(allResults).length < 1) {
|
|
88
115
|
setStatus('It looks like you have nothing you need to change, upgrade away!');
|
|
89
116
|
} else {
|
|
90
117
|
setStatus('File scan complete. See results below!');
|
|
@@ -93,11 +120,11 @@ export default function Scan({
|
|
|
93
120
|
console.error(err);
|
|
94
121
|
});
|
|
95
122
|
}, [matchers, files]);
|
|
96
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, complete ? /*#__PURE__*/React.createElement(Text, {
|
|
123
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, complete ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Text, {
|
|
97
124
|
color: "green"
|
|
98
|
-
}, "\u2713 ", status)
|
|
99
|
-
value: progress
|
|
100
|
-
}), /*#__PURE__*/React.createElement(Text, null, status)), /*#__PURE__*/React.createElement(Newline, null), !!results.length && /*#__PURE__*/React.createElement(ExpandableList, {
|
|
125
|
+
}, "\u2713 ", status), /*#__PURE__*/React.createElement(Newline, null), !!results.length && /*#__PURE__*/React.createElement(ExpandableList, {
|
|
101
126
|
items: results
|
|
102
|
-
}))
|
|
127
|
+
})) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ProgressBar, {
|
|
128
|
+
value: progress
|
|
129
|
+
}), /*#__PURE__*/React.createElement(Text, null, status)));
|
|
103
130
|
}
|
|
@@ -52,19 +52,25 @@ export default function ExpandableList({
|
|
|
52
52
|
color: "blue"
|
|
53
53
|
}, "Navigation Instructions:"), /*#__PURE__*/React.createElement(Text, null, "Navigate through items with \u2191 and \u2193 arrow keys. Expand the details of any item with space bar. \u2193 key on the last item goes to the next page, \u2191 on the first item goes to the previous page. To exit this interface, use \"control + c\"."), /*#__PURE__*/React.createElement(Newline, null), state.all.reduce((memo, item, idx) => {
|
|
54
54
|
if (idx < state.visible[0] || idx >= state.visible[1]) return memo;
|
|
55
|
-
const
|
|
55
|
+
const locations = item.instances.map(instance => `${instance.file}:${instance.position.line}:${instance.position.column}`);
|
|
56
56
|
memo.push( /*#__PURE__*/React.createElement(Box, {
|
|
57
57
|
borderStyle: item.focused ? 'double' : 'single',
|
|
58
58
|
flexDirection: "column",
|
|
59
59
|
borderColor: item.focused ? 'blue' : 'white',
|
|
60
60
|
paddingX: 1,
|
|
61
|
-
key:
|
|
62
|
-
}, /*#__PURE__*/React.createElement(Markdown, null, item.title), /*#__PURE__*/React.createElement(Text, null, "Location: ",
|
|
63
|
-
|
|
64
|
-
}, /*#__PURE__*/React.createElement(
|
|
61
|
+
key: item.title
|
|
62
|
+
}, /*#__PURE__*/React.createElement(Markdown, null, item.title), locations.length > 1 ? /*#__PURE__*/React.createElement(Text, null, "Found ", locations.length, " instances, expand for detail") : /*#__PURE__*/React.createElement(Text, null, "Location: ", locations[0]), item.expanded && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Line, null), locations.length > 1 && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Text, null, "Locations:"), locations.map(loc => /*#__PURE__*/React.createElement(Text, null, ' ', "- ", loc)), /*#__PURE__*/React.createElement(Line, null)), item.warning && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Text, {
|
|
63
|
+
color: "yellow"
|
|
64
|
+
}, "\u26A0\uFE0F This is a WARNING and will still match even if you corrected the issue or if no correction is necessary. To dismiss warnings, pass the `--noWarnings` flag to the CLI when running."), /*#__PURE__*/React.createElement(Line, null)), /*#__PURE__*/React.createElement(Newline, null), /*#__PURE__*/React.createElement(Markdown, null, item.content))));
|
|
65
65
|
return memo;
|
|
66
66
|
}, []), state.all.length > state.numberVisible && /*#__PURE__*/React.createElement(Text, null, "Showing ", state.visible[0] + 1, " - ", Math.min(state.visible[1], state.all.length), " of ", state.all.length));
|
|
67
67
|
}
|
|
68
|
+
const Line = () => /*#__PURE__*/React.createElement(Box, {
|
|
69
|
+
borderStyle: "single",
|
|
70
|
+
borderRight: false,
|
|
71
|
+
borderLeft: false,
|
|
72
|
+
borderBottom: false
|
|
73
|
+
});
|
|
68
74
|
|
|
69
75
|
// I'd like to recognize that this logic is kinda crazy, but it works 💖
|
|
70
76
|
function reducer(state, action) {
|
|
@@ -134,6 +140,7 @@ function reducer(state, action) {
|
|
|
134
140
|
}
|
|
135
141
|
return item;
|
|
136
142
|
});
|
|
143
|
+
console.log(''); // this is strange but seems to solve a rendering bug
|
|
137
144
|
return {
|
|
138
145
|
all,
|
|
139
146
|
visible: state.visible,
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
|
|
4
|
+
// WIP, a util script used for quickly generating a large number of nearly identical change files
|
|
5
|
+
const movedToServer = ['MultisessionAppSupport', 'auth', 'currentUser', 'authMiddleware',
|
|
6
|
+
// deprecated
|
|
7
|
+
'clerkMiddleware',
|
|
8
|
+
// new
|
|
9
|
+
'redirectToSignIn', 'redirectToSignUp', 'buildClerkProps', 'verifyToken', 'isClerkAPIResponseError', 'isEmailLinkError', 'isKnownError', 'isMetamaskError', 'EmailLinkErrorCode', 'withClerk', 'withSession', 'withUser', 'WithClerk', 'WithSession', 'WithUser'];
|
|
10
|
+
const clerkBackendExports = ['createClerkClient', 'verifyToken'];
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import { readPackageSync } from 'read-pkg';
|
|
2
2
|
import SDKS from '../constants/sdks.js';
|
|
3
3
|
export default function guessFrameworks(dir) {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
let pkg;
|
|
5
|
+
try {
|
|
6
|
+
pkg = readPackageSync({
|
|
7
|
+
cwd: dir
|
|
8
|
+
});
|
|
9
|
+
} catch (err) {
|
|
10
|
+
return [];
|
|
11
|
+
}
|
|
7
12
|
|
|
8
13
|
// no guessing if there are no deps
|
|
9
14
|
if (!pkg.dependencies && !pkg.devDependencies) return [];
|
package/dist/util/load-change.js
CHANGED
|
@@ -19,11 +19,12 @@ export default function createLoader({
|
|
|
19
19
|
const fm = parsed.data;
|
|
20
20
|
return {
|
|
21
21
|
title: fm.title,
|
|
22
|
-
matcher: new RegExp(fm.matcher, `g${fm.matcherFlags ? fm.matcherFlags : ''}`),
|
|
22
|
+
matcher: Array.isArray(fm.matcher) ? fm.matcher.map(m => new RegExp(m, `g${fm.matcherFlags ? fm.matcherFlags : ''}`)) : new RegExp(fm.matcher, `g${fm.matcherFlags ? fm.matcherFlags : ''}`),
|
|
23
23
|
replaceWithString: fm.replaceWithString,
|
|
24
24
|
slug,
|
|
25
25
|
sdk: sdk,
|
|
26
26
|
content: parsed.content,
|
|
27
|
+
warning: fm.warning,
|
|
27
28
|
link: `${baseUrl}#${slug}`
|
|
28
29
|
};
|
|
29
30
|
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: '`API_URL` value has changed'
|
|
3
|
+
matcher: "API_URL[\\s\\S]*?from\\s+['\"]@clerk\\/backend\\/constants['\"]"
|
|
4
|
+
matcherFlags: 'm'
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
The value of this export has changed from `https://api.clerk.dev` to `https://api.clerk.com`. If you were relying on the text content of this value not changing, you may need to make adjustments.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: '`request` separated from `options` as params to `authenticateRequest`'
|
|
3
|
+
warning: true
|
|
4
|
+
matcher: "authenticateRequest\\("
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
There has been a change to the way the params of the `authenticateRequest` function are structured. The `request` param, formerly included in an `options` object, has been moved to stand on its own as the first param to the function, while the `options` object remains as the second param. Example below:
|
|
8
|
+
|
|
9
|
+
```diff
|
|
10
|
+
- clerkClient.authenticateRequest({ ...opts, request })
|
|
11
|
+
+ clerkClient.authenticateRequest(request, { ...opts })
|
|
12
|
+
```
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: '`buildRequestUrl` import removed'
|
|
3
|
+
matcher: "import\\s+{[\\s\\S]*?buildRequestUrl[\\s\\S]*?}\\s+from\\s+['\"]@clerk\/backend['\"]"
|
|
4
|
+
matcherFlags: 'm'
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
The `buildRequestUrl` import was intended for those building custom Clerk integrations for frameworks and has been removed in favor of other methods internally. If you were relying on this function and this is an issue, please [reach out to Clerk support](https://clerk.com/support).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: '`Clerk` -> `createClerkClient`'
|
|
3
|
-
matcher: "import\\s+{[\\s\\S]*?Clerk[\\s\\S]*?}
|
|
3
|
+
matcher: "import\\s+{*[\\s\\S]*?Clerk[\\s\\S]*?}*\\s+from\\s+['\"]@clerk\\/backend['\"]"
|
|
4
4
|
matcherFlags: 'm'
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -8,7 +8,7 @@ The top level `Clerk` import was renamed to `createClerkClient`. This is just a
|
|
|
8
8
|
|
|
9
9
|
```js
|
|
10
10
|
// before
|
|
11
|
-
import
|
|
11
|
+
import Clerk from '@clerk/backend';
|
|
12
12
|
|
|
13
13
|
// after
|
|
14
14
|
import { createClerkClient } from '@clerk/backend';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: '`clerkClient.__unstable_options` removed'
|
|
3
|
+
matcher: "\\.__unstable_options"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
The `clerkClient.__unstable_options` property was removed. Previously, you could use it to update the internal options. Instead, create a new ` clerkClient` instance using `createClerkClient` and pass the options in this way. For example:
|
|
7
|
+
|
|
8
|
+
```diff
|
|
9
|
+
import { createClerkClient } from "@clerk/backend"
|
|
10
|
+
|
|
11
|
+
const clerkClient = createClerkClient({ secretKey: "old" })
|
|
12
|
+
|
|
13
|
+
- clerkClient.__unstable_options.secretKey = "new"
|
|
14
|
+
+ const newClerkClient = createClerkClient({ secretKey: "new" })
|
|
15
|
+
```
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: '`clockSkewInSeconds` -> `clockSkewInMs`'
|
|
3
|
-
matcher:
|
|
3
|
+
matcher:
|
|
4
|
+
- "verifyJwt\\([\\s\\S]*?(clockSkewInSeconds):[\\s\\S]*?\\)"
|
|
5
|
+
- "verifyToken\\([\\s\\S]*?(clockSkewInSeconds):[\\s\\S]*?\\)"
|
|
6
|
+
- "authenticateRequest\\([\\s\\S]*?(clockSkewInSeconds):[\\s\\S]*?\\)"
|
|
7
|
+
matcherFlags: 'm'
|
|
4
8
|
replaceWithString: 'clockSkewInMs'
|
|
5
9
|
---
|
|
6
10
|
|
|
7
|
-
The value
|
|
11
|
+
The `clockSkewInSeconds` option has been renamed to `clockSkewInMs` in order to accurately reflect that its value is expected to be in milliseconds rather than seconds. The value does not need to change here, only the name. This change affects the following imports:
|
|
12
|
+
|
|
13
|
+
- `verifyJwt`
|
|
14
|
+
- `verifyToken`
|
|
15
|
+
- `Clerk.authenticateRequest`
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: '`constants` import moved to `@clerk/backend/internal`'
|
|
3
|
+
matcher: "import\\s+{[\\s\\S]*?constants[\\s\\S]*?}\\s+from\\s+['\"]@clerk\\/(backend)['\"]"
|
|
4
|
+
matcherFlags: 'm'
|
|
5
|
+
replaceWithString: 'backend/internal'
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
The `constants` import path has changed from `@clerk/backend` to `@clerk/backend/internal`. You must update your import path in order for it to work correctly. Note that internal imports are not intended for usage and are outside the scope of semver. Example below of the fix that needs to be made:
|
|
9
|
+
|
|
10
|
+
```diff
|
|
11
|
+
- import { constants } from "@clerk/backend"
|
|
12
|
+
+ import { constants } from "@clerk/backend/internal"
|
|
13
|
+
```
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: '`createAuthenticateRequest` import moved to `@clerk/backend/internal`'
|
|
3
|
+
matcher: "import\\s+{[\\s\\S]*?createAuthenticateRequest[\\s\\S]*?}\\s+from\\s+['\"]@clerk\\/(backend)['\"]"
|
|
4
|
+
matcherFlags: 'm'
|
|
5
|
+
replaceWithString: 'backend/internal'
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
The `createAuthenticateRequest` import path has changed from `@clerk/backend` to `@clerk/backend/internal`. You must update your import path in order for it to work correctly. Note that internal imports are not intended for usage and are outside the scope of semver. Example below of the fix that needs to be made:
|
|
9
|
+
|
|
10
|
+
```diff
|
|
11
|
+
- import { createAuthenticateRequest } from "@clerk/backend"
|
|
12
|
+
+ import { createAuthenticateRequest } from "@clerk/backend/internal"
|
|
13
|
+
```
|
|
@@ -1,21 +1,18 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: '`apiKey` -> `secretKey` as param to createClerkClient'
|
|
3
|
-
matcher: "
|
|
3
|
+
matcher: "(?:createClerkClient|Clerk)\\(\\s*{[\\s\\S]*?frontendApi:[\\s\\S]*?\\)"
|
|
4
4
|
matcherFlags: 'm'
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
The `apiKey` argument passed to `createClerkClient` must be changed to `secretKey`. Also note that the import value has changed for creating a new Clerk client, which will be addressed by a separate line item if relevant to your codebase.
|
|
8
8
|
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
import {
|
|
9
|
+
```diff
|
|
10
|
+
- import { Clerk } from '@clerk/backend';
|
|
11
|
+
+ import { createClerkClient } from '@clerk/backend';
|
|
12
12
|
|
|
13
|
-
const clerkClient = Clerk({ apiKey: '...' });
|
|
14
|
-
clerkClient
|
|
13
|
+
- const clerkClient = Clerk({ apiKey: '...' });
|
|
14
|
+
+ const clerkClient = createClerkClient({ secretKey: '...' });
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
const clerkClient = createClerkClient({ secretKey: '...' });
|
|
20
|
-
clerkClient.authenticateRequest({ secretKey: '...' });
|
|
16
|
+
- clerkClient.authenticateRequest({ apiKey: '...' });
|
|
17
|
+
+ clerkClient.authenticateRequest({ secretKey: '...' });
|
|
21
18
|
```
|
|
@@ -6,16 +6,13 @@ matcherFlags: 'm'
|
|
|
6
6
|
|
|
7
7
|
The `frontendApi` argument passed to `createClerkClient` must be changed to `publishableKey`. Note that the values of the two keys are different, so both keys and values need to be changed. You can find your application's publishable key in the Clerk dashboard. Also note that the import value has changed for creating a new Clerk client, which will be addressed by a separate line item if relevant to your codebase.
|
|
8
8
|
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
import {
|
|
9
|
+
```diff
|
|
10
|
+
- import { Clerk } from '@clerk/backend';
|
|
11
|
+
+ import { createClerkClient } from '@clerk/backend';
|
|
12
12
|
|
|
13
|
-
const clerkClient = Clerk({ frontendApi: '...' });
|
|
14
|
-
clerkClient
|
|
13
|
+
- const clerkClient = Clerk({ frontendApi: '...' });
|
|
14
|
+
+ const clerkClient = createClerkClient({ publishableKey: '...' });
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
const clerkClient = createClerkClient({ publishableKey: '...' });
|
|
20
|
-
clerkClient.authenticateRequest({ publishableKey: '...' });
|
|
16
|
+
- clerkClient.authenticateRequest({ frontendApi: '...' });
|
|
17
|
+
+ clerkClient.authenticateRequest({ publishableKey: '...' });
|
|
21
18
|
```
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: '`createEmail` import removed'
|
|
3
|
+
matcher: "import\\s+{[\\s\\S]*?createEmail[\\s\\S]*?}\\s+from\\s+['\"]@clerk\/backend['\"]"
|
|
4
|
+
matcherFlags: 'm'
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
The `createEmail` import has been removed. There is no replacement at this time because we need to rethink how `createEmail` behaves and align it with the newer `sendSms` method. If this is an issue for your implementation, please contact [Clerk support](https://clerk.com/contact).
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: '`createIsomorphicRequest` import moved to `@clerk/backend/internal`'
|
|
3
|
+
matcher: "import\\s+{[\\s\\S]*?createIsomorphicRequest[\\s\\S]*?}\\s+from\\s+['\"]@clerk\\/(backend)['\"]"
|
|
4
|
+
matcherFlags: 'm'
|
|
5
|
+
replaceWithString: 'backend/internal'
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
The `createIsomorphicRequest` import path has changed from `@clerk/backend` to `@clerk/backend/internal`. You must update your import path in order for it to work correctly. Note that internal imports are not intended for usage and are outside the scope of semver. Example below of the fix that needs to be made:
|
|
9
|
+
|
|
10
|
+
```diff
|
|
11
|
+
- import { createIsomorphicRequest } from "@clerk/backend"
|
|
12
|
+
+ import { createIsomorphicRequest } from "@clerk/backend/internal"
|
|
13
|
+
```
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: '`createIsomorphicRequest` import moved to `/internal`'
|
|
3
|
+
matcher: "import\\s+{[\\s\\S]*?createIsomorphicRequest[\\s\\S]*?}\\s+from\\s+['\"]@clerk\/(backend)['\"]"
|
|
4
|
+
replaceWithString: 'backend/internal'
|
|
5
|
+
matcherFlags: 'm'
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
The `createIsomorphicRequest` import was intended for those building custom Clerk integrations for frameworks and has been moved to `@clerk/backend/internal` to reflect this. Please use caution when using internal imports as they are outside the bounds of semver.
|
|
9
|
+
|
|
10
|
+
```diff
|
|
11
|
+
- import { createIsomorphicRequest } from "@clerk/backend"
|
|
12
|
+
+ import { createIsomorphicRequest } from "@clerk/backend/internal"
|
|
13
|
+
```
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: '`decodeJwt` import moved to `@clerk/backend/tokens`'
|
|
3
|
+
matcher: "import\\s+{[\\s\\S]*?decodeJwt[\\s\\S]*?}\\s+from\\s+['\"]@clerk\\/(backend)['\"]"
|
|
4
|
+
matcherFlags: 'm'
|
|
5
|
+
replaceWithString: 'backend/tokens'
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
The `decodeJwt` import path has changed from `@clerk/backend` to `@clerk/backend/tokens`. You must update your import path in order for it to work correctly. Example below of the fix that needs to be made
|
|
9
|
+
|
|
10
|
+
```diff
|
|
11
|
+
- import { decodeJwt } from "@clerk/backend"
|
|
12
|
+
+ import { decodeJwt } from "@clerk/backend/tokens"
|
|
13
|
+
```
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: '`Users.getOrganizationInvitationList` return signature changed'
|
|
3
|
+
matcher: "\\.users\\.getOrganizationInvitationList\\("
|
|
4
|
+
warning: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
The response payload of `Users.getOrganizationInvitationList` 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.getOrganizationInvitationList()
|
|
13
|
+
+ const { data, totalCount } = await clerkClient.users.getOrganizationInvitationList()
|
|
14
|
+
```
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: '`Users.getOrganizationList` return signature changed'
|
|
3
|
+
matcher: "\\.users\\.getOrganizationList\\("
|
|
4
|
+
warning: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
The response payload of `Users.getOrganizationList` 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.getOrganizationList()
|
|
13
|
+
+ const { data, totalCount } = await clerkClient.users.getOrganizationList()
|
|
14
|
+
```
|
|
@@ -0,0 +1,14 @@
|
|
|
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,12 +1,12 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: '`getPendingOrganizationInvitationList` -> `getOrganizationInvitationList`'
|
|
3
|
-
matcher:
|
|
2
|
+
title: '`Organizations.getPendingOrganizationInvitationList` -> `getOrganizationInvitationList`'
|
|
3
|
+
matcher: "\\.(getPendingOrganizationInvitationList)\\("
|
|
4
4
|
replaceWithString: 'getOrganizationInvitationList'
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
The `Organizations.getPendingOrganizationInvitationList` method has been removed. To match the same functionality, use `Organizations.getOrganizationInvitationList` and pass in `status` option as "pending" instead.
|
|
8
8
|
|
|
9
9
|
```diff
|
|
10
|
-
- getPendingOrganizationInvitationList(
|
|
11
|
-
+ getOrganizationInvitationList({
|
|
10
|
+
- clerkClient.organizations.getPendingOrganizationInvitationList()
|
|
11
|
+
+ clerkClient.organizations.getOrganizationInvitationList({ status: "pending" })
|
|
12
12
|
```
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: '`httpOptions` parameter removed'
|
|
3
|
+
matcher: "\\([\\s\\S]*?httpOptions:\\s\\S]*?\\)"
|
|
4
|
+
matcherFlags: 'm'
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
The `httpOptions` parameter was removed from the internal `buildRequest` function but it is used by most public facing APIs. Hence you were able to pass `httpOptions` to some functions which is not possible anymore. If you're currently relying on this functionality and wish to update, please reach out to Clerk's support.
|
|
8
|
+
|
|
9
|
+
The internal change looks like this:
|
|
10
|
+
|
|
11
|
+
```diff
|
|
12
|
+
- const r = buildRequest({ httpsOptions: { headers: {} }})
|
|
13
|
+
+ const request = buildRequest()
|
|
14
|
+
+ request({ headerParams: {} })
|
|
15
|
+
```
|