-
Notifications
You must be signed in to change notification settings - Fork 402
chore(clerk-js): Refactor fapiClient to not rely on Clerk instance #4947
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🦋 Changeset detectedLatest commit: 24d98ef The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 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 Git ↗︎
|
| globals: { | ||
| __PKG_NAME__: '@clerk/clerk-js', | ||
| __PKG_VERSION__: 'test', | ||
| BUILD_ENABLE_NEW_COMPONENTS: '', | ||
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It felt more expected to define the global variables here. Moved and added values for the __PKG_ vars.
| globals: { | ||
| __PKG_NAME__: '@clerk/clerk-js', | ||
| __PKG_VERSION__: 'test', | ||
| BUILD_ENABLE_NEW_COMPONENTS: '', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess since you removed that code in another PR we can remove that global?
|
|
||
| if (clerkInstance.instanceType === 'development' && clerkInstance.isSatellite) { | ||
| searchParams.append('__domain', clerkInstance.domain); | ||
| // if (clerkInstance.instanceType === 'development' && clerkInstance.isSatellite) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left-over code
nikosdouvlis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👀
Description
Refactors
createFapiClient()to not rely on an instance ofClerk(). Instead, accept an explicit options object. This should make this method more portable in the future. If we want to, for example, expose a standalone FAPI client.Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change