fix(clerk-expo): Export useLocalCredentials from a submodule#3954
Conversation
Turns out that tree shaking does not work as expected, and when importing any hook into an app that does not have `expo-local-authentication` installed the app will break due to the missing dependency.
🦋 Changeset detectedLatest commit: ccc03ea The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
|
!snapshot |
|
Hey @panteliselef - the snapshot version command generated the following package versions:
Tip: Use the snippet copy button below to quickly install the required packages. npm i @clerk/astro@1.1.0-snapshot.v5f4676a --save-exact
npm i @clerk/backend@1.7.0-snapshot.v5f4676a --save-exact
npm i @clerk/chrome-extension@1.2.2-snapshot.v5f4676a --save-exact
npm i @clerk/clerk-js@5.15.0-snapshot.v5f4676a --save-exact
npm i @clerk/elements@0.13.1-snapshot.v5f4676a --save-exact
npm i @clerk/clerk-expo@2.2.0-snapshot.v5f4676a --save-exact
npm i @clerk/express@0.0.29-snapshot.v5f4676a --save-exact
npm i @clerk/fastify@1.0.31-snapshot.v5f4676a --save-exact
npm i @clerk/localizations@2.5.9-snapshot.v5f4676a --save-exact
npm i @clerk/nextjs@5.3.2-snapshot.v5f4676a --save-exact
npm i @clerk/clerk-react@5.4.2-snapshot.v5f4676a --save-exact
npm i @clerk/remix@4.2.15-snapshot.v5f4676a --save-exact
npm i @clerk/clerk-sdk-node@5.0.28-snapshot.v5f4676a --save-exact
npm i @clerk/shared@2.5.2-snapshot.v5f4676a --save-exact
npm i @clerk/tanstack-start@0.2.2-snapshot.v5f4676a --save-exact
npm i @clerk/testing@1.2.11-snapshot.v5f4676a --save-exact
npm i @clerk/themes@2.1.21-snapshot.v5f4676a --save-exact
npm i @clerk/types@4.14.0-snapshot.v5f4676a --save-exact |
.changeset/olive-snakes-judge.md
Outdated
| "@clerk/clerk-expo": minor | ||
| --- | ||
|
|
||
| **Breaking**: Export `useLocalCredentials` from a submodule. |
There was a problem hiding this comment.
❓ Is it ok to introduce a breaking change in a minor release?
There was a problem hiding this comment.
@anagstef , the breaking change was already released in 3663 as a minor release. This was presumably by accident, due to unexpected expectations of how tree shaking would work with metro. So, technically no, its not ok but its already done; but it wasn't intended to be breaking either.
This fix is the "correction" for that. If this 'fixes' the break, then the feature itself is indeed nonbreaking, so this would be a patch.
There was a problem hiding this comment.
To be clear: this PR would be a patch and the feature would be ( once corrected ) a minor since its not an intentional breaking change requiring a migration, and doesn't deprecate any surface of the api.
If you must install the additional dependency still, then it would be a major change, because that is intentional feature addition requiring a migration.
There was a problem hiding this comment.
I'd have to agree that this is a breaking change, but it needs to be released as minor is order to fix a bug + introduces an API change.
|
thanks for looking into this and responding so quickly to issue #3950, @panteliselef |
|
@panteliselef Awesome work 🏅 |
Co-authored-by: Lennart <lekoarts@gmail.com>
…expo-will-require-expo-local
Co-authored-by: Lennart <lekoarts@gmail.com>
Description
Turns out that tree shaking does not work as expected, and when importing any hook into an app that does not have
expo-local-authenticationinstalled the app will break due to the missing dependency.Before
After
Updated Docs PR
Checklist
npm testruns as expected.npm run buildruns as expected.Type of change