@clerk/shared
4.45.1 · 14 Nov 2026MIT11.8M / weekRepositorynpmAtom feed
Upgrading @clerk/shared From 3.48.1 to 4.0.0
1 release in betweenevery note read
- 21
- changes to make
- 0
- advisories fixed
- 22
- new
- 17
- fixes
Before you upgrade
Tick each one off as you go- Breaking4.0.0
- Breaking4.0.0
- Breaking4.0.0
- Breaking4.0.0
- Breaking4.0.0
- Breaking4.0.0
- Breaking4.0.0
- Breaking4.0.0
- Breaking4.0.0
- Breaking4.0.0
Security
2 advisories still affect 4.0.0
- Official Clerk JavaScript SDKs: Middleware-based route protection bypasscritical · GHSA-vqx2-fgx2-5wq9
- Clerk has an authorization bypass when combining organization, billing, or reverification checkshigh · GHSA-w24r-5266-9c3c
Upgrading to 4.8.3 clears them.
Release by release
- Breaking
Removed deprecated billing-related props (
__unstable_manageBillingUrl,__unstable_manageBillingLabel,__unstable_manageBillingMembersLimit) andexperimental__forceOauthFirst - Breaking
Rename internal
useBillingHookEnabledtouseBillingIsEnabledwith improved semantics for authentication and organization context checks. - Breaking
Remove
useUserContext,useOrganizationContext,useSessionContextanduseClientContextfrom theshared/reactpackage. - Breaking
Updated returned values of
Clerk.checkout()anduseCheckout.
- Breaking
10 other lines we could not sort, mostly version bumps
- 4.0.0
Renamed all
__unstable_*methods to__internal_*(for internal APIs) - 4.0.0
Renamed all
experimental__*andexperimental_*methods to__experimental_*(for beta features) - 4.0.0
Refactor React SDK hooks to subscribe to auth state via
useSyncExternalStore. This is a mostly internal refactor to unlock future improvements, but includes a few breaking changes and fixes. - 4.0.0
Updating minimum version of Node to v20.9.0
- 4.0.0
Adjust features parsing to throw errors on unknown scopes.
- 4.0.0
Remove
clerkJSUrl,clerkJSVersion,clerkUIUrl, andclerkUIVersionprops from all SDKs. To pin a specific version of@clerk/clerk-js, import theClerkconstructor from@clerk/clerk-jsand pass it toClerkProvidervia theClerkprop. To pin a specific version of@clerk/ui, importuifrom@clerk/uiand pass it via theuiprop. This bundles the modules directly with your application instead of loading them from the CDN. - 4.0.0
Removes now unused contexts
ClientContext,SessionContext,UserContextandOrganizationProvider. We do not anticipate public use of these. If you were using any of these, file an issue to discuss a path forward as they are no longer available even internally. - 4.0.0
getToken()now throwsClerkOfflineErrorinstead of returningnullwhen the client is offline. - 4.0.0
Update
ClerkAPIError.kindvalue to match class name - 4.0.0
Removing deprecated top-level exports from @clerk/shared
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.