fix(shared): Improve expo compat#1950
Merged
Merged
Conversation
🦋 Changeset detectedLatest commit: 5b6ea23 The changes in this PR will be included in the next version bump. This PR includes changesets to release 11 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 |
Contributor
Author
|
!snapshot |
This comment was marked as outdated.
This comment was marked as outdated.
Contributor
Author
|
!snapshot |
This comment was marked as outdated.
This comment was marked as outdated.
Contributor
Author
|
!snapshot |
This comment was marked as outdated.
This comment was marked as outdated.
Contributor
Author
|
!snapshot |
Collaborator
|
Hey @LekoArts - 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/backend@0.31.4-snapshot.vceb8c8a --save-exact
npm i @clerk/chrome-extension@0.4.11-snapshot.vceb8c8a --save-exact
npm i @clerk/clerk-js@4.64.0-snapshot.vceb8c8a --save-exact
npm i @clerk/clerk-expo@0.19.13-snapshot.vceb8c8a --save-exact
npm i @clerk/fastify@0.6.18-snapshot.vceb8c8a --save-exact
npm i gatsby-plugin-clerk@4.4.19-snapshot.vceb8c8a --save-exact
npm i @clerk/nextjs@4.25.8-snapshot.vceb8c8a --save-exact
npm i @clerk/clerk-react@4.27.1-snapshot.vceb8c8a --save-exact
npm i @clerk/remix@3.1.1-snapshot.vceb8c8a --save-exact
npm i @clerk/clerk-sdk-node@4.12.17-snapshot.vceb8c8a --save-exact
npm i @clerk/shared@1.0.1-snapshot.vceb8c8a --save-exact |
LekoArts
force-pushed
the
fix/shared-separate-exports
branch
from
October 26, 2023 22:08
b62de4c to
5b6ea23
Compare
LekoArts
marked this pull request as ready for review
October 26, 2023 22:09
nikosdouvlis
approved these changes
Oct 26, 2023
Merged
LekoArts
added a commit
that referenced
this pull request
Oct 30, 2023
* fix(shared): Remove "module" from package.json * chore(repo): Add subpath workaround script * chore(shared): Add script to shared * Create wise-houses-shop.md * chore(*): Fix stuff * chore(repo): Improve script * chore(repo): Scripting * Update wise-houses-shop.md (cherry picked from commit 29a5f56)
github-merge-queue Bot
pushed a commit
that referenced
this pull request
Oct 30, 2023
* fix(shared): Remove "module" from package.json * chore(repo): Add subpath workaround script * chore(shared): Add script to shared * Create wise-houses-shop.md * chore(*): Fix stuff * chore(repo): Improve script * chore(repo): Scripting * Update wise-houses-shop.md (cherry picked from commit 29a5f56) Co-authored-by: Lennart <lekoarts@gmail.com>
24 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The goal of this PR is improve the compat of our
@clerk/sharedpackage with Expo. Unfortunately Expo has limited support with theexportsmap (https://reactnative.dev/blog/2023/06/21/package-exports-support) and in addition, it doesn't support.mjsfiles by default (see expo/expo#23180) 🤷We don't want to give up the proper
exportssyntax as a workaround for now we can generate folders withpackage.jsonfiles before publishing and add them to thefileskey.For this the
@clerk/sharedpackage now has apostbuildscript to generate this. The information for it is hardcoded as it's easier than trying to write a "smart" script to handle all the cases. This also means that if we add a new subpath, we should add the name to thesubpaths.mjsfile and to thefilesarray insidepackage.json.The result is this output: https://unpkg.com/browse/@clerk/shared@1.0.1-snapshot.vceb8c8a/
Now when Expo tries to reach
@clerk/shared/deprecatedit'll use the folder.I also removed the "type": "module" as modern solutions should use exports map anyways and Expo won't try to use a file that uses .mjs
Fixes SDK-857
Checklist
npm testruns as expected.npm run buildruns as expected.Type of change
Packages affected
@clerk/clerk-js@clerk/clerk-react@clerk/nextjs@clerk/remix@clerk/types@clerk/themes@clerk/localizations@clerk/clerk-expo@clerk/backend@clerk/clerk-sdk-node@clerk/shared@clerk/fastify@clerk/chrome-extensiongatsby-plugin-clerkbuild/tooling/chore