Skip to content

Conversation

@brkalow
Copy link
Member

@brkalow brkalow commented Jan 20, 2025

Description

Refactors createFapiClient() to not rely on an instance of Clerk(). 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 test runs as expected.
  • pnpm build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

@brkalow brkalow requested a review from a team January 20, 2025 18:15
@changeset-bot
Copy link

changeset-bot bot commented Jan 20, 2025

🦋 Changeset detected

Latest commit: 24d98ef

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@clerk/clerk-js Patch
@clerk/chrome-extension Patch
@clerk/clerk-expo Patch

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

@vercel
Copy link

vercel bot commented Jan 20, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
clerk-js-sandbox ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 20, 2025 10:43pm

Comment on lines +7 to +11
globals: {
__PKG_NAME__: '@clerk/clerk-js',
__PKG_VERSION__: 'test',
BUILD_ENABLE_NEW_COMPONENTS: '',
},
Copy link
Member Author

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: '',
Copy link
Contributor

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) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Left-over code

@brkalow brkalow merged commit 9da41ce into main Jan 21, 2025
29 checks passed
@brkalow brkalow deleted the brk.chore/fapiClient-no-clerk-instance branch January 21, 2025 09:55
@LekoArts LekoArts mentioned this pull request Jan 21, 2025
9 tasks
brkalow pushed a commit that referenced this pull request Jan 21, 2025
Copy link
Member

@nikosdouvlis nikosdouvlis left a comment

Choose a reason for hiding this comment

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

👀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants