fix(shared,elements): Configure release/core-2 branch for production releases#7507
Conversation
🦋 Changeset detectedLatest commit: 6f0763f The changes in this PR will be included in the next version bump. This PR includes changesets to release 22 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 GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
| // Use duck-typing with 'kind' property to handle cross-bundle scenarios | ||
| // where instanceof fails due to different class instances | ||
| if (ErrorClass.kind && typeof target === 'object' && target !== null && 'constructor' in target) { | ||
| const targetConstructor = (target as { constructor?: { kind?: string } }).constructor; | ||
| if (targetConstructor?.kind === ErrorClass.kind) { | ||
| return true; | ||
| } | ||
| } |
There was a problem hiding this comment.
The problem encountered is:
- clerk-js throws ClerkAPIResponseError instances
- @clerk/elements uses isClerkAPIResponseError() to check errors
- Both import from @clerk/shared, but due to bundling, they get different copies of the ClerkAPIResponseError class
- instanceof fails across different class instances
|
@alexcarpenter I'm just going to re-open the PR here to retrigger the actions |
@clerk/agent-toolkit
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/dev-cli
@clerk/elements
@clerk/clerk-expo
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/localizations
@clerk/nextjs
@clerk/nuxt
@clerk/clerk-react
@clerk/react-router
@clerk/remix
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/themes
@clerk/types
@clerk/upgrade
@clerk/vue
commit: |
Description
Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change