Conversation
…kages/expo-native Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…elegate its config plugin Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… add changesets Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: 170d56f The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueComment |
@clerk/expo-native now takes useAuth from @clerk/react, so the two workspace packages no longer form a cycle. The config plugin records the installed @clerk/expo version for the native host SDK header on both platforms via Info.plist and gradle.properties, and fails early if the installed @clerk/expo still bundles the native module. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Superseded by #9955 (comment) (re-recorded with full-frame-rate capture). |
…geset Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Superseded by #9955 (comment) (re-recorded so push and modal animations are captured). |
…/expo-native-components Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Native components with
components-v3-final.mp4 |
|
JS-only app, re-recorded with full-frame-rate simulator capture (
jsonly-v2-final.mp4 |
Description
Moves everything in
@clerk/expothat depends on the Clerk native SDKs (clerk-ios / clerk-android) into a new optional package,@clerk/expo-native-components. Apps that don't install it no longer get the Clerk native SDKs, the native module, native client sync, or the iOS 17 minimum.What this gains
For apps that don't use native components:
@clerk/expobuild pulls in clerk-ios and clerk-android. After this change they're only linked when@clerk/expo-native-componentsis installed. A JS-only test app builds with noClerkExpo/ClerkKitpods and no ClerkKit symbols in the iOS binary, and with no Clerk native classes in the Android APK.@clerk/expo's plugin raised every app's deployment target to it. The JS-only test app builds at iOS 16.4.ClerkProviderconfigures the native SDK in every native build today. That means extra/clientand/environmentrequests at startup, token polling every 5s, refreshes when the app returns to the foreground, and the native↔JS sync engine, all in apps that never render a native component. None of it runs unless@clerk/expo-native-componentsis installed.Pods.xcodeprojfor pods with Swift Package dependencies. JS-only apps no longer hit that.For the SDK:
@clerk/expo-native-componentsturns native Clerk on.__experimental_disableNativeClientSyncis no longer needed to keep JS-only apps unaffected.@clerk/expo-native-componentsusers.What it costs
AuthView,UserButtonorUserProfileViewhave to install@clerk/expo-native-componentsand add its config plugin. (Biometric credentials move to their own package,@clerk/expo-biometrics, later in this stack: feat(expo-biometrics): add biometric credential native module #9959–feat(expo): move biometric credentials to @clerk/expo-biometrics #9960.) Existing@clerk/expo/nativeimports keep working through a shim that throws a clear install error when the package is missing. This ships as a minor because native components are beta.This is a move plus wiring only. The JS sync engine is not rewritten:
ClerkProvider, native client sync,useBiometricCredentialsanduseTrustedDevicesstay in@clerk/expoand keep resolving theClerkExponative module by name, so they work when@clerk/expo-native-componentsis installed and are no-ops or unavailable when it isn't.Moved to
packages/expo-native-components(git mv):ios/andandroid/(module, views, app delegate subscriber, bridge, Compose hosts, theme loading, biometric functions, native tests),ClerkExpo.podspec,android/build.gradle,expo-module.config.json,react-native.config.js, andcodegenConfig.src/native/*(now the package root:AuthView,UserProfileView,UserButton,useAuthViewState, custom pages API and types) and the native view specs, with their unit tests.app.plugin.jsnative-SDK parts: iOS 17 deployment target,ClerkExpoVersion, Android META-INF exclusion and-Xskip-metadata-version-check,keychainService,theme. The theme validation tests moved with it.@clerk/expo-native-componentsdoesn't depend on@clerk/expo(it reads auth state through@clerk/react), so the two packages don't form a workspace cycle. Its config plugin still reports the installed@clerk/expoversion inx-clerk-host-sdk-version: it writes it toClerkExpoVersionin Info.plist and toclerkExpo.hostSdkVersioningradle.properties, falling back to the@clerk/expo-native-componentsversion when the plugin hasn't run. The plugin also fails prebuild with an upgrade message if the installed@clerk/expostill bundles the native module, since both would register theClerkExpopod and Android module.Backwards compatibility in
@clerk/expo(shipped as a minor since native components are beta):@clerk/expo/nativere-exports from@clerk/expo-native-componentsusing arequire()intry/catch, which Metro treats as an optional dependency. Without the package, rendering a component or calling a hook throws an error explaining how to install@clerk/expo-native-componentsand add its plugin. Its types come from a checked-innative/index.d.tsthat re-exports@clerk/expo-native-components.@clerk/expoconfig plugin keeps the hosted auth intent filter,appleSignInandfaceIDPermission, and no longer forces iOS 17. When@clerk/expo-native-componentsis resolvable from the project, it applies that package's plugin (run once, forwardingkeychainService/theme, with options on an explicit@clerk/expo-native-componentsentry taking precedence), so apps that only list@clerk/expokeep their native configuration. If it isn't installed and native-only options are passed, it warns with install instructions.@clerk/expo-native-componentsis an optional peer dependency of@clerk/expo. Biometric credential errors now tell you to install@clerk/expo-native-componentswhen the native module is missing.The native fixture workflow now packs and installs
@clerk/expo-native-components, and the fixture lists its plugin.Recordings of both halves are attached in the comments: a JS-only app without
@clerk/expo-native-components, and an app with it renderingAuthView,UserButtonandUserProfileView.Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change
🤖 Generated with Claude Code