@clerk/upgrade 0.2.0 → 0.3.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/guide-generators/text-generation.js +109 -0
- package/dist/guide-generators/v5/backend/__output.mdx +580 -0
- package/dist/guide-generators/v5/backend/import-moves.mdx +3 -0
- package/dist/guide-generators/v5/backend/import-paths.mdx +3 -0
- package/dist/guide-generators/v5/backend/index.js +22 -0
- package/dist/guide-generators/v5/backend/intro.mdx +3 -0
- package/dist/guide-generators/v5/chrome-extension/index.js +19 -0
- package/dist/guide-generators/v5/chrome-extension/intro.mdx +3 -0
- package/dist/guide-generators/v5/chromeExtension/__output.mdx +409 -0
- package/dist/guide-generators/v5/chromeExtension/index.js +24 -0
- package/dist/guide-generators/v5/chromeExtension/intro.mdx +3 -0
- package/dist/guide-generators/v5/expo/__output.mdx +455 -0
- package/dist/guide-generators/v5/expo/index.js +24 -0
- package/dist/guide-generators/v5/expo/intro.mdx +3 -0
- package/dist/guide-generators/v5/fastify/__output.mdx +373 -0
- package/dist/guide-generators/v5/fastify/index.js +22 -0
- package/dist/guide-generators/v5/fastify/intro.mdx +3 -0
- package/dist/guide-generators/v5/gatsby/__output.mdx +472 -0
- package/dist/guide-generators/v5/gatsby/index.js +24 -0
- package/dist/guide-generators/v5/gatsby/intro.mdx +3 -0
- package/dist/guide-generators/v5/generate-all.js +0 -0
- package/dist/guide-generators/v5/generate-all.sh +16 -0
- package/dist/guide-generators/v5/generate.js +263 -0
- package/dist/guide-generators/v5/intro.mdx +15 -0
- package/dist/guide-generators/v5/js/__output.mdx +528 -0
- package/dist/guide-generators/v5/js/index.js +27 -0
- package/dist/guide-generators/v5/js/intro.mdx +3 -0
- package/dist/guide-generators/v5/js/pagination-args.mdx +3 -0
- package/dist/guide-generators/v5/js/pagination-return.mdx +3 -0
- package/dist/guide-generators/v5/nextjs/__output.mdx +1091 -0
- package/dist/guide-generators/v5/nextjs/after-sign-x-handling.mdx +10 -0
- package/dist/guide-generators/v5/nextjs/deprecation-removals.mdx +9 -0
- package/dist/guide-generators/v5/nextjs/import-changes.mdx +98 -0
- package/dist/guide-generators/v5/nextjs/index.js +24 -0
- package/dist/guide-generators/v5/nextjs/intro.mdx +3 -0
- package/dist/guide-generators/v5/nextjs/middleware-changes.mdx +251 -0
- package/dist/guide-generators/v5/nextjs/nextjs-versio.mdx +34 -0
- package/dist/guide-generators/v5/nextjs/nextjs-version.mdx +6 -0
- package/dist/guide-generators/v5/nextjs/retheme-changes.mdx +10 -0
- package/dist/guide-generators/v5/nextjs/version-requirements.mdx +34 -0
- package/dist/guide-generators/v5/node/__output.mdx +511 -0
- package/dist/guide-generators/v5/node/index.js +22 -0
- package/dist/guide-generators/v5/node/intro.mdx +3 -0
- package/dist/guide-generators/v5/node/node-setters-removals.mdx +34 -0
- package/dist/guide-generators/v5/overview/__output.mdx +37 -0
- package/dist/guide-generators/v5/overview/index.js +12 -0
- package/dist/guide-generators/v5/overview/intro.mdx +31 -0
- package/dist/guide-generators/v5/overview/per-sdk.mdx +16 -0
- package/dist/guide-generators/v5/per-sdk.mdx +16 -0
- package/dist/guide-generators/v5/prepare.mdx +135 -0
- package/dist/guide-generators/v5/react/__output.mdx +679 -0
- package/dist/guide-generators/v5/react/hof-removals.mdx +3 -0
- package/dist/guide-generators/v5/react/index.js +24 -0
- package/dist/guide-generators/v5/react/intro.mdx +3 -0
- package/dist/guide-generators/v5/redesigned-components.mdx +11 -0
- package/dist/guide-generators/v5/remix/__output.mdx +401 -0
- package/dist/guide-generators/v5/remix/index.js +24 -0
- package/dist/guide-generators/v5/remix/intro.mdx +3 -0
- package/dist/guide-generators/v5/retheme/__output.mdx +437 -0
- package/dist/guide-generators/v5/retheme/index.js +24 -0
- package/dist/guide-generators/v5/retheme/intro.mdx +9 -0
- package/dist/guide-generators/v5/shared/after-sign-x-handling.mdx +10 -0
- package/dist/guide-generators/v5/shared/cli.mdx +22 -0
- package/dist/guide-generators/v5/shared/deprecation-removals.mdx +6 -0
- package/dist/guide-generators/v5/shared/hof-removals.mdx +3 -0
- package/dist/guide-generators/v5/shared/image-url.mdx +3 -0
- package/dist/guide-generators/v5/shared/node-setters-removals.mdx +34 -0
- package/dist/guide-generators/v5/shared/node-version.mdx +3 -0
- package/dist/guide-generators/v5/shared/orgs-claim.mdx +50 -0
- package/dist/guide-generators/v5/shared/pagination-args.mdx +3 -0
- package/dist/guide-generators/v5/shared/pagination-return.mdx +3 -0
- package/dist/guide-generators/v5/shared/path-routing.mdx +57 -0
- package/dist/guide-generators/v5/shared/prepare.mdx +10 -0
- package/dist/guide-generators/v5/shared/react-version.mdx +20 -0
- package/dist/guide-generators/v5/shared/redesign-preview.mdx +5 -0
- package/dist/guide-generators/v5/shared/update-v5.mdx +17 -0
- package/dist/guide-generators/v5/shared/update-version.mdx +18 -0
- package/dist/guide-generators/v5/single-page-old.js +192 -0
- package/dist/guide-generators/v5-guides/deprecation-removals.mdx +7 -0
- package/dist/guide-generators/v5-guides/generate.js +263 -0
- package/dist/guide-generators/v5-guides/hof-removals.mdx +3 -0
- package/dist/guide-generators/v5-guides/intro.mdx +15 -0
- package/dist/guide-generators/v5-guides/nextjs/after-sign-x-handling.mdx +10 -0
- package/dist/guide-generators/v5-guides/nextjs/deprecation-removals.mdx +9 -0
- package/dist/guide-generators/v5-guides/nextjs/import-changes.mdx +98 -0
- package/dist/guide-generators/v5-guides/nextjs/index.js +80 -0
- package/dist/guide-generators/v5-guides/nextjs/intro.mdx +21 -0
- package/dist/guide-generators/v5-guides/nextjs/middleware-changes.mdx +251 -0
- package/dist/guide-generators/v5-guides/nextjs/retheme-changes.mdx +10 -0
- package/dist/guide-generators/v5-guides/nextjs/version-requirements.mdx +34 -0
- package/dist/guide-generators/v5-guides/node-setters-removals.mdx +34 -0
- package/dist/guide-generators/v5-guides/pagination-args.mdx +3 -0
- package/dist/guide-generators/v5-guides/pagination-return.mdx +3 -0
- package/dist/guide-generators/v5-guides/path-routing.mdx +50 -0
- package/dist/guide-generators/v5-guides/per-sdk.mdx +16 -0
- package/dist/guide-generators/v5-guides/prepare.mdx +135 -0
- package/dist/guide-generators/v5-guides/redesign-preview.mdx +5 -0
- package/dist/guide-generators/v5-guides/redesigned-components.mdx +11 -0
- package/dist/guide-generators/v5-guides/remix/index.js +15 -0
- package/dist/guide-generators/v5-guides/remix/intro.mdx +1 -0
- package/dist/guide-generators/v5-guides/remix/output.mdx +362 -0
- package/dist/guide-generators/v5-guides/shared/breaking-changes-intro.mdx +0 -0
- package/dist/guide-generators/v5-guides/shared/cli.mdx +21 -0
- package/dist/guide-generators/v5-guides/shared/deprecation-removals.mdx +7 -0
- package/dist/guide-generators/v5-guides/shared/hof-removals.mdx +3 -0
- package/dist/guide-generators/v5-guides/shared/node-setters-removals.mdx +34 -0
- package/dist/guide-generators/v5-guides/shared/node-version.mdx +3 -0
- package/dist/guide-generators/v5-guides/shared/pagination-args.mdx +3 -0
- package/dist/guide-generators/v5-guides/shared/pagination-return.mdx +3 -0
- package/dist/guide-generators/v5-guides/shared/path-routing.mdx +50 -0
- package/dist/guide-generators/v5-guides/shared/prepare.mdx +7 -0
- package/dist/guide-generators/v5-guides/shared/react-version.mdx +19 -0
- package/dist/guide-generators/v5-guides/shared/redesign-preview.mdx +5 -0
- package/dist/guide-generators/v5-guides/shared/update-v5.mdx +17 -0
- package/dist/guide-generators/v5-guides/shared/upgrade-v5.mdx +17 -0
- package/dist/scan.js +4 -2
- package/dist/util/generate-nextjs-migration-guide.js +0 -0
- package/dist/util/generate-nextjs-v5-migration-guide.js +0 -0
- package/dist/util/load-change.js +1 -0
- package/dist/util/text-generation.js +29 -0
- package/dist/util/v5-guide/deprecation-removals.mdx +7 -0
- package/dist/util/v5-guide/generate.js +200 -0
- package/dist/util/v5-guide/getting-up-to-date.mdx +114 -0
- package/dist/util/v5-guide/hof-removals.mdx +3 -0
- package/dist/util/v5-guide/intro.mdx +15 -0
- package/dist/util/v5-guide/node-setters-removals.mdx +34 -0
- package/dist/util/v5-guide/pagination-args.mdx +3 -0
- package/dist/util/v5-guide/pagination-return.mdx +3 -0
- package/dist/util/v5-guide/path-routing.mdx +50 -0
- package/dist/util/v5-guide/per-sdk.mdx +16 -0
- package/dist/util/v5-guide/prepare.mdx +135 -0
- package/dist/util/v5-guide/redesign-preview.mdx +5 -0
- package/dist/util/v5-guide/redesigned-components.mdx +11 -0
- package/dist/util/v5-guide/remix.mdx +0 -0
- package/dist/util/v5-guides/deprecation-removals.mdx +7 -0
- package/dist/util/v5-guides/generate.js +200 -0
- package/dist/util/v5-guides/hof-removals.mdx +3 -0
- package/dist/util/v5-guides/intro.mdx +15 -0
- package/dist/util/v5-guides/nextjs/after-sign-x-handling.mdx +10 -0
- package/dist/util/v5-guides/nextjs/deprecation-removals.mdx +9 -0
- package/dist/util/v5-guides/nextjs/generate.js +80 -0
- package/dist/util/v5-guides/nextjs/import-changes.mdx +98 -0
- package/dist/util/v5-guides/nextjs/index.js +0 -0
- package/dist/util/v5-guides/nextjs/intro.mdx +21 -0
- package/dist/util/v5-guides/nextjs/middleware-changes.mdx +251 -0
- package/dist/util/v5-guides/nextjs/retheme-changes.mdx +10 -0
- package/dist/util/v5-guides/nextjs/version-requirements.mdx +34 -0
- package/dist/util/v5-guides/node-setters-removals.mdx +34 -0
- package/dist/util/v5-guides/pagination-args.mdx +3 -0
- package/dist/util/v5-guides/pagination-return.mdx +3 -0
- package/dist/util/v5-guides/path-routing.mdx +50 -0
- package/dist/util/v5-guides/per-sdk.mdx +16 -0
- package/dist/util/v5-guides/prepare.mdx +135 -0
- package/dist/util/v5-guides/redesign-preview.mdx +5 -0
- package/dist/util/v5-guides/redesigned-components.mdx +11 -0
- package/dist/util/v5-guides/remix/index.js +5 -0
- package/dist/util/v5-nextjs-guide/after-sign-x-handling.mdx +10 -0
- package/dist/util/v5-nextjs-guide/deprecation-removals.mdx +9 -0
- package/dist/util/v5-nextjs-guide/generate-nextjs-v5-migration-guide.js +0 -0
- package/dist/util/v5-nextjs-guide/generate.js +80 -0
- package/dist/util/v5-nextjs-guide/import-changes.mdx +98 -0
- package/dist/util/v5-nextjs-guide/intro.md +0 -0
- package/dist/util/v5-nextjs-guide/intro.mdx +21 -0
- package/dist/util/v5-nextjs-guide/middleware-changes.mdx +251 -0
- package/dist/util/v5-nextjs-guide/retheme-changes.mdx +11 -0
- package/dist/util/v5-nextjs-guide/version-requirements.mdx +34 -0
- package/dist/versions/v5/backend/appearance-organizationpreview-organizationswitcher.md +9 -0
- package/dist/versions/v5/backend/authenticaterequest-params-change.md +1 -0
- package/dist/versions/v5/backend/clockskewinseconds.md +1 -0
- package/dist/versions/v5/backend/constants-import-path-move.md +1 -0
- package/dist/versions/v5/backend/createauthenticaterequest-import-path-move.md +1 -0
- package/dist/versions/v5/backend/createclerkclient-apikey.md +1 -0
- package/dist/versions/v5/backend/createclerkclient-frontendapi.md +1 -0
- package/dist/versions/v5/backend/createisomorphicrequest-import-path-move.md +1 -0
- package/dist/versions/v5/backend/createisomorphicrequest-removed.md +1 -0
- package/dist/versions/v5/backend/decodejwt-import-path-move.md +1 -0
- package/dist/versions/v5/backend/externalaccount-picture.md +1 -0
- package/dist/versions/v5/backend/externalaccountjson-avatarurl.md +1 -0
- package/dist/versions/v5/backend/getorganizationinvitationlist-return-signature.md +1 -0
- package/dist/versions/v5/backend/getorganizationinvitationlist-return-type-change.md +17 -0
- package/dist/versions/v5/backend/getorganizationlist-return-signature.md +1 -0
- package/dist/versions/v5/backend/getorganizationmembershiplist-return-signature.md +1 -0
- package/dist/versions/v5/backend/httpoptions-removed.md +2 -1
- package/dist/versions/v5/backend/organizationjson-logourl.md +1 -0
- package/dist/versions/v5/backend/organizationmembershippublicuserdatajson-profileimageurl.md +1 -0
- package/dist/versions/v5/backend/redirect-import-path-move.md +1 -0
- package/dist/versions/v5/backend/signjwt-import-path-move.md +1 -0
- package/dist/versions/v5/backend/signjwterror-import-move.md +1 -0
- package/dist/versions/v5/backend/tokenverificationerror-import-move.md +1 -0
- package/dist/versions/v5/backend/tokenverificationerroraction-import-move.md +1 -0
- package/dist/versions/v5/backend/tokenverificationerrorcode-import-move.md +1 -0
- package/dist/versions/v5/backend/tokenverificationerrorreason-import-move.md +1 -0
- package/dist/versions/v5/backend/userjson-profileimageurl.md +1 -0
- package/dist/versions/v5/backend/verifyjwt-import-path-move.md +1 -0
- package/dist/versions/v5/chromeExtension/clerkprovider-tokencache.md +8 -10
- package/dist/versions/v5/common/aftersigninurl-behavior-change-2.md +1 -0
- package/dist/versions/v5/common/aftersignouturl-behavior-change.md +1 -0
- package/dist/versions/v5/common/aftersignupurl-behavior-change.md +1 -0
- package/dist/versions/v5/common/afterswitchorganizationurl.md +1 -0
- package/dist/versions/v5/common/alternativemethods-backlink.md +1 -0
- package/dist/versions/v5/common/api-key-to-secret-key.md +1 -0
- package/dist/versions/v5/common/appearance-organizationpreview-organizationswitcher.md +1 -0
- package/dist/versions/v5/common/button-to-organizationlistcreateorganizationactionbutton.md +1 -0
- package/dist/versions/v5/common/card-changes.md +3 -2
- package/dist/versions/v5/common/changed-localization-keys.md +121 -120
- package/dist/versions/v5/common/clerkprovider-frontendapi-2.md +1 -0
- package/dist/versions/v5/common/clerkprovideroptionswrapper-dropped.md +1 -0
- package/dist/versions/v5/common/connected-accounts-dropdown.md +1 -0
- package/dist/versions/v5/common/emaillinkerrorcode-import-change.md +1 -0
- package/dist/versions/v5/common/externalaccount-avatarurl.md +7 -0
- package/dist/versions/v5/common/externalaccount-picture.md +7 -0
- package/dist/versions/v5/common/externalaccountjson-avatarurl.md +7 -0
- package/dist/versions/v5/common/frontend-api-to-publishable-key.md +1 -0
- package/dist/versions/v5/common/getorganizationinvitationlist-return-signature.md +15 -0
- package/dist/versions/v5/common/getorganizationinvitationlist-return-type-change.md +8 -5
- package/dist/versions/v5/common/getorganizationlist-return-signature.md +15 -0
- package/dist/versions/v5/common/getorganizationlist-return-type-change.md +2 -1
- package/dist/versions/v5/common/getorganizationmembershiplist-return-type-change.md +2 -1
- package/dist/versions/v5/common/isclerkapiresponserror-import-change.md +1 -0
- package/dist/versions/v5/common/isemaillinkerror-import-change.md +1 -0
- package/dist/versions/v5/common/isknownerror-import-change.md +1 -0
- package/dist/versions/v5/common/ismetamaskerror-import-change.md +6 -5
- package/dist/versions/v5/common/mfa-dropdown.md +1 -0
- package/dist/versions/v5/common/min-react-version.md +2 -0
- package/dist/versions/v5/common/multisessionappsupport-import-change.md +1 -1
- package/dist/versions/v5/common/navigate-to-routerpush-routerreplace.md +1 -0
- package/dist/versions/v5/common/new-localization-keys.md +121 -120
- package/dist/versions/v5/common/organization-create-string.md +12 -0
- package/dist/versions/v5/common/organization-getdomains-arguments-change.md +1 -0
- package/dist/versions/v5/common/organization-getinvitations-arguments-changed.md +1 -0
- package/dist/versions/v5/common/organization-getmembershiprequests-arguments-changed.md +1 -0
- package/dist/versions/v5/common/organization-getmemberships-arguments-changed.md +1 -0
- package/dist/versions/v5/common/organization-getpendinginvitations.md +11 -0
- package/dist/versions/v5/common/organization-getroles-arguments-changed.md +1 -0
- package/dist/versions/v5/common/organization-logourl.md +8 -0
- package/dist/versions/v5/common/organizationmembershippublicuserdata-profileimageurl.md +7 -0
- package/dist/versions/v5/common/organizationprofile-settings.md +1 -0
- package/dist/versions/v5/common/organizationswitcherpopoveractionbuttontext-removed.md +1 -0
- package/dist/versions/v5/common/remove-identitypreview-avatar.md +1 -0
- package/dist/versions/v5/common/remove-socialbuttonsblockbuttonarrow.md +1 -0
- package/dist/versions/v5/common/removed-localization-keys.md +74 -73
- package/dist/versions/v5/common/user-getorganizationinvitations-arguments-chanaged.md +1 -0
- package/dist/versions/v5/common/user-getorganizationinvitations-arguments-changed.md +16 -0
- package/dist/versions/v5/common/user-getorganizationmemberships-arguments-chanaged.md +1 -0
- package/dist/versions/v5/common/user-getorganizationmemberships-arguments-changed.md +16 -0
- package/dist/versions/v5/common/user-getorganizationsuggestions-arguments-chanaged.md +1 -0
- package/dist/versions/v5/common/user-getorganizationsuggestions-arguments-changed.md +16 -0
- package/dist/versions/v5/common/user-profileimageurl.md +7 -0
- package/dist/versions/v5/common/user-update-password.md +18 -0
- package/dist/versions/v5/common/userbuttonpopoveractionbuttontext-removed.md +1 -0
- package/dist/versions/v5/common/userbuttontrigger-userbuttonbox-invert.md +2 -1
- package/dist/versions/v5/common/userprofile-security.md +1 -0
- package/dist/versions/v5/common/withclerk-hof-removed.md +15 -14
- package/dist/versions/v5/common/withclerk-removed.md +1 -0
- package/dist/versions/v5/common/withsession-hof-removed.md +15 -14
- package/dist/versions/v5/common/withsession-removed.md +1 -0
- package/dist/versions/v5/common/withuser-hof-removed.md +15 -14
- package/dist/versions/v5/common/withuser-removed-2.md +1 -2
- package/dist/versions/v5/expo/apikey-to-publishable-key.md +1 -0
- package/dist/versions/v5/expo/clerkprovider-frontendapi.md +1 -0
- package/dist/versions/v5/fastify/clerkplugin-frontendapi.md +2 -1
- package/dist/versions/v5/fastify/createclerkclient-apikey.md +1 -0
- package/dist/versions/v5/fastify/createclerkclient-frontendapi.md +1 -0
- package/dist/versions/v5/gatsby/api-url-value-change.md +1 -1
- package/dist/versions/v5/gatsby/apikey-to-publishable-key.md +1 -0
- package/dist/versions/v5/gatsby/createclerkclient-apikey.md +1 -0
- package/dist/versions/v5/gatsby/createclerkclient-frontendapi.md +1 -0
- package/dist/versions/v5/gatsby/withserverauth-return-type.md +22 -30
- package/dist/versions/v5/index.js +16 -26
- package/dist/versions/v5/js/experimental-canusecaptcha.md +1 -0
- package/dist/versions/v5/js/experimental-captchasitekey.md +1 -0
- package/dist/versions/v5/js/experimental-captchaurl.md +1 -0
- package/dist/versions/v5/js/getorganizationmemberships.md +3 -6
- package/dist/versions/v5/js/redirecttohome.md +4 -4
- package/dist/versions/v5/js/signup-attemptweb3walletverification-generatedsignature.md +3 -2
- package/dist/versions/v5/js/unstable-invitationupdate.md +1 -0
- package/dist/versions/v5/js/unstable-membershipupdate.md +1 -0
- package/dist/versions/v5/js/user-createexternalaccount-redirecturl.md +1 -0
- package/dist/versions/v5/js/user-update-password.md +8 -9
- package/dist/versions/v5/next/auth-import-change.md +1 -0
- package/dist/versions/v5/next/auth-middleware-deprecated.md +8 -7
- package/dist/versions/v5/next/authmiddleware-apikey.md +5 -7
- package/dist/versions/v5/next/authmiddleware-frontendapi.md +2 -1
- package/dist/versions/v5/next/authmiddleware-import-change.md +1 -0
- package/dist/versions/v5/next/buildclerkprops-import-change.md +1 -0
- package/dist/versions/v5/next/clerk-import-change.md +1 -0
- package/dist/versions/v5/next/clerk-js-version-next-public.md +1 -0
- package/dist/versions/v5/next/constants-import-change.md +2 -1
- package/dist/versions/v5/next/createauthenticaterequest-import-change.md +1 -0
- package/dist/versions/v5/next/createclerkclient-apikey.md +2 -1
- package/dist/versions/v5/next/createclerkclient-frontendapi.md +2 -1
- package/dist/versions/v5/next/createisomorphicrequest-import-change.md +1 -0
- package/dist/versions/v5/next/currentuser-import-change.md +1 -0
- package/dist/versions/v5/next/decodejwt-import-change.md +1 -0
- package/dist/versions/v5/next/emaillinkerrorcode-import-change.md +1 -0
- package/dist/versions/v5/next/getauth-apikey.md +2 -1
- package/dist/versions/v5/next/import-api-url.md +2 -1
- package/dist/versions/v5/next/import-api-version.md +2 -1
- package/dist/versions/v5/next/import-clerk-js-url.md +2 -1
- package/dist/versions/v5/next/import-clerk-js-version.md +2 -1
- package/dist/versions/v5/next/import-domain.md +2 -1
- package/dist/versions/v5/next/import-is-satellite.md +2 -1
- package/dist/versions/v5/next/import-nextjs-api.md +7 -6
- package/dist/versions/v5/next/import-nextjs-app-beta.md +2 -1
- package/dist/versions/v5/next/import-nextjs-edge-middleware.md +1 -0
- package/dist/versions/v5/next/import-nextjs-edge-middlewarefiles.md +1 -0
- package/dist/versions/v5/next/import-nextjs-ssr.md +1 -0
- package/dist/versions/v5/next/import-proxy-url.md +2 -1
- package/dist/versions/v5/next/import-publishable-key.md +2 -1
- package/dist/versions/v5/next/import-secret-key.md +2 -1
- package/dist/versions/v5/next/import-sign-in-url.md +2 -1
- package/dist/versions/v5/next/import-sign-up-url.md +2 -1
- package/dist/versions/v5/next/isclerkapiresponserror-import-change.md +1 -0
- package/dist/versions/v5/next/isemaillinkerror-import-change.md +1 -0
- package/dist/versions/v5/next/isknownerror-import-change.md +1 -0
- package/dist/versions/v5/next/ismetamaskerror-import-change.md +1 -0
- package/dist/versions/v5/next/min-nextjs-version.md +2 -0
- package/dist/versions/v5/next/multisessionappsupport-import-change.md +1 -0
- package/dist/versions/v5/next/next-public-clerk-js-url.md +2 -1
- package/dist/versions/v5/next/redirect-import-change.md +1 -0
- package/dist/versions/v5/next/redirecttosignin-import-path.md +2 -1
- package/dist/versions/v5/next/redirecttosignup-import-path.md +2 -1
- package/dist/versions/v5/next/signjwt-import-change.md +1 -0
- package/dist/versions/v5/next/verifyjwt-import-change.md +1 -0
- package/dist/versions/v5/next/verifytoken-import-change.md +1 -0
- package/dist/versions/v5/next/with-clerk-middleware-removed.md +1 -0
- package/dist/versions/v5/nextjs/api-url-value-change.md +8 -0
- package/dist/versions/v5/nextjs/auth-import-change.md +14 -0
- package/dist/versions/v5/nextjs/auth-middleware-deprecated.md +50 -0
- package/dist/versions/v5/nextjs/authmiddleware-apikey.md +15 -0
- package/dist/versions/v5/nextjs/authmiddleware-frontendapi.md +15 -0
- package/dist/versions/v5/nextjs/authmiddleware-import-change.md +14 -0
- package/dist/versions/v5/nextjs/buildclerkprops-import-change.md +14 -0
- package/dist/versions/v5/nextjs/clerk-import-change.md +13 -0
- package/dist/versions/v5/nextjs/clerk-js-version-next-public.md +9 -0
- package/dist/versions/v5/nextjs/constants-import-change.md +14 -0
- package/dist/versions/v5/nextjs/createauthenticaterequest-import-change.md +14 -0
- package/dist/versions/v5/nextjs/createclerkclient-apikey.md +15 -0
- package/dist/versions/v5/nextjs/createclerkclient-frontendapi.md +15 -0
- package/dist/versions/v5/nextjs/createisomorphicrequest-import-change.md +14 -0
- package/dist/versions/v5/nextjs/currentuser-import-change.md +14 -0
- package/dist/versions/v5/nextjs/decodejwt-import-change.md +14 -0
- package/dist/versions/v5/nextjs/emaillinkerrorcode-import-change.md +14 -0
- package/dist/versions/v5/nextjs/getauth-apikey.md +13 -0
- package/dist/versions/v5/nextjs/import-api-url.md +8 -0
- package/dist/versions/v5/nextjs/import-api-version.md +8 -0
- package/dist/versions/v5/nextjs/import-clerk-js-url.md +8 -0
- package/dist/versions/v5/nextjs/import-clerk-js-version.md +8 -0
- package/dist/versions/v5/nextjs/import-domain.md +8 -0
- package/dist/versions/v5/nextjs/import-is-satellite.md +8 -0
- package/dist/versions/v5/nextjs/import-nextjs-api.md +21 -0
- package/dist/versions/v5/nextjs/import-nextjs-app-beta.md +11 -0
- package/dist/versions/v5/nextjs/import-nextjs-edge-middleware.md +7 -0
- package/dist/versions/v5/nextjs/import-nextjs-edge-middlewarefiles.md +7 -0
- package/dist/versions/v5/nextjs/import-nextjs-ssr.md +8 -0
- package/dist/versions/v5/nextjs/import-proxy-url.md +8 -0
- package/dist/versions/v5/nextjs/import-publishable-key.md +8 -0
- package/dist/versions/v5/nextjs/import-secret-key.md +8 -0
- package/dist/versions/v5/nextjs/import-sign-in-url.md +8 -0
- package/dist/versions/v5/nextjs/import-sign-up-url.md +8 -0
- package/dist/versions/v5/nextjs/isclerkapiresponserror-import-change.md +14 -0
- package/dist/versions/v5/nextjs/isemaillinkerror-import-change.md +14 -0
- package/dist/versions/v5/nextjs/isknownerror-import-change.md +14 -0
- package/dist/versions/v5/nextjs/min-nextjs-version.md +11 -0
- package/dist/versions/v5/nextjs/multisessionappsupport-import-change.md +14 -0
- package/dist/versions/v5/nextjs/next-public-clerk-js-url.md +7 -0
- package/dist/versions/v5/nextjs/redirect-import-change.md +14 -0
- package/dist/versions/v5/nextjs/redirecttosignin-import-path.md +13 -0
- package/dist/versions/v5/nextjs/redirecttosignup-import-path.md +13 -0
- package/dist/versions/v5/nextjs/signjwt-import-change.md +14 -0
- package/dist/versions/v5/nextjs/verifyjwt-import-change.md +14 -0
- package/dist/versions/v5/nextjs/verifytoken-import-change.md +14 -0
- package/dist/versions/v5/nextjs/with-clerk-middleware-removed.md +56 -0
- package/dist/versions/v5/node/cjs-esm-instance.md +1 -0
- package/dist/versions/v5/node/clerkexpressrequireauth-apikey.md +1 -0
- package/dist/versions/v5/node/clerkexpressrequireauth-frontendapi.md +1 -0
- package/dist/versions/v5/node/clerkexpresswithauth-apikey.md +1 -0
- package/dist/versions/v5/node/clerkexpresswithauth-frontendapi.md +1 -0
- package/dist/versions/v5/node/createclerkclient-apikey.md +1 -0
- package/dist/versions/v5/node/createclerkclient-frontendapi.md +1 -0
- package/dist/versions/v5/node/createclerkexpressrequireauth-apikey.md +1 -0
- package/dist/versions/v5/node/createclerkexpressrequireauth-frontendapi.md +1 -0
- package/dist/versions/v5/node/createclerkexpresswithauth-apikey.md +1 -0
- package/dist/versions/v5/node/createclerkexpresswithauth-frontendapi.md +1 -0
- package/dist/versions/v5/node/legacyauthobject-removed.md +3 -3
- package/dist/versions/v5/node/setclerkapikey.md +1 -0
- package/dist/versions/v5/node/setclerkapiversion.md +1 -0
- package/dist/versions/v5/node/setclerkhttpoptions.md +1 -0
- package/dist/versions/v5/node/setclerkserverapiurl.md +1 -0
- package/dist/versions/v5/react/api-url-value-change.md +1 -1
- package/dist/versions/v5/remix/clerk-import-change.md +1 -0
- package/dist/versions/v5/remix/clerkerrorboundary-removed.md +1 -0
- package/dist/versions/v5/remix/createclerkclient-apikey.md +1 -0
- package/dist/versions/v5/remix/getauth-apikey.md +1 -0
- package/dist/versions/v5/remix/rootauthloader-apikey.md +1 -0
- package/dist/versions/v5/remix/rootauthloader-frontendapi.md +1 -0
- package/package.json +5 -2
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
## Preparing to upgrade
|
|
2
|
+
|
|
3
|
+
Before uprading, it's highly recommended that you update your Clerk SDKs to the latest v4 version. Some changes required for v5 can be applied incrementally to the latest v4, which should contribute to a smoother upgrading experience.
|
|
4
|
+
|
|
5
|
+
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 for v5.
|
|
6
|
+
|
|
7
|
+
Additionally, some of the minumum version requirements for Node.js, React, and Next.js 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. Please take a moment to check your dependencies and ensure you are up to date!
|
|
8
|
+
|
|
9
|
+
#### Updating Node.js
|
|
10
|
+
|
|
11
|
+
You need to have Node.js `18.17.0` or later installed. Last year, Node.js 16 entered EOL (End of life) status so it's time to bump the required version for `@clerk/nextjs`, too. 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).
|
|
12
|
+
|
|
13
|
+
#### Updating React
|
|
14
|
+
|
|
15
|
+
All react-dependent 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`.
|
|
16
|
+
|
|
17
|
+
<CodeBlockTabs type="installer" options={["npm", "yarn", "pnpm"]}>
|
|
18
|
+
```bash filename="terminal"
|
|
19
|
+
npm install react@latest react-dom@latest
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
```bash filename="terminal"
|
|
23
|
+
yarn add react@latest react-dom@latest
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
```bash filename="terminal"
|
|
27
|
+
pnpm add react@latest react-dom@latest
|
|
28
|
+
```
|
|
29
|
+
</CodeBlockTabs>
|
|
30
|
+
|
|
31
|
+
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.
|
|
32
|
+
|
|
33
|
+
## Updating to v5
|
|
34
|
+
|
|
35
|
+
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. Some examples for how to unstall commonly used SDKs are below:
|
|
36
|
+
|
|
37
|
+
<Tabs type="v4-to-v5-sdk" items={["Next.js", "React", "Remix", "JavaScript", "Node.js"]}>
|
|
38
|
+
<Tab>
|
|
39
|
+
<CodeBlockTabs type="installer" options={["npm", "yarn", "pnpm"]}>
|
|
40
|
+
```bash filename="terminal"
|
|
41
|
+
npm install @clerk/nextjs@beta
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
```bash filename="terminal"
|
|
45
|
+
yarn add @clerk/nextjs@beta
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
```bash filename="terminal"
|
|
49
|
+
pnpm add @clerk/nextjs@beta
|
|
50
|
+
```
|
|
51
|
+
</CodeBlockTabs>
|
|
52
|
+
</Tab>
|
|
53
|
+
<Tab>
|
|
54
|
+
<CodeBlockTabs type="installer" options={["npm", "yarn", "pnpm"]}>
|
|
55
|
+
```bash filename="terminal"
|
|
56
|
+
npm install @clerk/clerk-react@beta
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
```bash filename="terminal"
|
|
60
|
+
yarn add @clerk/clerk-react@beta
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
```bash filename="terminal"
|
|
64
|
+
pnpm add @clerk/clerk-react@beta
|
|
65
|
+
```
|
|
66
|
+
</CodeBlockTabs>
|
|
67
|
+
</Tab>
|
|
68
|
+
<Tab>
|
|
69
|
+
<CodeBlockTabs type="installer" options={["npm", "yarn", "pnpm"]}>
|
|
70
|
+
```bash filename="terminal"
|
|
71
|
+
npm install @clerk/remix@beta
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
```bash filename="terminal"
|
|
75
|
+
yarn add @clerk/remix@beta
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
```bash filename="terminal"
|
|
79
|
+
pnpm add @clerk/remix@beta
|
|
80
|
+
```
|
|
81
|
+
</CodeBlockTabs>
|
|
82
|
+
</Tab>
|
|
83
|
+
<Tab>
|
|
84
|
+
<CodeBlockTabs type="installer" options={["npm", "yarn", "pnpm"]}>
|
|
85
|
+
```bash filename="terminal"
|
|
86
|
+
npm install @clerk/clerk-js@beta
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
```bash filename="terminal"
|
|
90
|
+
yarn add @clerk/clerk-js@beta
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
```bash filename="terminal"
|
|
94
|
+
pnpm add @clerk/clerk-js@beta
|
|
95
|
+
```
|
|
96
|
+
</CodeBlockTabs>
|
|
97
|
+
</Tab>
|
|
98
|
+
<Tab>
|
|
99
|
+
<CodeBlockTabs type="installer" options={["npm", "yarn", "pnpm"]}>
|
|
100
|
+
```bash filename="terminal"
|
|
101
|
+
npm install @clerk/clerk-sdk-node@beta
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
```bash filename="terminal"
|
|
105
|
+
yarn add @clerk/clerk-sdk-node@beta
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
```bash filename="terminal"
|
|
109
|
+
pnpm add @clerk/clerk-sdk-node@beta
|
|
110
|
+
```
|
|
111
|
+
</CodeBlockTabs>
|
|
112
|
+
</Tab>
|
|
113
|
+
</Tabs>
|
|
114
|
+
|
|
115
|
+
## CLI Upgrade Helper
|
|
116
|
+
|
|
117
|
+
As of this major version Clerk provides a `@clerk/upgrade` CLI tool that you can use to ease the upgrade. A CLI prompt will ask you a couple of questions, it will scan your codebase, and afterwards you'll get a list of changes you'll need to apply to your project, as well as the locations where they need to be applied. This should catch the vast majority of the changes needed for a successful upgrade to v5, and can save a lot of time reading through changes to things that aren't actually in your project.
|
|
118
|
+
|
|
119
|
+
To run the CLI tool, navigate to your project and run it in the terminal:
|
|
120
|
+
|
|
121
|
+
<CodeBlockTabs type="installer" options={["npm", "yarn", "pnpm"]}>
|
|
122
|
+
```bash filename="terminal"
|
|
123
|
+
npx @clerk/upgrade
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
```bash filename="terminal"
|
|
127
|
+
yarn dlx @clerk/upgrade
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
```bash filename="terminal"
|
|
131
|
+
pnpm dlx @clerk/upgrade
|
|
132
|
+
```
|
|
133
|
+
</CodeBlockTabs>
|
|
134
|
+
|
|
135
|
+
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,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 »](#redesigned-components)
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
## Redesigned components
|
|
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
|
+
<Callout type='info'>
|
|
6
|
+
If you are not customizing the appearance of your components, or using `localization`, you can skip this section. If
|
|
7
|
+
you are, we recommend using our CLI (`npx @clerk/upgrade`) to scan for changes required as part of the component
|
|
8
|
+
redesign more quickly.
|
|
9
|
+
</Callout>
|
|
10
|
+
|
|
11
|
+
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.
|
|
File without changes
|
|
@@ -0,0 +1,7 @@
|
|
|
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`). There
|
|
5
|
+
are a lot of changes, each of which are very unlikely to appear in your codebase, that would take a very long time to
|
|
6
|
+
look for manually.
|
|
7
|
+
</Callout>
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import { renderAccordionForCategory, renderFrontmatter, renderMarkdown, renderSingleItem } from '../text-generation.js';
|
|
2
|
+
async function generate() {
|
|
3
|
+
const data = (await import(`../../versions/v5/index.js`)).default;
|
|
4
|
+
let output = '';
|
|
5
|
+
output += renderFrontmatter({
|
|
6
|
+
title: 'Upgrading from v4 to v5',
|
|
7
|
+
description: 'Learn how to upgrade from version 4 to version 5 of the Clerk JavaScript libraries.'
|
|
8
|
+
});
|
|
9
|
+
output += '\n\n';
|
|
10
|
+
output += renderMarkdown('v5-guide/intro');
|
|
11
|
+
output += '\n\n';
|
|
12
|
+
output += renderMarkdown('v5-guide/prepare');
|
|
13
|
+
output += '\n\n';
|
|
14
|
+
output += renderMarkdown('v5-guide/per-sdk');
|
|
15
|
+
output += '\n\n';
|
|
16
|
+
|
|
17
|
+
// ------------------------------------------------------------
|
|
18
|
+
|
|
19
|
+
output += '### Remix';
|
|
20
|
+
output += '\n\n';
|
|
21
|
+
|
|
22
|
+
// Error boundary removal
|
|
23
|
+
output += renderSingleItem('clerkerrorboundary-removed', data.remix);
|
|
24
|
+
output += '\n\n';
|
|
25
|
+
|
|
26
|
+
// Components redesigned
|
|
27
|
+
output += renderMarkdown('v5-guide/redesign-preview');
|
|
28
|
+
output += '\n\n';
|
|
29
|
+
|
|
30
|
+
// Deprecation removals & housekeeping
|
|
31
|
+
output += renderDeprecationRemovalsAndHousekeeping(data.remix);
|
|
32
|
+
|
|
33
|
+
// ------------------------------------------------------------
|
|
34
|
+
|
|
35
|
+
// TODO: I'm not sure we're actually releasing the gatsby changes in v5, should double check this
|
|
36
|
+
output += '### Gatsby';
|
|
37
|
+
output += '\n\n';
|
|
38
|
+
|
|
39
|
+
// withServerAuth type change
|
|
40
|
+
output += renderSingleItem('withserverauth-return-type', data.gatsby);
|
|
41
|
+
output += '\n\n';
|
|
42
|
+
|
|
43
|
+
// error import path changes
|
|
44
|
+
// TODO: need to figure out how widely this applies ⚠️
|
|
45
|
+
|
|
46
|
+
// Components redesigned
|
|
47
|
+
output += renderMarkdown('v5-guide/redesign-preview');
|
|
48
|
+
output += '\n\n';
|
|
49
|
+
|
|
50
|
+
// Deprecation removals & housekeeping
|
|
51
|
+
output += renderDeprecationRemovalsAndHousekeeping(data.gatsby);
|
|
52
|
+
|
|
53
|
+
// ------------------------------------------------------------
|
|
54
|
+
|
|
55
|
+
output += '### Expo';
|
|
56
|
+
output += '\n\n';
|
|
57
|
+
|
|
58
|
+
// Components redesigned
|
|
59
|
+
output += renderMarkdown('v5-guide/redesign-preview');
|
|
60
|
+
output += '\n\n';
|
|
61
|
+
|
|
62
|
+
// Deprecation removals & housekeeping
|
|
63
|
+
output += renderDeprecationRemovalsAndHousekeeping(data.expo);
|
|
64
|
+
|
|
65
|
+
// ------------------------------------------------------------
|
|
66
|
+
|
|
67
|
+
output += '### Fastify';
|
|
68
|
+
output += '\n\n';
|
|
69
|
+
|
|
70
|
+
// Deprecation removals & housekeeping
|
|
71
|
+
output += renderDeprecationRemovalsAndHousekeeping(data.fastify);
|
|
72
|
+
|
|
73
|
+
// ------------------------------------------------------------
|
|
74
|
+
|
|
75
|
+
output += '### Node';
|
|
76
|
+
output += '\n\n';
|
|
77
|
+
|
|
78
|
+
// TODO: plans to deprecate this package in favor of backend/express - maybe?
|
|
79
|
+
|
|
80
|
+
// cjs/esm imports
|
|
81
|
+
output += renderSingleItem('cjs-esm-instance', data.node);
|
|
82
|
+
output += '\n\n';
|
|
83
|
+
|
|
84
|
+
// createClerkClient options instead of setter methods
|
|
85
|
+
output += renderMarkdown('v5-guide/node-setters-removals');
|
|
86
|
+
output += '\n\n';
|
|
87
|
+
|
|
88
|
+
// Deprecation removals & housekeeping
|
|
89
|
+
output += renderDeprecationRemovalsAndHousekeeping(data.node);
|
|
90
|
+
|
|
91
|
+
// ------------------------------------------------------------
|
|
92
|
+
|
|
93
|
+
output += '### React';
|
|
94
|
+
output += '\n\n';
|
|
95
|
+
|
|
96
|
+
// path routing (TODO: this should be linked to from other react SDKs)
|
|
97
|
+
output += renderMarkdown('v5-guide/path-routing');
|
|
98
|
+
output += '\n\n';
|
|
99
|
+
|
|
100
|
+
// routerPush/routerReplace
|
|
101
|
+
output += renderSingleItem('navigate-to-routerpush-routerreplace', data.react);
|
|
102
|
+
output += '\n\n';
|
|
103
|
+
|
|
104
|
+
// useOrganizationsList
|
|
105
|
+
output += renderSingleItem('useorganizations', data.react);
|
|
106
|
+
output += '\n\n';
|
|
107
|
+
|
|
108
|
+
// HOF removals (TODO: this applies to all react sdks, should be shared section)
|
|
109
|
+
output += renderMarkdown('v5-guide/hof-removals');
|
|
110
|
+
output += '\n\n';
|
|
111
|
+
output += renderAccordionForCategory(data.react, 'hof-removal');
|
|
112
|
+
output += '\n\n';
|
|
113
|
+
|
|
114
|
+
// error import paths
|
|
115
|
+
// TODO: applies to all sdks, make a shared section
|
|
116
|
+
|
|
117
|
+
// Components redesigned
|
|
118
|
+
output += renderMarkdown('v5-guide/redesign-preview');
|
|
119
|
+
output += '\n\n';
|
|
120
|
+
|
|
121
|
+
// Deprecation removals & housekeeping
|
|
122
|
+
output += renderDeprecationRemovalsAndHousekeeping(data.react);
|
|
123
|
+
|
|
124
|
+
// ------------------------------------------------------------
|
|
125
|
+
|
|
126
|
+
output += '### Javascript';
|
|
127
|
+
output += '\n\n';
|
|
128
|
+
|
|
129
|
+
// pagination params
|
|
130
|
+
output += renderMarkdown('v5-guide/pagination-args');
|
|
131
|
+
output += '\n\n';
|
|
132
|
+
output += renderAccordionForCategory(data.js, 'pagination-args');
|
|
133
|
+
output += '\n\n';
|
|
134
|
+
|
|
135
|
+
// data/totalCount return values
|
|
136
|
+
output += renderMarkdown('v5-guide/pagination-return');
|
|
137
|
+
output += '\n\n';
|
|
138
|
+
output += renderAccordionForCategory(data.js, 'pagination-return');
|
|
139
|
+
output += '\n\n';
|
|
140
|
+
|
|
141
|
+
// ------------------------------------------------------------
|
|
142
|
+
|
|
143
|
+
output += '### Backend';
|
|
144
|
+
output += '\n\n';
|
|
145
|
+
|
|
146
|
+
// ------------------------------------------------------------
|
|
147
|
+
|
|
148
|
+
output += '### Chrome Extension';
|
|
149
|
+
output += '\n\n';
|
|
150
|
+
|
|
151
|
+
// ------------------------------------------------------------
|
|
152
|
+
|
|
153
|
+
// Component redesign, shared section
|
|
154
|
+
output += renderMarkdown('v5-guide/redesigned-components');
|
|
155
|
+
output += '\n\n';
|
|
156
|
+
|
|
157
|
+
// This is a guide-specific item, no matcher for this
|
|
158
|
+
// TODO: add a way to have this be a normal change item but not run in the CLI
|
|
159
|
+
const defaultsChangeItem = {
|
|
160
|
+
title: 'Changes to default variables',
|
|
161
|
+
content: `The default values of some [appearance variables](/docs/components/customization/variables) have changed which may impact your UI (if you are not already overriding them).
|
|
162
|
+
|
|
163
|
+
- 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\`.
|
|
164
|
+
- The default \`fontSize\` value changed from \`1rem\` to \`0.8125rem\`
|
|
165
|
+
- The default \`fontWeight\` values changed from \`{ normal: 400, medium: 500, bold: 600 }\` to \`{ normal: 400, medium: 500, bold: 700 }\`
|
|
166
|
+
- Previously, the default value for \`fontSmoothing\` was \`auto\`. This value is now unset. If you want to pass a custom value to it, you can still do so.`
|
|
167
|
+
};
|
|
168
|
+
output += '#### Appearance changes';
|
|
169
|
+
output += '\n\n';
|
|
170
|
+
output += renderAccordionForCategory(data.nextjs, 'appearance', {
|
|
171
|
+
additionalItems: [defaultsChangeItem]
|
|
172
|
+
});
|
|
173
|
+
output += '\n\n';
|
|
174
|
+
output += '#### Localization changes';
|
|
175
|
+
output += '\n\n';
|
|
176
|
+
output += renderAccordionForCategory(data.nextjs, 'localization');
|
|
177
|
+
output += '\n\n';
|
|
178
|
+
return output;
|
|
179
|
+
}
|
|
180
|
+
generate().then(console.log);
|
|
181
|
+
|
|
182
|
+
// This is used the same way for all SDKs, so this fn prevents tons of repetition
|
|
183
|
+
function renderDeprecationRemovalsAndHousekeeping(data) {
|
|
184
|
+
let output = '';
|
|
185
|
+
output += '## Deprecation removals & housekeeping';
|
|
186
|
+
output += '\n\n';
|
|
187
|
+
output += renderMarkdown('v5-guide/deprecation-removals');
|
|
188
|
+
output += '\n\n';
|
|
189
|
+
output += '### Deprecation removals';
|
|
190
|
+
output += '\n\n';
|
|
191
|
+
output += renderMarkdown('v5-guide/deprecation-removals');
|
|
192
|
+
output += '\n\n';
|
|
193
|
+
output += renderAccordionForCategory(data, 'deprecation-removal');
|
|
194
|
+
output += '\n\n';
|
|
195
|
+
output += '### Other Breaking Changes';
|
|
196
|
+
output += '\n\n';
|
|
197
|
+
output += renderAccordionForCategory(data, [undefined, 'hof-removal', 'pagination-return', 'pagination-args', 'error-imports']);
|
|
198
|
+
output += '\n\n';
|
|
199
|
+
return output;
|
|
200
|
+
}
|
|
@@ -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,15 @@
|
|
|
1
|
+
# Upgrading from v4 to v5
|
|
2
|
+
|
|
3
|
+
Clerk's SDKs include React, Next.js, Remix, Expo, Redwood, and others. This guide helps you with uprading to the next major version of your SDK.
|
|
4
|
+
|
|
5
|
+
Version 5 ships with an improved design and UX for its built-in components, no "flash of white page" when authenticating, and a new middleware for Next.js which defaults to not protecting any routes. Along with these highly requested features some smaller DX improvements and housekeeping items made its way into the release. If you want to know everything that's new, read the [v5 announcement post](https://clerk.com/changelog/2024-01-16).
|
|
6
|
+
|
|
7
|
+
<Callout type="info" >
|
|
8
|
+
Version 5/v5 refers to the [`@clerk/clerk-js`](https://www.npmjs.com/package/@clerk/clerk-js) package version. However, other SDKs like `@clerk/backend` or `@clerk/clerk-expo` are versioned independently (and would upgrade from v1 to v2). To make this page easier to read for instances of general advice only v5 is mentioned. You can think of v4 as the previous major of your SDK and v5 as the current in those cases.
|
|
9
|
+
</Callout>
|
|
10
|
+
|
|
11
|
+
If you're curious about Clerk's approach to versioning and support, head to the [long term support](/docs/upgrade-guides/long-term-support) document. Version 5 includes [potentially breaking changes](#breaking-changes), as well as the removal of [previously deprecated features](#previously-deprecated-features).
|
|
12
|
+
|
|
13
|
+
For most users we expect a smooth upgrade path as only a couple of changes will be required: [Update dependencies](#update-dependencies), run the `@clerk/upgrade` CLI, [update Clerk](#update-clerk), and handle any [breaking changes](#breaking-changes).
|
|
14
|
+
|
|
15
|
+
If you're using **Next.js**, you can read a more streamlined [Upgrading Next.js from v4 to v5](/docs/upgrade-guides/upgrading-nextjs-from-v4-to-v5) guide.
|
|
@@ -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 v5. In your Clerk dashboard, under "paths", there is a section called "Component paths", where URLs could be defined that had a deprecation warning. In v5, 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,9 @@
|
|
|
1
|
+
## Deprecation removals & housekeeping
|
|
2
|
+
|
|
3
|
+
As part of this major version, a large 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.
|
|
4
|
+
|
|
5
|
+
<Callout type='info'>
|
|
6
|
+
For this section more than any other one, please use the CLI upgrade tool (`npx @clerk/upgrade`). There
|
|
7
|
+
are a lot of changes, each of which are very unlikely to appear in your codebase, that would take a very long time to
|
|
8
|
+
look for manually.
|
|
9
|
+
</Callout>
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { readFileSync } from 'fs';
|
|
2
|
+
import { parseInline } from 'marked';
|
|
3
|
+
import path from 'path';
|
|
4
|
+
import { fileURLToPath } from 'url';
|
|
5
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
6
|
+
const VERSION = 'v5';
|
|
7
|
+
async function generate() {
|
|
8
|
+
const data = (await import(`../../versions/${VERSION}/index.js`)).default['nextjs'];
|
|
9
|
+
let output = '';
|
|
10
|
+
output += `---
|
|
11
|
+
title: Upgrading Next.js from v4 to v5
|
|
12
|
+
description: Learn how to upgrade Clerk's Next.js SDK from v4 to v5.
|
|
13
|
+
---`;
|
|
14
|
+
output += '\n\n';
|
|
15
|
+
output += read('intro');
|
|
16
|
+
output += '\n';
|
|
17
|
+
output += read('version-requirements');
|
|
18
|
+
|
|
19
|
+
// This is a guide-specific item, no matcher for this
|
|
20
|
+
const defaultsChangeItem = {
|
|
21
|
+
title: 'Changes to default variables',
|
|
22
|
+
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).
|
|
23
|
+
|
|
24
|
+
- 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\`.
|
|
25
|
+
- The default \`fontSize\` value changed from \`1rem\` to \`0.8125rem\`
|
|
26
|
+
- The default \`fontWeight\` values changed from \`{ normal: 400, medium: 500, bold: 600 }\` to \`{ normal: 400, medium: 500, bold: 700 }\`
|
|
27
|
+
- Previously, the default value for \`fontSmoothing\` was \`auto\`. This value is now unset. If you want to pass a custom value to it, you can still do so.\n`
|
|
28
|
+
};
|
|
29
|
+
output += '\n';
|
|
30
|
+
output += read('retheme-changes');
|
|
31
|
+
const apperanceChanges = data.filter(i => i.category === 'appearance');
|
|
32
|
+
apperanceChanges.push(defaultsChangeItem);
|
|
33
|
+
const localizationChanges = data.filter(i => i.category === 'localization');
|
|
34
|
+
output += '\n';
|
|
35
|
+
output += '### Appearance changes';
|
|
36
|
+
output += '\n\n';
|
|
37
|
+
output += `<Accordion titles={[${apperanceChanges.map(i => `"${parseInline(i.title)}"`).join(', ')}]}>`;
|
|
38
|
+
output += '\n';
|
|
39
|
+
output += apperanceChanges.map(i => `<AccordionPanel>${i.content}</AccordionPanel>`).join('\n');
|
|
40
|
+
output += '</Accordion>';
|
|
41
|
+
output += '\n\n';
|
|
42
|
+
output += '### Localization changes';
|
|
43
|
+
output += '\n\n';
|
|
44
|
+
output += `<Accordion titles={[${localizationChanges.map(i => `"${parseInline(i.title)}"`).join(', ')}]}>`;
|
|
45
|
+
output += '\n';
|
|
46
|
+
output += localizationChanges.map(i => `<AccordionPanel>${i.content}</AccordionPanel>`).join('\n');
|
|
47
|
+
output += '</Accordion>';
|
|
48
|
+
output += '\n\n';
|
|
49
|
+
output += read('middleware-changes');
|
|
50
|
+
output += '\n\n';
|
|
51
|
+
output += read('import-changes');
|
|
52
|
+
output += '\n';
|
|
53
|
+
output += read('after-sign-x-handling');
|
|
54
|
+
output += '\n';
|
|
55
|
+
output += read('deprecation-removals');
|
|
56
|
+
const deprecationRemovals = data.filter(i => i.category === 'deprecation-removal');
|
|
57
|
+
const otherChanges = data.filter(i => !i.category);
|
|
58
|
+
output += '### Deprecation removals';
|
|
59
|
+
output += '\n\n';
|
|
60
|
+
output += `<Accordion titles={[${deprecationRemovals.map(i => `"${parseInline(i.title)}"`).join(', ')}]}>`;
|
|
61
|
+
output += '\n';
|
|
62
|
+
output += deprecationRemovals.map(i => `<AccordionPanel>${i.content}</AccordionPanel>`).join('\n');
|
|
63
|
+
output += '</Accordion>';
|
|
64
|
+
output += '\n\n';
|
|
65
|
+
output += '### Other breaking changes';
|
|
66
|
+
output += '\n\n';
|
|
67
|
+
output += `<Accordion titles={[${otherChanges.map(i => `"${parseInline(i.title)}"`).join(', ')}]}>`;
|
|
68
|
+
output += '\n';
|
|
69
|
+
output += otherChanges.map(i => `<AccordionPanel>${i.content}</AccordionPanel>`).join('\n');
|
|
70
|
+
output += '</Accordion>';
|
|
71
|
+
output += '\n\n';
|
|
72
|
+
|
|
73
|
+
// TODO: deal with HOF removals
|
|
74
|
+
|
|
75
|
+
return output;
|
|
76
|
+
}
|
|
77
|
+
generate().then(console.log);
|
|
78
|
+
function read(p) {
|
|
79
|
+
return readFileSync(path.join(__dirname, p + '.mdx'), 'utf8');
|
|
80
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
## Changes to top-level exports
|
|
2
|
+
|
|
3
|
+
As part of this release, some of the top-level exports of `@clerk/nextjs` have been changed in order to improve bundle size and tree-shaking efficiency. These changes have resulted in a ~75% reduction in build size for middleware bundles. However, you will likely need to make some changes to import paths as a result.
|
|
4
|
+
|
|
5
|
+
<Callout type='info'>
|
|
6
|
+
Use the CLI tool, `npx @clerk/upgrade`, to automatically find occurences of old imports.
|
|
7
|
+
</Callout>
|
|
8
|
+
|
|
9
|
+
<Accordion titles={["@clerk/nextjs/server", "@clerk/nextjs/errors", "@clerk/nextjs/app-beta", "@clerk/nextjs/ssr", "@clerk/nextjs/edge-middleware", "@clerk/nextjs/edge-middlewarefiles", "@clerk/nextjs/api"]} heading="h4">
|
|
10
|
+
<AccordionPanel>
|
|
11
|
+
Previously these exports have been exported both from `@clerk/nextjs` and `@clerk/nextjs/server`. As of v5 they are only exported from the latter.
|
|
12
|
+
|
|
13
|
+
```diff
|
|
14
|
+
import {
|
|
15
|
+
auth,
|
|
16
|
+
currentUser,
|
|
17
|
+
authMiddleware,
|
|
18
|
+
buildClerkProps,
|
|
19
|
+
verifyToken,
|
|
20
|
+
verifyJwt,
|
|
21
|
+
decodeJwt,
|
|
22
|
+
signJwt,
|
|
23
|
+
constants,
|
|
24
|
+
redirect,
|
|
25
|
+
createAuthenticateRequest,
|
|
26
|
+
createIsomorphicRequest,
|
|
27
|
+
- } from "@clerk/nextjs"
|
|
28
|
+
+ } from "@clerk/nextjs/server"
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
</AccordionPanel>
|
|
32
|
+
<AccordionPanel>
|
|
33
|
+
Exports related to errors are now under `@clerk/nextjs/errors`.
|
|
34
|
+
|
|
35
|
+
```diff
|
|
36
|
+
import {
|
|
37
|
+
isClerkAPIResponseError,
|
|
38
|
+
isEmailLinkError,
|
|
39
|
+
isKnownError,
|
|
40
|
+
isMetamaskError,
|
|
41
|
+
EmailLinkErrorCode,
|
|
42
|
+
- } from "@clerk/nextjs"
|
|
43
|
+
+ } from "@clerk/nextjs/errors"
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
</AccordionPanel>
|
|
47
|
+
<AccordionPanel>
|
|
48
|
+
The `@clerk/nextjs` import will work with both the app and pages router.
|
|
49
|
+
|
|
50
|
+
```diff
|
|
51
|
+
- import { } from "@clerk/nextjs/app-beta"
|
|
52
|
+
+ import { } from "@clerk/nextjs"
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Some behavior may have changed between Clerk's beta and the stable release. Please check on your end if behavior stayed the same.
|
|
56
|
+
|
|
57
|
+
</AccordionPanel>
|
|
58
|
+
<AccordionPanel>
|
|
59
|
+
The top-level exports support SSR by default now.
|
|
60
|
+
|
|
61
|
+
```diff
|
|
62
|
+
- import { } from "@clerk/nextjs/ssr"
|
|
63
|
+
+ import { } from "@clerk/nextjs"
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
</AccordionPanel>
|
|
67
|
+
<AccordionPanel>
|
|
68
|
+
```diff
|
|
69
|
+
- import { } from "@clerk/nextjs/edge-middleware"
|
|
70
|
+
+ import { } from "@clerk/nextjs"
|
|
71
|
+
```
|
|
72
|
+
</AccordionPanel>
|
|
73
|
+
<AccordionPanel>
|
|
74
|
+
```diff
|
|
75
|
+
- import { } from "@clerk/nextjs/edge-middlewarefiles"
|
|
76
|
+
+ import { } from "@clerk/nextjs"
|
|
77
|
+
```
|
|
78
|
+
</AccordionPanel>
|
|
79
|
+
<AccordionPanel>
|
|
80
|
+
The `@clerk/nextjs/api` subpath was removed completely. It re-exported helpers from `@clerk/clerk-sdk-node` and its types. If you relied on these, import from `@clerk/clerk-sdk-node` directly instead.
|
|
81
|
+
|
|
82
|
+
```diff
|
|
83
|
+
import type {
|
|
84
|
+
ClerkMiddleware,
|
|
85
|
+
ClerkMiddlewareOptions,
|
|
86
|
+
LooseAuthProp,
|
|
87
|
+
RequireAuthProp,
|
|
88
|
+
StrictAuthProp,
|
|
89
|
+
WithAuthProp
|
|
90
|
+
- } from "@clerk/nextjs/api"
|
|
91
|
+
+ } from "@clerk/clerk-sdk-node"
|
|
92
|
+
|
|
93
|
+
- import { requireAuth, withAuth } from "@clerk/nextjs/api"
|
|
94
|
+
+ import { requireAuth, withAuth } from "@clerk/clerk-sdk-node"
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
</AccordionPanel>
|
|
98
|
+
</Accordion>
|
|
File without changes
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Upgrading Next.js from v4 to v5
|
|
2
|
+
|
|
3
|
+
By the end of this guide, you’ll have successfully upgraded your Next.js project to use `@clerk/nextjs` v5. You’ll learn how to update your dependencies, resolve breaking changes, and find deprecations.
|
|
4
|
+
|
|
5
|
+
Step-by-step instructions will lead you through the process. If you’re looking for a reference list of changes, check out the general [upgrading from v4 to v5 guide](/docs/upgrade-guides/upgrading-from-v4-to-v5).
|
|
6
|
+
|
|
7
|
+
To aid you in this upgrade, Clerk built a CLI called [`@clerk/upgrade`](https://www.npmjs.com/package/@clerk/upgrade). Throughout this guide you'll see prompts to use the CLI which you can invoke directly in your terminal.
|
|
8
|
+
|
|
9
|
+
<CodeBlockTabs type="installer" options={["npm", "yarn", "pnpm"]}>
|
|
10
|
+
```bash filename="terminal"
|
|
11
|
+
npx @clerk/upgrade
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
```bash filename="terminal"
|
|
15
|
+
yarn dlx @clerk/upgrade
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
```bash filename="terminal"
|
|
19
|
+
pnpm dlx @clerk/upgrade
|
|
20
|
+
```
|
|
21
|
+
</CodeBlockTabs>
|