Skip to content

Comments

fix(shared,elements): Configure release/core-2 branch for production releases#7507

Merged
LauraBeatris merged 2 commits intorelease/core-2from
alexcarpenter/fix-type-guard-for-core-2
Dec 18, 2025
Merged

fix(shared,elements): Configure release/core-2 branch for production releases#7507
LauraBeatris merged 2 commits intorelease/core-2from
alexcarpenter/fix-type-guard-for-core-2

Conversation

@alexcarpenter
Copy link
Contributor

Description

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:

@changeset-bot
Copy link

changeset-bot bot commented Dec 18, 2025

🦋 Changeset detected

Latest commit: 6f0763f

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

This PR includes changesets to release 22 packages
Name Type
@clerk/elements Patch
@clerk/shared Patch
@clerk/agent-toolkit Patch
@clerk/astro Patch
@clerk/backend Patch
@clerk/chrome-extension Patch
@clerk/clerk-js Patch
@clerk/expo-passkeys Patch
@clerk/clerk-expo Patch
@clerk/express Patch
@clerk/fastify Patch
@clerk/nextjs Patch
@clerk/nuxt Patch
@clerk/react-router Patch
@clerk/clerk-react Patch
@clerk/remix Patch
@clerk/tanstack-react-start Patch
@clerk/testing Patch
@clerk/themes Patch
@clerk/types Patch
@clerk/vue Patch
@clerk/localizations 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 Dec 18, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
clerk-js-sandbox Ready Ready Preview, Comment Dec 18, 2025 8:58pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 18, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch alexcarpenter/fix-type-guard-for-core-2

Comment @coderabbitai help to get the list of available commands and usage tips.

@alexcarpenter alexcarpenter changed the title chore(ci): configure release/core-2 branch for production releases (#… chore(ci): configure release/core-2 branch for production releases Dec 18, 2025
Comment on lines +32 to +39
// 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;
}
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

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 alexcarpenter marked this pull request as ready for review December 18, 2025 18:04
@alexcarpenter alexcarpenter changed the title chore(ci): configure release/core-2 branch for production releases chore(ci): Configure release/core-2 branch for production releases Dec 18, 2025
@alexcarpenter alexcarpenter changed the title chore(ci): Configure release/core-2 branch for production releases fix(shared): Configure release/core-2 branch for production releases Dec 18, 2025
@LauraBeatris
Copy link
Member

@alexcarpenter I'm just going to re-open the PR here to retrigger the actions

@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 18, 2025

Open in StackBlitz

@clerk/agent-toolkit

npm i https://pkg.pr.new/@clerk/agent-toolkit@7507

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@7507

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@7507

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@7507

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@7507

@clerk/dev-cli

npm i https://pkg.pr.new/@clerk/dev-cli@7507

@clerk/elements

npm i https://pkg.pr.new/@clerk/elements@7507

@clerk/clerk-expo

npm i https://pkg.pr.new/@clerk/clerk-expo@7507

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@7507

@clerk/express

npm i https://pkg.pr.new/@clerk/express@7507

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@7507

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@7507

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@7507

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@7507

@clerk/clerk-react

npm i https://pkg.pr.new/@clerk/clerk-react@7507

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@7507

@clerk/remix

npm i https://pkg.pr.new/@clerk/remix@7507

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@7507

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@7507

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@7507

@clerk/themes

npm i https://pkg.pr.new/@clerk/themes@7507

@clerk/types

npm i https://pkg.pr.new/@clerk/types@7507

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@7507

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@7507

commit: 6f0763f

@alexcarpenter alexcarpenter changed the title fix(shared): Configure release/core-2 branch for production releases fix(shared,elements): Configure release/core-2 branch for production releases Dec 18, 2025
@LauraBeatris LauraBeatris merged commit 7b3024a into release/core-2 Dec 18, 2025
46 checks passed
@LauraBeatris LauraBeatris deleted the alexcarpenter/fix-type-guard-for-core-2 branch December 18, 2025 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants