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
14 changes: 14 additions & 0 deletions .changeset/olive-snakes-judge.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
"@clerk/clerk-expo": minor
---

Change the export of `useLocalCredentials` hook from `@clerk/clerk-expo` to `@clerk/clerk-expo/local-credentials`.

In `@clerk/[email protected]` a new hook called `useLocalCredentials` was introduced ([PR 3663](https://github.com/clerk/javascript/pull/3663)). This hook is optional, but Expo's bundler has problems tree-shaking this codepath so users were still required to install its peer dependencies even if they didn't use that hook.

For this **breaking** change, update your import as following:

```diff
- import { useLocalCredentials } from "@clerk/clerk-expo"
+ import { useLocalCredentials } from "@clerk/clerk-expo/local-credentials"
```
4 changes: 4 additions & 0 deletions packages/expo/local-credentials/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"main": "../dist/local-credentials/index.js",
"types": "../dist/local-credentials/index.d.ts"
}
7 changes: 6 additions & 1 deletion packages/expo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,19 @@
"./web": {
"types": "./dist/web/index.d.ts",
"default": "./dist/web/index.js"
},
"./local-credentials": {
"types": "./dist/local-credentials/index.d.ts",
"default": "./dist/local-credentials/index.js"
}
},
"main": "./dist/index.js",
"source": "./src/index.ts",
"types": "./dist/index.d.ts",
"files": [
"dist",
"web"
"web",
"local-credentials"
],
"scripts": {
"build": "tsup",
Expand Down
1 change: 0 additions & 1 deletion packages/expo/src/hooks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,3 @@ export {
} from '@clerk/clerk-react';

export * from './useOAuth';
export * from './useLocalCredentials';
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { useLocalCredentials } from './useLocalCredentials';