Uh oh!
There was an error while loading. Please reload this page.
feat(ui): expose composed profile API via @clerk/ui/experimental - #9136
Conversation
|
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 ⚙️ Run configurationConfiguration used: Repository YAML (base), Repository UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
d61f967 to
98c4da7Compare8ffd832 to
480ab9bCompare98c4da7 to
e2f1c34Compare480ab9b to
30a2ce9Compare30a2ce9 to
b54f566Comparee2f1c34 to
38f6bb3Compareb54f566 to
c430eccCompare38f6bb3 to
84be728Comparec430ecc to
bf2e82dCompare84be728 to
38a3186Compare| describe('@clerk/ui/experimental flat exports', () => { | ||
| for (const name of EXPECTED_EXPORTS) { | ||
| it(`exports ${name} as a component`, () => { | ||
| expect(typeof (experimental as Record<string, unknown>)[name]).toBe('function'); | ||
| }); | ||
| } | ||
| it('does not export the compound namespace objects', () => { | ||
| expect((experimental as Record<string, unknown>).UserProfile).toBeUndefined(); | ||
| expect((experimental as Record<string, unknown>).OrganizationProfile).toBeUndefined(); | ||
| }); | ||
| }); |
There was a problem hiding this comment.
❓ wdyt about a snapshot test here? feels more maintainable instead of the static list
There was a problem hiding this comment.
Done. Roster is now a sorted-keys snapshot, plus a typeof-function guard over all exports and the namespace-absent check.
| // Each component is a top-level named export (not a property on a namespace | ||
| // object) so React Server Components create a client reference for it. That lets | ||
| // consumers render these directly in a Server Component tree without adding their | ||
| // own `'use client'` boundary — the `'use client'` directive lives on each leaf | ||
| // file, and re-exporting forwards those references unchanged. A namespace object | ||
| // (`UserProfile.Account`) would expose only the object as a client reference and | ||
| // break property access across the RSC boundary. | ||
| // | ||
| // The export roster is maintained once, in the per-directory `index` files under | ||
| // `../composed`; this module just re-exports it. |
There was a problem hiding this comment.
this context doesn't really seem relevant to maintain here
There was a problem hiding this comment.
Removed the re-export note; kept only the RSC rationale.
| { | ||
| "name": "@clerk/ui", | ||
| "version": "1.25.2", | ||
| "version": "1.24.2", |
There was a problem hiding this comment.
undo
| "version": "1.24.2", | |
| "version": "1.25.2", |
There was a problem hiding this comment.
Reverted to 1.25.2 (accidental downgrade).
bf2e82d to
04936daCompare38a3186 to
62c752bCompare62c752b to
8a799d3Compared3a7fbe to
f3a1169Compare8a799d3 to
d987559Comparef3a1169 to
c0da01bCompare- Restore @clerk/ui version to 1.25.2 (accidental downgrade) - Trim non-essential re-export note from experimental/index.ts - Convert flat-exports roster to a snapshot test
d987559 to
918d337CompareUh oh!
There was an error while loading. Please reload this page.
Stack 7/7 (top). Wires everything up: the
composedbarrel, the@clerk/ui/experimentalflat named exports, the package.json/tsdown entrypoint, and the integration tests.This is the only PR that changes the public surface. Merges the full composed
UserProfile/OrganizationProfileAPI.Changesets live only on the release PR #9144; this PR carries none.
Stack
Reviewed as a stack. The 7 PRs merge bottom-up into release branch #9144, which integrates into
mainas a single unit.main(integration)@clerk/ui/experimental(public API)