@clerk/upgrade 0.2.1 → 0.4.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/constants/sdks.js +4 -5
- package/dist/guide-generators/core-2/backend/import-paths.mdx +3 -0
- package/dist/guide-generators/core-2/backend/index.js +22 -0
- package/dist/guide-generators/core-2/backend/intro.mdx +3 -0
- package/dist/guide-generators/core-2/chrome-extension/index.js +24 -0
- package/dist/guide-generators/core-2/chrome-extension/intro.mdx +3 -0
- package/dist/guide-generators/core-2/expo/index.js +25 -0
- package/dist/guide-generators/core-2/expo/intro.mdx +3 -0
- package/dist/guide-generators/core-2/fastify/index.js +23 -0
- package/dist/guide-generators/core-2/fastify/intro.mdx +3 -0
- package/dist/guide-generators/core-2/gatsby/index.js +25 -0
- package/dist/guide-generators/core-2/gatsby/intro.mdx +3 -0
- package/dist/guide-generators/core-2/generate-all.sh +16 -0
- package/dist/guide-generators/core-2/js/index.js +28 -0
- package/dist/guide-generators/core-2/js/intro.mdx +3 -0
- package/dist/guide-generators/core-2/nextjs/import-changes.mdx +98 -0
- package/dist/guide-generators/core-2/nextjs/index.js +25 -0
- package/dist/guide-generators/core-2/nextjs/intro.mdx +3 -0
- package/dist/guide-generators/core-2/nextjs/middleware-changes.mdx +229 -0
- package/dist/guide-generators/core-2/nextjs/nextjs-version.mdx +6 -0
- package/dist/guide-generators/core-2/node/index.js +23 -0
- package/dist/guide-generators/core-2/node/intro.mdx +3 -0
- package/dist/guide-generators/core-2/node/node-setters-removals.mdx +34 -0
- package/dist/guide-generators/core-2/overview/index.js +12 -0
- package/dist/guide-generators/core-2/overview/intro.mdx +25 -0
- package/dist/guide-generators/core-2/react/hof-removals.mdx +3 -0
- package/dist/guide-generators/core-2/react/index.js +25 -0
- package/dist/guide-generators/core-2/react/intro.mdx +3 -0
- package/dist/guide-generators/core-2/remix/index.js +25 -0
- package/dist/guide-generators/core-2/remix/intro.mdx +3 -0
- package/dist/guide-generators/core-2/retheme/index.js +23 -0
- package/dist/guide-generators/core-2/retheme/intro.mdx +9 -0
- package/dist/guide-generators/core-2/shared/after-sign-x-handling.mdx +10 -0
- package/dist/guide-generators/core-2/shared/cli.mdx +22 -0
- package/dist/guide-generators/core-2/shared/deprecation-removals.mdx +6 -0
- package/dist/guide-generators/core-2/shared/image-url.mdx +3 -0
- package/dist/guide-generators/core-2/shared/node-version.mdx +3 -0
- package/dist/guide-generators/core-2/shared/orgs-claim.mdx +50 -0
- package/dist/guide-generators/core-2/shared/pagination-args.mdx +3 -0
- package/dist/guide-generators/core-2/shared/pagination-return.mdx +3 -0
- package/dist/guide-generators/core-2/shared/path-routing.mdx +57 -0
- package/dist/guide-generators/core-2/shared/prepare.mdx +10 -0
- package/dist/guide-generators/core-2/shared/react-version.mdx +20 -0
- package/dist/guide-generators/core-2/shared/redesign-preview.mdx +5 -0
- package/dist/guide-generators/core-2/shared/update-version.mdx +18 -0
- package/dist/guide-generators/text-generation.js +109 -0
- package/dist/util/load-change.js +3 -2
- package/dist/versions/{v5 → core-2}/backend/authenticaterequest-params-change.md +1 -0
- package/dist/versions/{v5 → core-2}/backend/clockskewinseconds.md +1 -0
- package/dist/versions/{v5 → core-2}/backend/constants-import-path-move.md +1 -0
- package/dist/versions/{v5 → core-2}/backend/createauthenticaterequest-import-path-move.md +1 -0
- package/dist/versions/{v5 → core-2}/backend/createclerkclient-apikey.md +1 -0
- package/dist/versions/{v5 → core-2}/backend/createclerkclient-frontendapi.md +1 -0
- package/dist/versions/{v5 → core-2}/backend/createisomorphicrequest-import-path-move.md +1 -0
- package/dist/versions/{v5 → core-2}/backend/createisomorphicrequest-removed.md +1 -0
- package/dist/versions/{v5 → core-2}/backend/decodejwt-import-path-move.md +1 -0
- package/dist/versions/{v5 → core-2}/backend/getorganizationmembershiplist-return-signature.md +1 -0
- package/dist/versions/{v5 → core-2}/backend/httpoptions-removed.md +2 -1
- package/dist/versions/{v5 → core-2}/backend/organizationjson-logourl.md +1 -0
- package/dist/versions/{v5 → core-2}/backend/organizationmembershippublicuserdatajson-profileimageurl.md +1 -0
- package/dist/versions/{v5 → core-2}/backend/redirect-import-path-move.md +1 -0
- package/dist/versions/{v5 → core-2}/backend/signjwt-import-path-move.md +1 -0
- package/dist/versions/{v5 → core-2}/backend/signjwterror-import-move.md +1 -0
- package/dist/versions/{v5 → core-2}/backend/tokenverificationerror-import-move.md +1 -0
- package/dist/versions/{v5 → core-2}/backend/tokenverificationerroraction-import-move.md +1 -0
- package/dist/versions/{v5 → core-2}/backend/tokenverificationerrorcode-import-move.md +1 -0
- package/dist/versions/{v5 → core-2}/backend/tokenverificationerrorreason-import-move.md +1 -0
- package/dist/versions/{v5 → core-2}/backend/userjson-profileimageurl.md +1 -0
- package/dist/versions/{v5 → core-2}/backend/verifyjwt-import-path-move.md +1 -0
- package/dist/versions/{v5/chromeExtension → core-2/chrome-extension}/clerkprovider-tokencache.md +8 -10
- package/dist/versions/{v5 → core-2}/common/afterswitchorganizationurl.md +1 -0
- package/dist/versions/{v5 → core-2}/common/alternativemethods-backlink.md +1 -0
- package/dist/versions/{v5 → core-2}/common/api-key-to-secret-key.md +1 -0
- package/dist/versions/{v5 → core-2}/common/appearance-organizationpreview-organizationswitcher.md +1 -0
- package/dist/versions/core-2/common/appearance-variables-breaking-changes.md +15 -0
- package/dist/versions/{v5 → core-2}/common/button-to-organizationlistcreateorganizationactionbutton.md +1 -0
- package/dist/versions/{v5 → core-2}/common/card-changes.md +3 -2
- package/dist/versions/core-2/common/changed-localization-keys.md +180 -0
- package/dist/versions/{v5 → core-2}/common/clerkprovider-frontendapi-2.md +1 -0
- package/dist/versions/{v5 → core-2}/common/clerkprovideroptionswrapper-dropped.md +1 -0
- package/dist/versions/{v5 → core-2}/common/connected-accounts-dropdown.md +1 -0
- package/dist/versions/{v5 → core-2}/common/emaillinkerrorcode-import-change.md +1 -0
- package/dist/versions/{v5/js/external-account-avatarurl.md → core-2/common/externalaccount-avatarurl.md} +2 -2
- package/dist/versions/{v5/backend → core-2/common}/externalaccount-picture.md +1 -0
- package/dist/versions/{v5/backend → core-2/common}/externalaccountjson-avatarurl.md +1 -0
- package/dist/versions/{v5 → core-2}/common/frontend-api-to-publishable-key.md +1 -0
- package/dist/versions/{v5/backend → core-2/common}/getorganizationinvitationlist-return-signature.md +1 -0
- package/dist/versions/{v5 → core-2}/common/getorganizationinvitationlist-return-type-change.md +8 -5
- package/dist/versions/{v5/backend → core-2/common}/getorganizationlist-return-signature.md +1 -0
- package/dist/versions/{v5 → core-2}/common/getorganizationlist-return-type-change.md +2 -1
- package/dist/versions/{v5 → core-2}/common/getorganizationmembershiplist-return-type-change.md +2 -1
- package/dist/versions/{v5 → core-2}/common/isclerkapiresponserror-import-change.md +1 -0
- package/dist/versions/{v5 → core-2}/common/isemaillinkerror-import-change.md +1 -0
- package/dist/versions/{v5 → core-2}/common/isknownerror-import-change.md +1 -0
- package/dist/versions/core-2/common/ismetamaskerror-import-change.md +14 -0
- package/dist/versions/{v5 → core-2}/common/mfa-dropdown.md +1 -0
- package/dist/versions/{v5 → core-2}/common/min-react-version.md +2 -0
- package/dist/versions/{v5 → core-2}/common/multisessionappsupport-import-change.md +1 -1
- package/dist/versions/{v5 → core-2}/common/navigate-to-routerpush-routerreplace.md +1 -0
- package/dist/versions/core-2/common/new-localization-keys.md +115 -0
- package/dist/versions/{v5/js → core-2/common}/organization-getdomains-arguments-change.md +1 -0
- package/dist/versions/{v5/js → core-2/common}/organization-getinvitations-arguments-changed.md +1 -0
- package/dist/versions/{v5/js → core-2/common}/organization-getmembershiprequests-arguments-changed.md +1 -0
- package/dist/versions/{v5 → core-2}/common/organization-getmemberships-arguments-changed.md +1 -0
- package/dist/versions/{v5 → core-2}/common/organization-getroles-arguments-changed.md +1 -0
- package/dist/versions/{v5/js → core-2/common}/organization-logourl.md +1 -0
- package/dist/versions/{v5/backend → core-2/common}/organizationmembershippublicuserdata-profileimageurl.md +1 -0
- package/dist/versions/{v5 → core-2}/common/organizationprofile-settings.md +1 -0
- package/dist/versions/{v5 → core-2}/common/organizationswitcherpopoveractionbuttontext-removed.md +1 -0
- package/dist/versions/{v5 → core-2}/common/remove-identitypreview-avatar.md +1 -0
- package/dist/versions/{v5 → core-2}/common/remove-socialbuttonsblockbuttonarrow.md +1 -0
- package/dist/versions/core-2/common/removed-localization-keys.md +191 -0
- package/dist/versions/{v5 → core-2}/common/useorganization-invitationlist.md +5 -5
- package/dist/versions/{v5 → core-2}/common/useorganization-membershiplist.md +5 -5
- package/dist/versions/{v5/common/user-getorganizationinvitations-arguments-chanaged.md → core-2/common/user-getorganizationinvitations-arguments-changed.md} +1 -0
- package/dist/versions/{v5/common/user-getorganizationmemberships-arguments-chanaged.md → core-2/common/user-getorganizationmemberships-arguments-changed.md} +1 -0
- package/dist/versions/{v5/common/user-getorganizationsuggestions-arguments-chanaged.md → core-2/common/user-getorganizationsuggestions-arguments-changed.md} +1 -0
- package/dist/versions/{v5/backend → core-2/common}/user-profileimageurl.md +1 -0
- package/dist/versions/{v5/js → core-2/common}/user-update-password.md +8 -9
- package/dist/versions/{v5 → core-2}/common/userbuttonpopoveractionbuttontext-removed.md +1 -0
- package/dist/versions/core-2/common/userbuttontrigger-userbuttonbox-invert.md +13 -0
- package/dist/versions/{v5 → core-2}/common/userprofile-security.md +1 -0
- package/dist/versions/{v5 → core-2}/common/withclerk-hof-removed.md +15 -14
- package/dist/versions/{v5 → core-2}/common/withclerk-removed.md +1 -0
- package/dist/versions/{v5 → core-2}/common/withsession-hof-removed.md +15 -14
- package/dist/versions/{v5 → core-2}/common/withsession-removed.md +1 -0
- package/dist/versions/{v5 → core-2}/common/withuser-hof-removed.md +15 -14
- package/dist/versions/{v5 → core-2}/common/withuser-removed-2.md +1 -2
- package/dist/versions/{v5 → core-2}/expo/apikey-to-publishable-key.md +1 -0
- package/dist/versions/{v5 → core-2}/expo/clerkprovider-frontendapi.md +1 -0
- package/dist/versions/{v5 → core-2}/fastify/clerkplugin-frontendapi.md +2 -1
- package/dist/versions/{v5 → core-2}/fastify/createclerkclient-apikey.md +1 -0
- package/dist/versions/{v5 → core-2}/fastify/createclerkclient-frontendapi.md +1 -0
- package/dist/versions/core-2/gatsby/api-url-value-change.md +8 -0
- package/dist/versions/{v5 → core-2}/gatsby/apikey-to-publishable-key.md +1 -0
- package/dist/versions/{v5 → core-2}/gatsby/createclerkclient-apikey.md +1 -0
- package/dist/versions/{v5 → core-2}/gatsby/createclerkclient-frontendapi.md +1 -0
- package/dist/versions/core-2/gatsby/withserverauth-return-type.md +35 -0
- package/dist/versions/core-2/index.js +34 -0
- package/dist/versions/{v5 → core-2}/js/experimental-canusecaptcha.md +1 -0
- package/dist/versions/{v5 → core-2}/js/experimental-captchasitekey.md +1 -0
- package/dist/versions/{v5 → core-2}/js/experimental-captchaurl.md +1 -0
- package/dist/versions/{v5 → core-2}/js/getorganizationmemberships.md +3 -6
- package/dist/versions/core-2/js/redirecttohome.md +13 -0
- package/dist/versions/{v5 → core-2}/js/signup-attemptweb3walletverification-generatedsignature.md +3 -2
- package/dist/versions/{v5 → core-2}/js/unstable-invitationupdate.md +1 -0
- package/dist/versions/{v5 → core-2}/js/unstable-membershipupdate.md +1 -0
- package/dist/versions/{v5 → core-2}/js/user-createexternalaccount-redirecturl.md +1 -0
- package/dist/versions/{v5/next → core-2/nextjs}/auth-import-change.md +1 -0
- package/dist/versions/{v5/next → core-2/nextjs}/auth-middleware-deprecated.md +8 -7
- package/dist/versions/{v5/next → core-2/nextjs}/authmiddleware-apikey.md +5 -7
- package/dist/versions/{v5/next → core-2/nextjs}/authmiddleware-frontendapi.md +2 -1
- package/dist/versions/{v5/next → core-2/nextjs}/authmiddleware-import-change.md +1 -0
- package/dist/versions/{v5/next → core-2/nextjs}/buildclerkprops-import-change.md +1 -0
- package/dist/versions/{v5/next → core-2/nextjs}/clerk-import-change.md +1 -0
- package/dist/versions/{v5/next → core-2/nextjs}/clerk-js-version-next-public.md +1 -0
- package/dist/versions/{v5/next → core-2/nextjs}/constants-import-change.md +2 -1
- package/dist/versions/{v5/next → core-2/nextjs}/createauthenticaterequest-import-change.md +1 -0
- package/dist/versions/{v5/next → core-2/nextjs}/createclerkclient-apikey.md +2 -1
- package/dist/versions/{v5/next → core-2/nextjs}/createclerkclient-frontendapi.md +2 -1
- package/dist/versions/{v5/next → core-2/nextjs}/createisomorphicrequest-import-change.md +1 -0
- package/dist/versions/{v5/next → core-2/nextjs}/currentuser-import-change.md +1 -0
- package/dist/versions/{v5/next → core-2/nextjs}/decodejwt-import-change.md +1 -0
- package/dist/versions/{v5/next → core-2/nextjs}/emaillinkerrorcode-import-change.md +1 -0
- package/dist/versions/{v5/next → core-2/nextjs}/getauth-apikey.md +2 -1
- package/dist/versions/{v5/next → core-2/nextjs}/import-api-url.md +2 -1
- package/dist/versions/{v5/next → core-2/nextjs}/import-api-version.md +2 -1
- package/dist/versions/{v5/next → core-2/nextjs}/import-clerk-js-url.md +2 -1
- package/dist/versions/{v5/next → core-2/nextjs}/import-clerk-js-version.md +2 -1
- package/dist/versions/{v5/next → core-2/nextjs}/import-domain.md +2 -1
- package/dist/versions/{v5/next → core-2/nextjs}/import-is-satellite.md +2 -1
- package/dist/versions/{v5/next → core-2/nextjs}/import-nextjs-api.md +7 -6
- package/dist/versions/{v5/next → core-2/nextjs}/import-nextjs-app-beta.md +2 -1
- package/dist/versions/{v5/next → core-2/nextjs}/import-nextjs-edge-middleware.md +1 -0
- package/dist/versions/{v5/next → core-2/nextjs}/import-nextjs-edge-middlewarefiles.md +1 -0
- package/dist/versions/{v5/next → core-2/nextjs}/import-nextjs-ssr.md +1 -0
- package/dist/versions/{v5/next → core-2/nextjs}/import-proxy-url.md +2 -1
- package/dist/versions/{v5/next → core-2/nextjs}/import-publishable-key.md +2 -1
- package/dist/versions/{v5/next → core-2/nextjs}/import-secret-key.md +2 -1
- package/dist/versions/{v5/next → core-2/nextjs}/import-sign-in-url.md +2 -1
- package/dist/versions/{v5/next → core-2/nextjs}/import-sign-up-url.md +2 -1
- package/dist/versions/{v5/next → core-2/nextjs}/isclerkapiresponserror-import-change.md +1 -0
- package/dist/versions/{v5/next → core-2/nextjs}/isemaillinkerror-import-change.md +1 -0
- package/dist/versions/{v5/next → core-2/nextjs}/isknownerror-import-change.md +1 -0
- package/dist/versions/{v5/next → core-2/nextjs}/min-nextjs-version.md +2 -0
- package/dist/versions/{v5/next → core-2/nextjs}/multisessionappsupport-import-change.md +1 -0
- package/dist/versions/{v5/next → core-2/nextjs}/next-public-clerk-js-url.md +2 -1
- package/dist/versions/{v5/next → core-2/nextjs}/redirect-import-change.md +1 -0
- package/dist/versions/{v5/next → core-2/nextjs}/redirecttosignin-import-path.md +2 -1
- package/dist/versions/{v5/next → core-2/nextjs}/redirecttosignup-import-path.md +2 -1
- package/dist/versions/{v5/next → core-2/nextjs}/signjwt-import-change.md +1 -0
- package/dist/versions/{v5/next → core-2/nextjs}/verifyjwt-import-change.md +1 -0
- package/dist/versions/{v5/next → core-2/nextjs}/verifytoken-import-change.md +1 -0
- package/dist/versions/core-2/nextjs/with-clerk-middleware-removed.md +56 -0
- package/dist/versions/{v5 → core-2}/node/cjs-esm-instance.md +1 -0
- package/dist/versions/{v5 → core-2}/node/clerkexpressrequireauth-apikey.md +1 -0
- package/dist/versions/{v5 → core-2}/node/clerkexpressrequireauth-frontendapi.md +1 -0
- package/dist/versions/{v5 → core-2}/node/clerkexpresswithauth-apikey.md +1 -0
- package/dist/versions/{v5 → core-2}/node/clerkexpresswithauth-frontendapi.md +1 -0
- package/dist/versions/{v5 → core-2}/node/createclerkclient-apikey.md +1 -0
- package/dist/versions/{v5 → core-2}/node/createclerkclient-frontendapi.md +1 -0
- package/dist/versions/{v5 → core-2}/node/createclerkexpressrequireauth-apikey.md +1 -0
- package/dist/versions/{v5 → core-2}/node/createclerkexpressrequireauth-frontendapi.md +1 -0
- package/dist/versions/{v5 → core-2}/node/createclerkexpresswithauth-apikey.md +1 -0
- package/dist/versions/{v5 → core-2}/node/createclerkexpresswithauth-frontendapi.md +1 -0
- package/dist/versions/{v5 → core-2}/node/legacyauthobject-removed.md +3 -3
- package/dist/versions/{v5 → core-2}/node/setclerkapikey.md +1 -0
- package/dist/versions/{v5 → core-2}/node/setclerkapiversion.md +1 -0
- package/dist/versions/{v5 → core-2}/node/setclerkhttpoptions.md +1 -0
- package/dist/versions/{v5 → core-2}/node/setclerkserverapiurl.md +1 -0
- package/dist/versions/core-2/react/api-url-value-change.md +8 -0
- package/dist/versions/{v5 → core-2}/remix/clerk-import-change.md +1 -0
- package/dist/versions/{v5 → core-2}/remix/clerkerrorboundary-removed.md +1 -0
- package/dist/versions/{v5 → core-2}/remix/createclerkclient-apikey.md +1 -0
- package/dist/versions/{v5 → core-2}/remix/getauth-apikey.md +1 -0
- package/dist/versions/{v5 → core-2}/remix/rootauthloader-apikey.md +1 -0
- package/dist/versions/{v5 → core-2}/remix/rootauthloader-frontendapi.md +1 -0
- package/dist/versions/{v5 → core-2}/shared/useorganizationlist-organizationlist.md +2 -2
- package/package.json +2 -1
- package/dist/util/generate-export-change.js +0 -7
- package/dist/util/step-sequencer.js +0 -31
- package/dist/versions/v5/backend/clerkoptions-type.md +0 -0
- package/dist/versions/v5/backend/organization-logourl.md +0 -6
- package/dist/versions/v5/common/aftersigninurl-behavior-change-2.md +0 -7
- package/dist/versions/v5/common/aftersignouturl-behavior-change.md +0 -7
- package/dist/versions/v5/common/aftersignupurl-behavior-change.md +0 -7
- package/dist/versions/v5/common/changed-localization-keys.md +0 -179
- package/dist/versions/v5/common/getroles-pagination.md +0 -15
- package/dist/versions/v5/common/ismetamaskerror-import-change.md +0 -13
- package/dist/versions/v5/common/new-localization-keys.md +0 -133
- package/dist/versions/v5/common/organization-getdomains-arguments-change.md +0 -15
- package/dist/versions/v5/common/organization-getinvitations-arguments-changed.md +0 -15
- package/dist/versions/v5/common/organization-getmembershiprequests-arguments-changed.md +0 -15
- package/dist/versions/v5/common/removed-localization-keys.md +0 -166
- package/dist/versions/v5/common/userbuttontrigger-userbuttonbox-invert.md +0 -12
- package/dist/versions/v5/gatsby/api-url-value-change.md +0 -8
- package/dist/versions/v5/gatsby/withserverauth-return-type.md +0 -43
- package/dist/versions/v5/index.js +0 -44
- package/dist/versions/v5/js/organization-getmemberships-arguments-changed.md +0 -15
- package/dist/versions/v5/js/organization-getroles-arguments-changed.md +0 -15
- package/dist/versions/v5/js/redirecttohome.md +0 -13
- package/dist/versions/v5/js/router-navigate-push-replace.md +0 -18
- package/dist/versions/v5/js/user-getorganizationinvitations-arguments-chanaged.md +0 -15
- package/dist/versions/v5/js/user-getorganizationmemberships-arguments-chanaged.md +0 -15
- package/dist/versions/v5/js/user-getorganizationsuggestions-arguments-chanaged.md +0 -15
- package/dist/versions/v5/next/ismetamaskerror-import-change.md +0 -13
- package/dist/versions/v5/next/redirecttosignin-removed.md +0 -6
- package/dist/versions/v5/next/redirecttosignup-removed.md +0 -6
- package/dist/versions/v5/next/with-clerk-middleware-removed.md +0 -10
- package/dist/versions/v5/react/api-url-value-change.md +0 -8
- package/dist/versions/v5/react/router-navigate.md +0 -18
- /package/dist/versions/{v5 → core-2}/backend/api-url-value-changed.md +0 -0
- /package/dist/versions/{v5 → core-2}/backend/buildrequesturl-removed.md +0 -0
- /package/dist/versions/{v5 → core-2}/backend/clerk-import.md +0 -0
- /package/dist/versions/{v5 → core-2}/backend/client-unstableoptions-removed.md +0 -0
- /package/dist/versions/{v5 → core-2}/backend/createemail-removed.md +0 -0
- /package/dist/versions/{v5 → core-2}/backend/getpendingorganizationinvitationlist.md +0 -0
- /package/dist/versions/{v5 → core-2}/backend/membershiprole.md +0 -0
- /package/dist/versions/{v5 → core-2}/backend/pkgversion.md +0 -0
- /package/dist/versions/{v5 → core-2}/common/handlemagiclinkverification.md +0 -0
- /package/dist/versions/{v5 → core-2}/common/ismagiclinkerror.md +0 -0
- /package/dist/versions/{v5 → core-2}/common/magiclinkerror.md +0 -0
- /package/dist/versions/{v5 → core-2}/common/magiclinkerrorcode.md +0 -0
- /package/dist/versions/{v5/js → core-2/common}/organization-create-string.md +0 -0
- /package/dist/versions/{v5/js → core-2/common}/organization-getpendinginvitations.md +0 -0
- /package/dist/versions/{v5 → core-2}/common/setsession.md +0 -0
- /package/dist/versions/{v5 → core-2}/common/signoutcallback-to-redirecturl.md +0 -0
- /package/dist/versions/{v5 → core-2}/common/usemagiclink.md +0 -0
- /package/dist/versions/{v5 → core-2}/common/useorganizations.md +0 -0
- /package/dist/versions/{v5 → core-2}/common/userprofile-prop.md +0 -0
- /package/dist/versions/{v5 → core-2}/fastify/api-url-value-change.md +0 -0
- /package/dist/versions/{v5 → core-2}/fastify/clerk-import-change.md +0 -0
- /package/dist/versions/{v5 → core-2}/gatsby/clerk-import-change.md +0 -0
- /package/dist/versions/{v5 → core-2}/js/clerk-isready-removed.md +0 -0
- /package/dist/versions/{v5 → core-2}/js/lastorganizationinvitation-member.md +0 -0
- /package/dist/versions/{v5 → core-2}/js/user-orgpublicdata-profileimageurl.md +0 -0
- /package/dist/versions/{v5/next → core-2/nextjs}/api-url-value-change.md +0 -0
- /package/dist/versions/{v5 → core-2}/node/api-url-value-change.md +0 -0
- /package/dist/versions/{v5 → core-2}/node/clerk-import-change.md +0 -0
- /package/dist/versions/{v5 → core-2}/shared/getrequesturl.md +0 -0
- /package/dist/versions/{v5 → core-2}/shared/organizationcontext.md +0 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
### Clerk client setters removed in favor of `createClerkClient` options
|
|
2
|
+
|
|
3
|
+
The following setter methods have been removed in the lastest version. If you were using any of these functions, their functionality can be replaced by instead passing the correponding option to `createClerkClient`.
|
|
4
|
+
|
|
5
|
+
- `setClerkApiVersion`
|
|
6
|
+
- `setClerkHttpOptions`
|
|
7
|
+
- `setClerkServerApiUrl`
|
|
8
|
+
- `setClerkApiKey`
|
|
9
|
+
|
|
10
|
+
Code example:
|
|
11
|
+
|
|
12
|
+
```diff
|
|
13
|
+
import {
|
|
14
|
+
clerkClient,
|
|
15
|
+
- setClerkApiKey,
|
|
16
|
+
- setClerkApiVersion,
|
|
17
|
+
- setClerkHttpOptions,
|
|
18
|
+
- setClerkServerApiUrl
|
|
19
|
+
} from "@clerk/clerk-sdk-node"
|
|
20
|
+
|
|
21
|
+
- setClerkApiKey("...")
|
|
22
|
+
- setClerkApiVersion("...")
|
|
23
|
+
- setClerkHttpOptions("...")
|
|
24
|
+
- setClerkServerApiUrl("...")
|
|
25
|
+
|
|
26
|
+
const clerkClient = createClerkClient({
|
|
27
|
+
+ secretKey: "..."
|
|
28
|
+
+ apiVersion: "..."
|
|
29
|
+
+ httpOptions: "..."
|
|
30
|
+
+ serverApiUrl: "..."
|
|
31
|
+
})
|
|
32
|
+
|
|
33
|
+
await clerkClient.users.getUser(userId);
|
|
34
|
+
```
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { assembleContent, frontmatter, markdown, writeToFile } from '../../text-generation.js';
|
|
2
|
+
const cwd = 'core-2/overview';
|
|
3
|
+
async function generate() {
|
|
4
|
+
return assembleContent({
|
|
5
|
+
data: {},
|
|
6
|
+
cwd
|
|
7
|
+
}, [frontmatter({
|
|
8
|
+
title: `Upgrading to Clerk Core 2`,
|
|
9
|
+
description: `Learn how to upgrade to the latest version of Clerk's SDKs`
|
|
10
|
+
}), markdown('intro')]);
|
|
11
|
+
}
|
|
12
|
+
generate().then(writeToFile(cwd));
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Upgrading to Clerk Core 2
|
|
2
|
+
|
|
3
|
+
In Febrary 2024, [we updated](https://clerk.com/changelog/2024-01-16) Clerk's SDKs to include Core 2. This new core includes:
|
|
4
|
+
|
|
5
|
+
- 💅 Redesigned and improved component UIs.
|
|
6
|
+
- 🔪 The 401 & "flash of white page" that was visible sometimes when syncing auth state was eliminated.
|
|
7
|
+
- 🧹 A large number of smaller housekeeping changes, bugfixes, and improvements.
|
|
8
|
+
- 📊 [Telemetry](/docs/telemetry) to allow us to better determine feature usage and priority (easy opt-out if you don't like this)
|
|
9
|
+
|
|
10
|
+
## SDK Guides
|
|
11
|
+
|
|
12
|
+
Core 2 brings both UI changes and breaking code changes, so each SDK has been updated to a new major version.
|
|
13
|
+
We expect upgrades to take less than 30 minutes, and are providing a CLI tool to assist with the process. Please select your SDK below to get started:
|
|
14
|
+
|
|
15
|
+
- [Next.js](/nextjs)
|
|
16
|
+
- [Remix](/remix)
|
|
17
|
+
- [Expo](/expo)
|
|
18
|
+
- [Node](/node)
|
|
19
|
+
- [Fastify](/fastify)
|
|
20
|
+
- [React](/react)
|
|
21
|
+
- [Backend](/backend)
|
|
22
|
+
- [JS](/js)
|
|
23
|
+
- [Chrome Extension](/chrome-extension)
|
|
24
|
+
|
|
25
|
+
Note that the `Gastsby`, `Go`, and `Ruby` SDKs do not yet have a beta release ready - if you are using any of these SDKs there is nothing actionable right now.
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
### Some higher-order functions and components removed
|
|
2
|
+
|
|
3
|
+
A set of higher-order functions and components that are easily replicated with userland code and were rarely used have been removed. Each of them are listed below, along with code snippets with which they can be reproduced if need be.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { accordionForCategory, assembleContent, deprecationRemovalsAndHousekeeping, frontmatter, loadVersionChangeData, markdown, markdownTemplate, singleItem, writeToFile } from '../../text-generation.js';
|
|
2
|
+
const version = 'core-2';
|
|
3
|
+
const semverVersion = 'v5';
|
|
4
|
+
const name = 'react';
|
|
5
|
+
const properName = 'React';
|
|
6
|
+
const packageName = '@clerk/clerk-react';
|
|
7
|
+
const cwd = `${version}/${name}`;
|
|
8
|
+
async function generate() {
|
|
9
|
+
const data = await loadVersionChangeData(version, name);
|
|
10
|
+
return assembleContent({
|
|
11
|
+
data,
|
|
12
|
+
cwd
|
|
13
|
+
}, [frontmatter({
|
|
14
|
+
title: `Upgrading ${properName} to Core 2`,
|
|
15
|
+
description: `Learn how to upgrade Clerk's ${properName} SDK to the latest version.`
|
|
16
|
+
}), `# Upgrading \`${packageName}\` to Core 2`, markdown('intro'), markdownTemplate('prepare', {
|
|
17
|
+
packageName,
|
|
18
|
+
version: semverVersion
|
|
19
|
+
}), markdown('node-version'), markdown('react-version'), markdownTemplate('update-version', {
|
|
20
|
+
packageName
|
|
21
|
+
}), markdown('cli'), '## Breaking Changes', markdown('redesign-preview'), markdown('after-sign-x-handling'), singleItem('navigate-to-routerpush-routerreplace'), markdown('orgs-claim'), markdownTemplate('path-routing', {
|
|
22
|
+
packageName
|
|
23
|
+
}), markdown('image-url'), accordionForCategory('image-url'), deprecationRemovalsAndHousekeeping(['hof-removal', 'pagination-return', 'pagination-args', 'error-imports'])]);
|
|
24
|
+
}
|
|
25
|
+
generate().then(writeToFile(cwd));
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
Core 2 is included in the React SDK starting with version 5. This new version ships with an improved design and UX for its built-in components, no "flash of white page" when authenticating, and a variety of smaller DX improvements and housekeeping items. Each of the potentially breaking changes are detailed in this guide, below.
|
|
2
|
+
|
|
3
|
+
By the end of this guide, you’ll have successfully upgraded your React project to use `@clerk/clerk-react` v5. You’ll learn how to update your dependencies, resolve breaking changes, and find deprecations. Step-by-step instructions will lead you through the process.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { accordionForCategory, assembleContent, deprecationRemovalsAndHousekeeping, frontmatter, loadVersionChangeData, markdown, markdownTemplate, singleItem, writeToFile } from '../../text-generation.js';
|
|
2
|
+
const version = 'core-2';
|
|
3
|
+
const semverVersion = 'v4';
|
|
4
|
+
const name = 'remix';
|
|
5
|
+
const properName = 'Remix';
|
|
6
|
+
const packageName = '@clerk/remix';
|
|
7
|
+
const cwd = `${version}/${name}`;
|
|
8
|
+
async function generate() {
|
|
9
|
+
const data = await loadVersionChangeData(version, name);
|
|
10
|
+
return assembleContent({
|
|
11
|
+
data: data,
|
|
12
|
+
cwd
|
|
13
|
+
}, [frontmatter({
|
|
14
|
+
title: `Upgrading ${properName} to Core 2`,
|
|
15
|
+
description: `Learn how to upgrade from the Clerk ${properName} SDK to the latest version.`
|
|
16
|
+
}), `# Upgrading \`${packageName}\` to Core 2`, markdown('intro'), markdownTemplate('prepare', {
|
|
17
|
+
version: semverVersion,
|
|
18
|
+
packageName
|
|
19
|
+
}), markdown('node-version'), markdown('react-version'), markdownTemplate('update-version', {
|
|
20
|
+
packageName
|
|
21
|
+
}), markdown('cli'), '## Breaking Changes', singleItem('clerkerrorboundary-removed'), markdown('redesign-preview'), markdown('after-sign-x-handling'), markdown('orgs-claim'), markdownTemplate('path-routing', {
|
|
22
|
+
packageName
|
|
23
|
+
}), markdown('image-url'), accordionForCategory('image-url'), deprecationRemovalsAndHousekeeping()]);
|
|
24
|
+
}
|
|
25
|
+
generate().then(writeToFile(cwd));
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
Core 2 is included in the Remix SDK starting with version 4. This new version ships with an improved design and UX for its built-in components, no "flash of white page" when authenticating, no more need to add a custom error boundary, and a variety of smaller DX improvements and housekeeping items. Each of the potentially breaking changes are detailed in this guide, below.
|
|
2
|
+
|
|
3
|
+
By the end of this guide, you’ll have successfully upgraded your Remix project to use `@clerk/remix` v4. You’ll learn how to update your dependencies, resolve breaking changes, and find deprecations. Step-by-step instructions will lead you through the process.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { accordionForCategory, assembleContent, frontmatter, loadVersionChangeData, markdown, writeToFile } from '../../text-generation.js';
|
|
2
|
+
const cwd = 'core-2/retheme';
|
|
3
|
+
async function generate() {
|
|
4
|
+
const data = await loadVersionChangeData('core-2', 'nextjs');
|
|
5
|
+
const defaultsChangeItem = {
|
|
6
|
+
title: 'Changes to default variables',
|
|
7
|
+
content: `\nThe default values of some [appearance variables](/docs/components/customization/variables) have changed which may impact your UI (if you are not already overriding them).
|
|
8
|
+
|
|
9
|
+
- The default \`colorPrimary\` value changed from \`#103FEF\` to \`#2F3037\`. As the new color is a dark grey, the \`colorPrimary\` of the dark theme was changed to \`#FFFFFF\`.
|
|
10
|
+
- The default \`fontSize\` value changed from \`1rem\` to \`0.8125rem\`
|
|
11
|
+
- The default \`fontWeight\` values changed from \`{ normal: 400, medium: 500, bold: 600 }\` to \`{ normal: 400, medium: 500, semibold: 600, bold: 700 }\`.\n`
|
|
12
|
+
};
|
|
13
|
+
return assembleContent({
|
|
14
|
+
data: data,
|
|
15
|
+
cwd
|
|
16
|
+
}, [frontmatter({
|
|
17
|
+
title: 'Redesigned Components in Core 2',
|
|
18
|
+
description: 'Learn how to handle changes as a result of redesigned components in Clerk Core 2'
|
|
19
|
+
}), '# Redesigned Components in Core 2', markdown('intro'), '## Appearance Changes', accordionForCategory('appearance', {
|
|
20
|
+
additionalItems: [defaultsChangeItem]
|
|
21
|
+
}), '## Localization Changes', accordionForCategory('localization')]);
|
|
22
|
+
}
|
|
23
|
+
generate().then(writeToFile(cwd));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
The new version ships with improved design and UX across all of Clerk's [UI components](/docs/components/overview). If you have used the [`appearance` prop](/docs/components/customization/overview) or tokens for a [custom theme](/docs/components/customization/overview#create-a-custom-theme), you will likely need to make some adjustments to ensure your styling is still looking great. If you're using the [localization prop](/docs/components/customization/localization) you will likely need to make adjustments to account for added or removed localization keys.
|
|
2
|
+
|
|
3
|
+
<Callout type='info'>
|
|
4
|
+
If you are not customizing the appearance of your components, or using `localization`, you can skip this section. If
|
|
5
|
+
you are, we recommend using our CLI (`npx @clerk/upgrade`) to scan for changes required as part of the component
|
|
6
|
+
redesign more quickly.
|
|
7
|
+
</Callout>
|
|
8
|
+
|
|
9
|
+
The sections below contain more info on each change made to the customization ids and localization keys for reference. Regardless of how thoroughly you have reviewed the following information, we still recommend that you ensure that you have taken some time to manually look through each of your views to ensure that everything looks good still.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
### After sign up/in/out URL handling
|
|
2
|
+
|
|
3
|
+
Defining redirect URLs for after sign up, in, and/or out via the Clerk dashboard has been removed in Core 2. In your Clerk dashboard, under "paths", there is a section called "Component paths", where URLs could be defined that had a deprecation warning. In Core 2, this functionality has been removed, and specifying redirect paths via the dashboard will no longer work. If you need to pass a redirect URL for after sign in/up/out, there are [a few different ways this can be done](https://clerk.com/docs/account-portal/custom-redirects), from environment variables to middleware to supplying them directly to the relevant components.
|
|
4
|
+
|
|
5
|
+
As part of this change, the default URL for each of these props has been set to `/`, so if you are passing `/` explicitly to any one of the above props, that line is no longer necessary and can be removed.
|
|
6
|
+
|
|
7
|
+
```diff
|
|
8
|
+
- <UserButton afterSignOutUrl='/' />
|
|
9
|
+
+ <UserButton />
|
|
10
|
+
```
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
## CLI upgrade helper
|
|
2
|
+
|
|
3
|
+
Clerk now provides a `@clerk/upgrade` CLI tool that you can use to ease the upgrade process. The tool will scan your codebase and produce a list of changes you'll need to apply to your project. It should catch the vast majority of the changes needed for a successful upgrade to any SDK including Core 2. This can save you a lot of time reading through changes that don't apply to your project.
|
|
4
|
+
|
|
5
|
+
To run the CLI tool, navigate to your project and run it in the terminal:
|
|
6
|
+
|
|
7
|
+
<CodeBlockTabs type="installer" options={["npm", "yarn", "pnpm"]}>
|
|
8
|
+
```bash filename="terminal"
|
|
9
|
+
npx @clerk/upgrade
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
```bash filename="terminal"
|
|
13
|
+
yarn dlx @clerk/upgrade
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
```bash filename="terminal"
|
|
17
|
+
pnpm dlx @clerk/upgrade
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
</CodeBlockTabs>
|
|
21
|
+
|
|
22
|
+
If you are having trouble with `npx`, it's also possible to install directly with `npm i @clerk/upgrade -g`, and can then be run with the `clerk-upgrade` command.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
As part of this major version, a number of previously deprecated props, arugments, methods, etc. have been removed. Additionally there have been some changes to things that are only used internally, or only used very rarely. It's highly unlikely that any given app will encounter any of these items, but they are all breaking changes, so they have all been documented below.
|
|
2
|
+
|
|
3
|
+
<Callout type='info'>
|
|
4
|
+
For this section more than any other one, please use the CLI upgrade tool (`npx @clerk/upgrade`). Changes in this
|
|
5
|
+
section are very unlikely to appear in your codebase, the tool will save time looking for them.
|
|
6
|
+
</Callout>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
### Image URL Name Consolidation
|
|
2
|
+
|
|
3
|
+
There are a number of Clerk primitives that contain images, and previously they each had different property names, like `avatarUrl`, `logoUrl`, `profileImageUrl`, etc. In order to promote consistency and make it simpler for developers to know where to find associated images, all image properties are now named `imageUrl`. See the list below for all affected classes:
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
**Updating Node.js**
|
|
2
|
+
|
|
3
|
+
You need to have Node.js `18.17.0` or later installed. Last year, Node.js 16 entered EOL (End of life) status, so support for this version has been removed across Clerk SDKs. You can check your Node.js version by running `node -v` in your terminal. Learn more about how to [update and install Node.js](https://nodejs.org/en/learn/getting-started/how-to-install-nodejs).
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
### Removed: `orgs` claim on JWT
|
|
2
|
+
|
|
3
|
+
In the previous version of Clerk's SDKs, if you decode the session token that Clerk returns from the server, you'll currently find an `orgs` claim on it. It lists all the orgs associated with the given user. Now, Clerk returns the `org_id`, `org_slug`, and `org_role` of the **active** organization.
|
|
4
|
+
|
|
5
|
+
The `orgs` claim was part of the `JwtPayload`. Here are a few examples of where the `JwtPayload` could be found.
|
|
6
|
+
|
|
7
|
+
<Accordion titles={["Next.js", "Fastify", "@clerk/backend", "@clerk/clerk-sdk-node"]} heading="h5">
|
|
8
|
+
<AccordionPanel>
|
|
9
|
+
```typescript filename="Next.js"
|
|
10
|
+
import { getAuth } from "@clerk/nextjs/server"
|
|
11
|
+
const claims: JwtPayload = getAuth(request).sessionClaims
|
|
12
|
+
|
|
13
|
+
import { getAuth } from "@clerk/ssr.server"
|
|
14
|
+
const claims: JwtPayload = (await getAuth(request)).sessionClaims
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
</AccordionPanel>
|
|
18
|
+
<AccordionPanel>
|
|
19
|
+
```typescript filename="Fastify"
|
|
20
|
+
import { getAuth } from "@clerk/fastify"
|
|
21
|
+
const claims: JwtPayload = (await getAuth(request)).sessionClaims
|
|
22
|
+
```
|
|
23
|
+
</AccordionPanel>
|
|
24
|
+
<AccordionPanel>
|
|
25
|
+
```typescript filename="@clerk/backend"
|
|
26
|
+
import { createClerkClient } from "@clerk/backend"
|
|
27
|
+
|
|
28
|
+
const clerkClient = createClerkClient({ secretKey: "" })
|
|
29
|
+
const requestState = await clerkClient.authenticateRequest(
|
|
30
|
+
request,
|
|
31
|
+
{ publishableKey: "" }
|
|
32
|
+
)
|
|
33
|
+
const claims: JwtPayload = requestState.toAuth().sessionClaims
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
</AccordionPanel>
|
|
37
|
+
<AccordionPanel>
|
|
38
|
+
```typescript filename="@clerk/clerk-sdk-node"
|
|
39
|
+
import { clerkClient } from "@clerk/clerk-sdk-node"
|
|
40
|
+
|
|
41
|
+
router.use((...args) => clerkClient.expressRequireAuth()(...args))
|
|
42
|
+
router.get("/me", async (req, reply: Response) => {
|
|
43
|
+
return reply.json({ auth: req.auth })
|
|
44
|
+
})
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
</AccordionPanel>
|
|
48
|
+
</Accordion>
|
|
49
|
+
|
|
50
|
+
If you would like to have your JWT return all of the user's organizations, you can create a [custom JWT template](/docs/backend-requests/making/jwt-templates) in your dashboard. Add `{ "orgs": "user.organizations" }` to it.
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
### Changes to some function return signatures
|
|
2
|
+
|
|
3
|
+
There have been changes to return signatures for some functions. Since Clerk's API responses are paginated, the `totalCount` property is helpful in determining the total number of items in the response easily. This change also aligns the response shape with what is returned from the Clerk backend API. Each impacted function is listed below, along with code examples:
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
### Path routing is now the default
|
|
2
|
+
|
|
3
|
+
On components like [`<SignIn />`](/docs/components/authentication/sign-in) you can define the props `routing` and `path`. `routing` can be set to `'hash' | 'path' | 'virtual'` and describes the routing strategy that should be used. `path` defines where the component is mounted when `routing="path"` is used.
|
|
4
|
+
|
|
5
|
+
In the latest version, the **default** `routing` strategy has become `'path'`. Unless you change the `routing` prop, you'll need to define the `path` prop. The affected components are:
|
|
6
|
+
|
|
7
|
+
- `<SignIn />`
|
|
8
|
+
- `<SignUp />`
|
|
9
|
+
- `<UserProfile />`
|
|
10
|
+
- `<CreateOrganization />`
|
|
11
|
+
- `<OrganizationProfile />`
|
|
12
|
+
|
|
13
|
+
Here's how you'd use the components going forward:
|
|
14
|
+
|
|
15
|
+
```jsx
|
|
16
|
+
<SignIn path="/sign-in" />
|
|
17
|
+
<SignUp path="/sign-up" />
|
|
18
|
+
<UserProfile path="/user-profile" />
|
|
19
|
+
<CreateOrganization path="/create-org" />
|
|
20
|
+
<OrganizationProfile path="/org-profile" />
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
If you don't define the `path` prop an error will be thrown. Of course, you can still use `routing="hash"` or `routing="virtual"`.
|
|
24
|
+
|
|
25
|
+
```jsx
|
|
26
|
+
<UserProfile routing="hash" />
|
|
27
|
+
<OrganizationProfile routing="virtual" />
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
<% if (['@clerk/nextjs', '@clerk/remix'].includes(packageName)) { %>
|
|
31
|
+
For the <%= packageName %> SDK, you can set environment variables for the sign up/in URLs and avoid needing to explicitly pass the path to the `<SignIn />` and `<SignUp />` components.
|
|
32
|
+
|
|
33
|
+
<% if (packageName === '@clerk/nextjs') { %>
|
|
34
|
+
|
|
35
|
+
```env filename=".env.local"
|
|
36
|
+
NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
|
|
37
|
+
NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
<% } %>
|
|
41
|
+
<% if (packageName === '@clerk/remix') { %>
|
|
42
|
+
|
|
43
|
+
```env filename=".env"
|
|
44
|
+
CLERK_SIGN_IN_URL=/sign-in
|
|
45
|
+
CLERK_SIGN_UP_URL=/sign-up
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
<% } %>
|
|
49
|
+
|
|
50
|
+
If you have defined both environment variables, you're able to use the `<SignIn />` and `<SignUp />` components without any props, as such:
|
|
51
|
+
|
|
52
|
+
```jsx
|
|
53
|
+
<SignIn />
|
|
54
|
+
<SignUp />
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
<% } %>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
## Preparing to upgrade
|
|
2
|
+
|
|
3
|
+
Before uprading, it's highly recommended that you update your Clerk SDKs to the latest Core 1 version (`npm i <%= packageName %>@<%= parseInt(version.substring(1)) - 1 %>`). Some changes required for Core 2 SDKs can be applied incrementally to the <%= version %> release, which should contribute to a smoother upgrading experience. After updating, look out for deprecation messages in your terminal and browser console. By resolving these deprecations you'll be able to skip many breaking changes from Core 2.
|
|
4
|
+
|
|
5
|
+
<Callout>
|
|
6
|
+
Note that Core 2 is currently in beta, while we field feedback and ensure stability. Deploying beta versions to
|
|
7
|
+
production is not recommended and should be done at your own risk.
|
|
8
|
+
</Callout>
|
|
9
|
+
|
|
10
|
+
Additionally, some of the minumum version requirements for some base dependencies have been updated such that versions that are no longer supported or are at end-of-life are no longer guaranteed to work correctly with Clerk.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
**Updating React**
|
|
2
|
+
|
|
3
|
+
All react-dependent Clerk SDKs now require you to use React 18 or higher. You can update your project by installing the latest version of `react` and `react-dom`.
|
|
4
|
+
|
|
5
|
+
<CodeBlockTabs type="installer" options={["npm", "yarn", "pnpm"]}>
|
|
6
|
+
```bash filename="terminal"
|
|
7
|
+
npm install react@latest react-dom@latest
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
```bash filename="terminal"
|
|
11
|
+
yarn add react@latest react-dom@latest
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
```bash filename="terminal"
|
|
15
|
+
pnpm add react@latest react-dom@latest
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
</CodeBlockTabs>
|
|
19
|
+
|
|
20
|
+
If you are upgrading from React 17 or lower, make sure to [learn about how to upgrade your React version to 18](https://react.dev/blog/2022/03/08/react-18-upgrade-guide) as well.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
### Component design adjustments
|
|
2
|
+
|
|
3
|
+
The new version ships with improved design and UX across all of Clerk's [UI components](/docs/components/overview). If you have used the [`appearance` prop](/docs/components/customization/overview) or tokens for a [custom theme](/docs/components/customization/overview#create-a-custom-theme), you will likely need to make some adjustments to ensure your styling is still looking great. If you're using the [localization prop](/docs/components/customization/localization) you will likely need to make adjustments to account for added or removed localization keys.
|
|
4
|
+
|
|
5
|
+
[More detail on these changes »](component-redesign)
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
## Updating to Core 2 Beta
|
|
2
|
+
|
|
3
|
+
Whenever you feel ready, go ahead and install the latest beta version of any Clerk SDKs you are using. Make sure that you are prepared to patch some breaking changes before your app will work properly, however. The commands below demonstrate how to install the latest beta.
|
|
4
|
+
|
|
5
|
+
<CodeBlockTabs type="installer" options={["npm", "yarn", "pnpm"]}>
|
|
6
|
+
```bash filename="terminal"
|
|
7
|
+
npm install <%= packageName %>@beta
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
```bash filename="terminal"
|
|
11
|
+
yarn add <%= packageName %>@beta
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
```bash filename="terminal"
|
|
15
|
+
pnpm add <%= packageName %>@beta
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
</CodeBlockTabs>
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import ejs from 'ejs';
|
|
2
|
+
import { existsSync, readFileSync, writeFileSync } from 'fs';
|
|
3
|
+
import { parseInline } from 'marked';
|
|
4
|
+
import path from 'path';
|
|
5
|
+
import { fileURLToPath } from 'url';
|
|
6
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
7
|
+
export async function loadVersionChangeData(version, sdk) {
|
|
8
|
+
return (await import(`../versions/${version}/index.js`)).default[sdk];
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
// Small utility for assembling and spacing out content pieces.
|
|
12
|
+
export function assembleContent(options, content) {
|
|
13
|
+
return content.reduce((output, item) => {
|
|
14
|
+
output += typeof item === 'function' ? item(options) : item;
|
|
15
|
+
output += '\n\n';
|
|
16
|
+
return output;
|
|
17
|
+
}, '');
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// Renders an object into a frontmatter string
|
|
21
|
+
export function frontmatter(obj) {
|
|
22
|
+
return `---
|
|
23
|
+
${Object.keys(obj).map(k => `${k}: "${obj[k]}"`).join('\n')}
|
|
24
|
+
---`;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// Renders a markdown file, partial-style - will read out of shared if not found in sdk dir
|
|
28
|
+
export const markdown = partial((p, {
|
|
29
|
+
cwd
|
|
30
|
+
}) => {
|
|
31
|
+
const defaultPath = path.join(__dirname, cwd, p + '.mdx');
|
|
32
|
+
const sharedPath = path.join(__dirname, cwd, '../shared', p + '.mdx');
|
|
33
|
+
return readFileSync(existsSync(defaultPath) ? defaultPath : sharedPath, 'utf8').trim();
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
// Renders a markdown file with EJS template valyes
|
|
37
|
+
export const markdownTemplate = partial((p, data, {
|
|
38
|
+
cwd
|
|
39
|
+
}) => {
|
|
40
|
+
const defaultPath = path.join(__dirname, cwd, p + '.mdx');
|
|
41
|
+
const sharedPath = path.join(__dirname, cwd, '../shared', p + '.mdx');
|
|
42
|
+
return ejs.render(readFileSync(existsSync(defaultPath) ? defaultPath : sharedPath, 'utf8').trim(), data);
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
// Given a single change item, renders it as its own markdown section.
|
|
46
|
+
// Typically used to highlight a specific change item that has a larger
|
|
47
|
+
// impact and/or is likely to affect most users.
|
|
48
|
+
export const singleItem = partial((slug, {
|
|
49
|
+
data
|
|
50
|
+
}) => {
|
|
51
|
+
const item = data.find(i => i.slug === slug);
|
|
52
|
+
return `### ${item.title}
|
|
53
|
+
|
|
54
|
+
${item.content.trim()}`;
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
// Given a set of change data and one or more categories, renders each item
|
|
58
|
+
// in the given categories into an accordion.
|
|
59
|
+
// Typically used to present a set of related changes or a longer list of changes
|
|
60
|
+
// that are de-emphasized as they are unlikely to be present for most users.
|
|
61
|
+
export const accordionForCategory = partial((categories, options, {
|
|
62
|
+
data
|
|
63
|
+
}) => {
|
|
64
|
+
const items = filterCategories(data, categories);
|
|
65
|
+
options ||= {};
|
|
66
|
+
if (options.additionalItems) items.push(...[].concat(options.additionalItems));
|
|
67
|
+
return `<Accordion titles={[${items.map(i => `"${parseInline(i.title)}"`).join(', ')}]}>
|
|
68
|
+
${items.map(i => ` <AccordionPanel>${indent('\n' + i.content.trim(), 4)}\n </AccordionPanel>`).join('\n')}
|
|
69
|
+
</Accordion>`;
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
// The "deprecation removals & housekeeping" section is standard at the bottom of
|
|
73
|
+
// each migration guide, and comprises a set of breaking changes that any given
|
|
74
|
+
// user is very unlikely to run into, so it is de-emphasized to make the upgrade
|
|
75
|
+
// process feel less scary.
|
|
76
|
+
export const deprecationRemovalsAndHousekeeping = partial((includeCategories, opts) => {
|
|
77
|
+
includeCategories ||= [];
|
|
78
|
+
const hasDeprecations = filterCategories(opts.data, 'deprecation-removal').length;
|
|
79
|
+
const hasOtherChanges = filterCategories(opts.data, [undefined, ...includeCategories]).length;
|
|
80
|
+
const content = ['### Deprecation removals & housekeeping', markdown('deprecation-removals')];
|
|
81
|
+
if (hasDeprecations) {
|
|
82
|
+
content.push('#### Deprecation removals');
|
|
83
|
+
content.push(accordionForCategory('deprecation-removal'));
|
|
84
|
+
}
|
|
85
|
+
if (hasOtherChanges) {
|
|
86
|
+
content.push('#### Other Breaking changes');
|
|
87
|
+
content.push(accordionForCategory([undefined, ...includeCategories]));
|
|
88
|
+
}
|
|
89
|
+
return assembleContent(opts, content);
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
// writes output to an mdx file
|
|
93
|
+
export const writeToFile = partial((cwd, content) => {
|
|
94
|
+
writeFileSync(path.join(__dirname, cwd, '__output.mdx'), content);
|
|
95
|
+
});
|
|
96
|
+
function filterCategories(data, categories) {
|
|
97
|
+
return data.filter(i => [].concat(categories).includes(i.category));
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// Small internal utility to ensure proper indentation within the resulting markup.
|
|
101
|
+
function indent(str, numSpaces) {
|
|
102
|
+
return str.split('\n').map(l => `${' '.repeat(numSpaces)}${l}`).join('\n');
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// Partial application utility, enables assembleContent to pass data into every child easily.
|
|
106
|
+
// This is one of the craziest functions I have written in my day 🥹
|
|
107
|
+
function partial(fn) {
|
|
108
|
+
return (...args) => fn.bind(null, ...args.concat(Array(fn.length - args.length - 1)));
|
|
109
|
+
}
|
package/dist/util/load-change.js
CHANGED
|
@@ -11,8 +11,8 @@ export default function createLoader({
|
|
|
11
11
|
// Note: This could benefit perf-wise by being converted to async, but it would
|
|
12
12
|
// make the code a decent amount more complex.
|
|
13
13
|
return slugs.map(slug => {
|
|
14
|
-
const sdkPath = path.join(__dirname, '../versions',
|
|
15
|
-
const sharedPath = path.join(__dirname, '../versions',
|
|
14
|
+
const sdkPath = path.join(__dirname, '../versions', `${version}`, sdk, `${slug}.md`);
|
|
15
|
+
const sharedPath = path.join(__dirname, '../versions', `${version}`, 'common', `${slug}.md`);
|
|
16
16
|
const loadPath = fs.existsSync(sdkPath) ? sdkPath : sharedPath;
|
|
17
17
|
const content = fs.readFileSync(loadPath, 'utf8');
|
|
18
18
|
const parsed = matter(content);
|
|
@@ -25,6 +25,7 @@ export default function createLoader({
|
|
|
25
25
|
sdk: sdk,
|
|
26
26
|
content: parsed.content,
|
|
27
27
|
warning: fm.warning,
|
|
28
|
+
category: fm.category,
|
|
28
29
|
link: `${baseUrl}#${slug}`
|
|
29
30
|
};
|
|
30
31
|
});
|
|
@@ -3,6 +3,7 @@ title: '`constants` import moved to `@clerk/backend/internal`'
|
|
|
3
3
|
matcher: "import\\s+{[\\s\\S]*?constants[\\s\\S]*?}\\s+from\\s+['\"]@clerk\\/(backend)['\"]"
|
|
4
4
|
matcherFlags: 'm'
|
|
5
5
|
replaceWithString: 'backend/internal'
|
|
6
|
+
category: 'import-paths'
|
|
6
7
|
---
|
|
7
8
|
|
|
8
9
|
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:
|
|
@@ -3,6 +3,7 @@ title: '`createAuthenticateRequest` import moved to `@clerk/backend/internal`'
|
|
|
3
3
|
matcher: "import\\s+{[\\s\\S]*?createAuthenticateRequest[\\s\\S]*?}\\s+from\\s+['\"]@clerk\\/(backend)['\"]"
|
|
4
4
|
matcherFlags: 'm'
|
|
5
5
|
replaceWithString: 'backend/internal'
|
|
6
|
+
category: 'import-paths'
|
|
6
7
|
---
|
|
7
8
|
|
|
8
9
|
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:
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
title: '`frontendApi` -> `publishableKey` as param to createClerkClient'
|
|
3
3
|
matcher: "(?:createClerkClient|Clerk)\\(\\s*{[\\s\\S]*?frontendApi:[\\s\\S]*?\\)"
|
|
4
4
|
matcherFlags: 'm'
|
|
5
|
+
category: 'deprecation-removal'
|
|
5
6
|
---
|
|
6
7
|
|
|
7
8
|
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.
|
|
@@ -3,6 +3,7 @@ title: '`createIsomorphicRequest` import moved to `@clerk/backend/internal`'
|
|
|
3
3
|
matcher: "import\\s+{[\\s\\S]*?createIsomorphicRequest[\\s\\S]*?}\\s+from\\s+['\"]@clerk\\/(backend)['\"]"
|
|
4
4
|
matcherFlags: 'm'
|
|
5
5
|
replaceWithString: 'backend/internal'
|
|
6
|
+
category: 'import-paths'
|
|
6
7
|
---
|
|
7
8
|
|
|
8
9
|
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:
|
|
@@ -3,6 +3,7 @@ title: '`createIsomorphicRequest` import moved to `/internal`'
|
|
|
3
3
|
matcher: "import\\s+{[\\s\\S]*?createIsomorphicRequest[\\s\\S]*?}\\s+from\\s+['\"]@clerk\/(backend)['\"]"
|
|
4
4
|
replaceWithString: 'backend/internal'
|
|
5
5
|
matcherFlags: 'm'
|
|
6
|
+
category: 'import-paths'
|
|
6
7
|
---
|
|
7
8
|
|
|
8
9
|
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.
|
|
@@ -3,6 +3,7 @@ title: '`decodeJwt` import moved to `@clerk/backend/tokens`'
|
|
|
3
3
|
matcher: "import\\s+{[\\s\\S]*?decodeJwt[\\s\\S]*?}\\s+from\\s+['\"]@clerk\\/(backend)['\"]"
|
|
4
4
|
matcherFlags: 'm'
|
|
5
5
|
replaceWithString: 'backend/tokens'
|
|
6
|
+
category: 'import-paths'
|
|
6
7
|
---
|
|
7
8
|
|
|
8
9
|
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
|