fix(clerk-js): Stop ssoBypassAllowlist from making Organization circular - #9828
Conversation
The allowlist helper kept an enumerable reference back to its organization, so JSON.stringify on an Organization (or a User, through its memberships) threw "Converting circular structure to JSON".
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: ASSERTIVE Plan: Team Run ID: 📒 Files selected for processing (1)
🔗 Linked repositories identifiedCodeRabbit considers these linked repositories for cross-repo context during reviews:
💤 Files with no reviewable changes (1)
Included review availability: 4 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 6 reviews per hour. 📝 WalkthroughWalkthrough
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~5 minutes Severity of issue fixed: Low Suggested reviewers: Merge Risk: ⚪ Minimal · up to Organization serialization no longer fails on the allowlist back-reference. No actionable merge risk remains. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Comment |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 6c6401f The changes in this PR will be included in the next version bump. This PR includes changesets to release 0 packagesWhen changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types 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 |
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/electron
@clerk/electron-passkeys
@clerk/eslint-plugin
@clerk/expo
@clerk/expo-google-signin
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/hono
@clerk/localizations
@clerk/mosaic
@clerk/nextjs
@clerk/nuxt
@clerk/react
@clerk/react-router
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/ui
@clerk/upgrade
@clerk/vue
commit: |
API Changes Report
Summary
No API Changes DetectedAll packages have stable APIs with no detected changes. Report generated by Break Check Last ran on |
Description
Since #9809, calling
JSON.stringifyon anOrganization(or aUser, which reaches organizations through its memberships) throwsConverting circular structure to JSON. ThessoBypassAllowlisthelper on the organization kept an enumerable reference back to the organization.The reference is now non-enumerable, so serializing an organization works again and the helper shows up as an empty object.
Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change