Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/thick-rooms-repeat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@clerk/expo-passkeys': minor
---

Removed `expo-modules-core` from dependencies in favor of `expo` as a peer dependency to allow broader compatibility with Expo SDK versions `^50 || ^51 || ^52`.
8 changes: 5 additions & 3 deletions packages/expo-passkeys/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,13 @@
},
"dependencies": {
"@clerk/shared": "workspace:^",
"@clerk/types": "workspace:^",
"expo-modules-core": "1.12.26"
"@clerk/types": "workspace:^"
},
"devDependencies": {
"expo": "~52.0.0"
},
"peerDependencies": {
"expo": "*",
"expo": "^50 || ^51 || ^52",
"react": "catalog:peer-react",
"react-native": "*"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/expo-passkeys/src/ClerkExpoPasskeysModule.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { requireNativeModule } from 'expo-modules-core';
import { requireNativeModule } from 'expo';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would make the package compatible only with SDK 52, and we don't want that.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm working under the assumption that this change actually makes it work with work with any Expo SDK version since our expo peerDeps is agnostic (*) and we only reference SDK 52 in devDeps.

Also, this approach mimics the structure of a freshly scaffolded Expo module via npx create-expo-module

Screenshot 2025-03-20 at 12 07 21 AM

What do you think?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think import { requireNativeModule } from 'expo'; is only available in SDK 52, at lease that's my understanding from their docs.

52

image

51

image

@wobsoriano wobsoriano Mar 20, 2025

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, interesting. Thanks!

I checked Expo SDK versions 49-52 on NPM and they all export requireNativeModule. Do we want to support SDKs lower than that?

I'll investigate more, thanks!

Screenshot 2025-03-20 at 7 16 53 AM

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just got a great response from the Expo team on Discord! They confirmed we should import from "expo" instead of "expo-modules-core" since:

  1. expo-modules-core is meant to be internal to Expo's infrastructure
  2. expo package controls the correct version of expo-modules-core
  3. We should set it up with:
    • peerDependencies: expo: "^50 || ^51 || ^52" (for version ranges we want to support)
    • devDependencies: expo: "" (for testing)

We're on the right track! 👍

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious, why there is still documentation that uses expo-modules-core directly.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expo team confirmed it's an outdated doc 👍🏼

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@panteliselef Opened the PR - our youtube partner followed up with the snapshot version they tried and said it worked for them 🙏🏼


// It loads the native module object from the JSI or falls back to
// the bridge module (from NativeModulesProxy) if the remote debugger is on.
Expand Down
Loading